View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#37
Originally Posted by rinigus View Post
I have managed to compile Mapbox GL Native for SFOS and tested it with the small app. All seems to be working as expected. Even in online mode, its fast, allows smooth transitions and so on.
Nice! Thanks a lot!

This should really help a lot, jut to name a few things that an Open GL based map view could provided in comparison to the custom tile based more or less 2D QML element:
  • support for proper rotation of maps (no upside down labels)
  • support for nicely animated transitions (zooming, map re-centering)
  • non-90 degree camera angle (eq. what common car navigation devices usually due in turn-by-turn navigation mode)
  • possibility for live style changes (no need to switch layers to switch on night mode or the possibility to highlight specific map elements - like roads - on the fly)

Originally Posted by rinigus View Post
SFOS packaging: Compilation relies on recent gcc (using 6.4.0, https://build.merproject.org/package...oolbox/opt-gcc). The compiled Qt version of the library is available at https://build.merproject.org/package...maps/qmapboxgl on the basis of https://github.com/rinigus/pkg-mapbox-gl-native .

QML integration: At present, Mapbox GL Native development is targeting Qt/QML through QtLocation 5.9 plugin. As a result, direct interface with QML was removed in the beginning of March 2017.

I have made a small project that would allow us to interface Mapbox GL through QML at https://github.com/rinigus/mapbox-gl-qml . Idea is to compose the interface that can be used by mapping applications for showing and interacting with the maps. Interface between OpenGL and QML is based on the same approach as used in the current implementation for QtLocation. This looks to be compatible with Silica as well, as much as I tested.
Yeah, that sounds to me as the way to go. We still can't use any form of Qt Location for Jolla Store apps, so depending on Qt Location from Qt 5.9 when another Qt 5 update on Sailfish OS is not even on the horizon is really a no-go.

What is the QML interface of the element like going to look like & what features will it likely support ?
Eq.: Just map centering, zooming control, etc. or more advanced stuff like POI markers any polyline display (routing trace/track logs) ? I've took a quick a for documentation of the upstream mapbox/mapbox-gl-native API and have not been really able to find a clear answer.

I guess if there is no marker/polyline support in the widget itself I should be able to use the existing polyline & POI overlays in modRana by putting them on top of the widget and adjusting them accordingly (scale, rotation, offset, etc.). But it could be quite tricky if the widget supports non-90 degree view angles & fractional scrolling. Also synchronization with animations would have to be handled so that the overlay does not lag behind during animations. Coordinate transformations could also potentially by fun in some cases.

Originally Posted by rinigus View Post
Small SFOS app is available at https://github.com/rinigus/mapbox-demo-sfos and shows how to integrate developed QML interface into the app as well as the integration with gcc-6.4.0.

I am letting you know about the development early, so we can discuss the ways we can integrate it with the available map applications (Poor Maps, modRana, Maep, and others). There is plenty to do, but all seems to be doable at this stage and shouldn't take a while before we'll get the map applications based on OpenGL rendering. Ideally, we should keep the same source code trees for tile-based and OpenGL map applications.
I'll likely integrating this map view first as an alternative option to the current fully tile based map view. At least until the features people expect to work (polylines, markers, maybe also overlays ?) can be provided by the Open GL based view as well.

BTW, what about offline usage ? Looking at the available documentation the widget seems to be basically locked to Mapbox for the input data for it's map rendering. How feasible does it look like making it (optionally ?) consume locally available data packs managed by OSM Scout Server and hosted @ modrana.org (as we already do with the other data packs) ?

And thanks yet again for working on all this! It's incredible what all you have accomplished so far!
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 2 Users Say Thank You to MartinK For This Useful Post: