Hey! No worries. I was actually done with this thread as one of my reasons for opening it turned out to be a mistaken understanding of sailjail (and sfos < 4).
As for the location stuff, I’m doing some debugging in that domain anyway so it’s ‘cross-pollination’ dev.
Hi again! So I’ve tried to simply clone and build your mapbox-demo-sfos with the SDK but it doesn’t work as-is. I know I need to install opt-gcc6 and qmapboxgl on the build target but I haven’t found how in a timely manner (I remember it was well explained in the old docs, but haven’t found anything in the new docs )
So I’ve created a new project and just replaced the content of the FirstPage.qml with a MapboxMap (the Mapbox’s accessToken needs to be set). The map shows but not the location icon.
Here is the repo if you want to have a look at what I have missed! GitHub - sthocs/mapbox-test: Minimal mapbox-gl-qml app
In general, approach is correct. Use QML plugin directly without a mess involved with qmapboxgl. That will allow you to follow MapboxGL QML development without doing much. See Pure Maps SPEC for bundling all needed components with the app for Jolla Store submission. If you distribute via Chum or OpenRepos, you could just require Mapbox GL QML plugin package and it will be pulled from corresponding repo. I would recommend from Chum, though
That SFOS demo is rather old and no wonder it is broken.
When working with the sources, I would suggest to use addSourcePoint method to add it and later updateSourcePoint. In Pure Maps there is a touch of complexity added to allow smooth location change indication, but it could still be used as an example. See https://github.com/rinigus/pure-maps/blob/master/qml/PositionMarker.qml
Thank you for checking and for the additional info! On my side I only wanted to see what it would take to use the plugin if at some point the QtLocation’s HERE plugin stops working too.
But I won’t invest much more for now, It’s been 8 years that I’m waiting for Jolla to provide an official way to develop map-based apps in a Harbour-compatible way, I’m not impatient anymore
PS: And we hijacked the thread
Hehe, he said “no worries” . It was an interesting discussion, thanks both!
… and now for something completely different, belonging to the “etc.” category (and maybe also the “<4.0.0” one) of the OP:
Via this comment I became aware of @slava’s harbour-lib, which provides backward compatibility functions like this (among other features), which eases to support a broad range of SFOS releases with a single code base.
When combining this with building per SailfishOS:Chum-OBS, automated compilation and distribution of apps for many SailfishOS releases becomes much easier than it ever was before.