maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [SFOS] Mapbox GL Native QML plugin (https://talk.maemo.org/showthread.php?t=99953)

rinigus 2017-11-30 07:06

Re: Mapbox GL Native QML plugin
 
Quote:

Originally Posted by m4r0v3r (Post 1538927)
And another one :P

not quite sure whats wrong there, maybe something wrong in gcc6 setup. ill take another look tomorrow morning

I see that you went C++ route and not simple QML way.

I would suggest to install
https://build.merproject.org/package...s/mapboxgl-qml and just use MapboxMap together with the gesture area as in https://github.com/rinigus/mapbox-de...y/MainPage.qml . Then you don't even need to include MapboxGL as a submodule, can use regular gcc, and its all very simple. mapboxgl-qml would register the module in the system and all should just work. Please report bugs if it doesn't.

C++ way, as you did, is also possible, but more complicated and will lead to all apps having different versions of the plugin (since you are compiling it in) and would end up having larger requirements in the root partition (everyone installing plugin under their /usr/share/harbour... folder). Note that QMaboxGL (which plugin interfaces), requires QLocation. So, there is no-go into Jolla Harbour until its allowed (Jolla's soon^TM comes into mind). So, I would suggest to go via QML plugin installation, enjoy programming and using it!

As for the error that you get, I think you are very close. You seem to miss c++14 in PRO configuration file, as I can deduce from compile messages. See https://github.com/rinigus/mapbox-de...x-sfos.pro#L15

m4r0v3r 2017-11-30 08:55

Re: Mapbox GL Native QML plugin
 
Quote:

Originally Posted by rinigus (Post 1538938)
I see that you went C++ route and not simple QML way.

I would suggest to install
https://build.merproject.org/package...s/mapboxgl-qml and just use MapboxMap together with the gesture area as in https://github.com/rinigus/mapbox-de...y/MainPage.qml . Then you don't even need to include MapboxGL as a submodule, can use regular gcc, and its all very simple. mapboxgl-qml would register the module in the system and all should just work. Please report bugs if it doesn't.

C++ way, as you did, is also possible, but more complicated and will lead to all apps having different versions of the plugin (since you are compiling it in) and would end up having larger requirements in the root partition (everyone installing plugin under their /usr/share/harbour... folder). Note that QMaboxGL (which plugin interfaces), requires QLocation. So, there is no-go into Jolla Harbour until its allowed (Jolla's soon^TM comes into mind). So, I would suggest to go via QML plugin installation, enjoy programming and using it!

As for the error that you get, I think you are very close. You seem to miss c++14 in PRO configuration file, as I can deduce from compile messages. See https://github.com/rinigus/mapbox-de...x-sfos.pro#L15

Oh I see, bit of a noob with qt and qml atm :P Ill stick with the qml since I don't think I'll need any c++ :)

I just realised thanks to your gcc6 work I can use Slacks c++ library as well :P

hmmm so I've done what you said but the qml component still can't be found :/

m4r0v3r 2017-11-30 09:36

Re: Mapbox GL Native QML plugin
 
hmm was missing the import and added it so MapboxMapGestureArea is recognised but not MapboxMap

rinigus 2017-11-30 10:26

Re: Mapbox GL Native QML plugin
 
Quote:

Originally Posted by m4r0v3r (Post 1538948)
hmm was missing the import and added it so MapboxMapGestureArea is recognised but not MapboxMap

Don't know why the gesture area is recognized, but you seem to be missing run requirements for mapboxgl-qml in

https://github.com/ghosalmartin/harb...-uber.yaml#L38

Namely, you need to have this package installed on device (or emulator) where you run the code, not just build.

Looking into it, I am missing it as well in Poor Maps port to MapboxGL. I just happened to have this package installed on my device...

m4r0v3r 2017-12-03 14:50

Re: Mapbox GL Native QML plugin
 
yep working well ta :) theres a ide error but map loads fine :D

rinigus 2017-12-03 15:53

Re: Mapbox GL Native QML plugin
 
Quote:

Originally Posted by m4r0v3r (Post 1539097)
yep working well ta :) theres a ide error but map loads fine :D

Great to hear. An update from me as well regarding offline maps:

* as mentioned earlier, planet imported

* added support for Mapbox GL styles, fonts (glyphs), and icons (sprite).

* added support for distribution of tiles, fonts, styles, and icons

This means that all the main parts are in place, now I need to hook it all to GUI and test on device. After that, testing and releases with increased amount of polish :)

m4r0v3r 2017-12-03 16:15

Re: Mapbox GL Native QML plugin
 
Quote:

Originally Posted by rinigus (Post 1539099)
Great to hear. An update from me as well regarding offline maps:

* as mentioned earlier, plane imported

* added support for Mapbox GL styles, fonts (glyphs), and icons (sprite).

* added support for distribution of tiles, fonts, styles, and icons

This means that all the main parts are in place, now I need to hook it all to GUI and test on device. After that, testing and releases with increased amount of polish :)

nicee, think am going to start dedicating more time to this project

rinigus 2017-12-10 20:55

Re: Mapbox GL Native QML plugin
 
As of today, offline support for Mapbox GL vector tiles has been released as a part of OSM Scout Server and the first full-blown application using the widget has been released as a temporary fork of Poor Maps. So, it should be possible to use it daily and the infrastructure for this maps widget is all in place.

m4r0v3r 2017-12-11 09:14

Re: Mapbox GL Native QML plugin
 
Quote:

Originally Posted by rinigus (Post 1539266)
As of today, offline support for Mapbox GL vector tiles has been released as a part of OSM Scout Server and the first full-blown application using the widget has been released as a temporary fork of Poor Maps. So, it should be possible to use it daily and the infrastructure for this maps widget is all in place.

I've been quietly ripping off your poor-maps code :P Very handy. One thing I was confused about is the GPS itself, is there anyway to reliable check if it has lock since most flags come back as valid when lock hasn't actually been achieved yet

rinigus 2017-12-11 09:22

Re: Mapbox GL Native QML plugin
 
Quote:

Originally Posted by m4r0v3r (Post 1539273)
I've been quietly ripping off your poor-maps code :P Very handy. One thing I was confused about is the GPS itself, is there anyway to reliable check if it has lock since most flags come back as valid when lock hasn't actually been achieved yet

I actually don't know how to query status of GPS. In Poor Maps, GPS uncertainty is used and shown. Maybe its sufficient for you as well?

From my understanding, location can be provided by many different sources and its up to Qt configuration to deal with such details as GPS lock. We can just use the data as given and not worry whether it was obtained via GPS or some other technique.


All times are GMT. The time now is 09:46.

vBulletin® Version 3.8.8