You were close, very close. Try to swap the order of coordinates in https://github.com/sthocs/mapbox-test/blob/master/qml/pages/FirstPage.qml#L33 - GeoJSON is in different order.
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
PS: And we hijacked the thread