Active Topics

 


Reply
Thread Tools
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#11
Have to admit that I really like it much better than all the Mapnik styles I've tried. Is this https://www.mapbox.com/maps/outdoors/ OSM, or are they using some additional data source?

Looks too good to me to be OSM.

/me curses at the stupid build system.

I am currently toying with the Bluetooth protocol on a Garmin Fenix I got secondhand and I would enjoy something like this to render my little walks

Last edited by javispedro; 2016-06-09 at 14:05.
 
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#12
Originally Posted by javispedro View Post
Have to admit that I really like it much better than all the Mapnik styles I've tried. Is this https://www.mapbox.com/maps/outdoors/ OSM, or are they using some additional data source?

Looks too good to me to be OSM.
I've checked an are I have mapped for OSM and I'm pretty certain it is just filtered & styled OSM data with some height model for contours (SRTM or the other infrared image based one ?).

Originally Posted by javispedro View Post
/me curses at the stupid build system.
Are they still using that NPM based abomination ?
__________________
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)
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#13
Originally Posted by MartinK View Post
I've checked an are I have mapped for OSM and I'm pretty certain it is just filtered & styled OSM data with some height model for contours (SRTM or the other infrared image based one ?).
Technically, if they filtered the data somehow, they are forced to give it back with the same license, right? That's my understanding of http://www.openstreetmap.org/copyright

My perusal of the source code hasn't yet found exactly how are you supposed to feed actual map data to it.

Originally Posted by MartinK View Post
Are they still using that NPM based abomination ?
Seems like. But the configure-like script they ship depends on some kind of package manager they made called Mason , and for some reason it actually tries to install a bunch of libraries I already have (from a random website!).

I suspect It'd be better+easier to setup a Ubuntu VM to test it around (and see if I can replicate the output I get from their website).
 
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#14
Originally Posted by MartinK View Post
I've checked an are I have mapped for OSM and I'm pretty certain it is just filtered & styled OSM data with some height model for contours
Yep. It's OSM + various data sources for height.

https://www.mapbox.com/about/maps/#data-sources

Originally Posted by javispedro View Post
My perusal of the source code hasn't yet found exactly how are you supposed to feed actual map data to it.
The Mapbox Qt SDK is likely to be bound to Mapbox APIs, but Mapbox releases most of what they do as free software and their vector tiles are an open standard. I don't know what the whole stack to render vector maps is, but see e.g. the list of Mapbox vector tile spec implementations.
 

The Following User Says Thank You to otsaloma For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#15
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.

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.

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.

Last edited by rinigus; 2017-09-16 at 10:24.
 

The Following 11 Users Say Thank You to rinigus For This Useful Post:
Posts: 339 | Thanked: 1,623 times | Joined on Oct 2013 @ France
#16
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.

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.

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.

You never stop !

Good work as usual !
I imagine you want to put the OpenGL rendering part inside the maps applications, and changing the server to also serve vector maps ? Would you also want to use OpenGL to render raster map (for the apps not supporting vector) on the server side ?

Seeing the progress made in QtLocation 5.9 (http://blog.qt.io/blog/2017/09/04/qtlocation-5-9/), do you think backporting the whole QtLocation to Qt5.6 would be possible and not too much work, in order to stay as compatible as possible with those future improvements ?

On my side, I am working (albeit a hundred times slower than you) on a stripped down HUD like interface for another target (Odroid C2). So far, I used OSRM (Open Source Routing Machine) as it was the first of all the engines I got to compile (OSM has a lot of dependencies in comparison...), and has an embedded server.
I played with its debug vector tile output for some tests (http://project-osrm.org/docs/v5.7.0/api/#tile-service).
I decoded them manually with QPainter so far, as they are only containing roads, not the full maps details as MapBox can render), OpenGL is my next target to allow tilting the maps to show the horizon, like you would have in other car navigation systems (like old Here Maps : http://www.geeky-gadgets.com/wp-cont...-here-maps.jpg).
You are making me think about how to move this to something that could be shared with Sailfish, despite I would have trouble to keep up with your pace, and not having Silica and other Sailfish specific components...
 

The Following 5 Users Say Thank You to Zeta For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#17
Originally Posted by Zeta View Post
I imagine you want to put the OpenGL rendering part inside the maps applications, and changing the server to also serve vector maps ? Would you also want to use OpenGL to render raster map (for the apps not supporting vector) on the server side ?
I would start with getting QML component ready to be incorporated into the clients. It should give the best results when clients are rendering it directly. For offline, I would have to get the files to the device. I was not planning to support this rendering plugin in the server, at least not in the beginning. For those we have Mapnik already. Its maybe more productive to support the best case scenario and later adjust the plans.

Originally Posted by Zeta View Post
Seeing the progress made in QtLocation 5.9 (http://blog.qt.io/blog/2017/09/04/qtlocation-5-9/), do you think backporting the whole QtLocation to Qt5.6 would be possible and not too much work, in order to stay as compatible as possible with those future improvements ?
I tried once to compile QtLocation 5.9 against Qt 5.7 that I have on my desktop, but that failed on some internal Qt class (classes that they use for 'private' implementation). Didn't tried it anymore.

However, as far as I can see, much of it should be supported by Mapbox GL. Not sure about videos played on top of the map, but tilting & rotating is all there.

Originally Posted by Zeta View Post
On my side, I am working (albeit a hundred times slower than you) on a stripped down HUD like interface for another target (Odroid C2). So far, I used OSRM (Open Source Routing Machine) as it was the first of all the engines I got to compile (OSM has a lot of dependencies in comparison...), and has an embedded server.
I played with its debug vector tile output for some tests (http://project-osrm.org/docs/v5.7.0/api/#tile-service).
I decoded them manually with QPainter so far, as they are only containing roads, not the full maps details as MapBox can render), OpenGL is my next target to allow tilting the maps to show the horizon, like you would have in other car navigation systems (like old Here Maps : http://www.geeky-gadgets.com/wp-cont...-here-maps.jpg).
You are making me think about how to move this to something that could be shared with Sailfish, despite I would have trouble to keep up with your pace, and not having Silica and other Sailfish specific components...
If you can get Qt 5.9, that's probably the best way to go. The QML component that I want to develop as a wrapper should work on regular Qt - I am writing/testing it on regular Linux. So, that we can share. Same with the server, but it does have rather long list of dependencies indeed (that's a lot of effort to get it working).
 

The Following 3 Users Say Thank You to rinigus For This Useful Post:
Posts: 339 | Thanked: 1,623 times | Joined on Oct 2013 @ France
#18
Originally Posted by rinigus View Post
I tried once to compile QtLocation 5.9 against Qt 5.7 that I have on my desktop, but that failed on some internal Qt class (classes that they use for 'private' implementation). Didn't tried it anymore.
That was what I was afraid. Too bad.

Originally Posted by rinigus View Post
However, as far as I can see, much of it should be supported by Mapbox GL. Not sure about videos played on top of the map, but tilting & rotating is all there.
I don't see a use case for embedding videos, I was thinking more of the MapPolyline and other types to render geometry on top of the map, like the route to follow or points of interest (like gas station in car mode). Not sure how easy it is to do with an older Qt.
I took a look at the MapBox GL before, but it is a huge piece of software, and I didn't understand all the subtleties of what it can do, and how to integrate it correctly in an application. I'll take a look again.

Can you describe your linux setup to see if I can replicate it here and maybe help ?
 

The Following 2 Users Say Thank You to Zeta For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#19
Originally Posted by Zeta View Post
That was what I was afraid. Too bad.

I don't see a use case for embedding videos, I was thinking more of the MapPolyline and other types to render geometry on top of the map, like the route to follow or points of interest (like gas station in car mode). Not sure how easy it is to do with an older Qt.
I took a look at the MapBox GL before, but it is a huge piece of software, and I didn't understand all the subtleties of what it can do, and how to integrate it correctly in an application. I'll take a look again.

Can you describe your linux setup to see if I can replicate it here and maybe help ?
I haven't tried yet, but it seems to be easy to add routes, POIs and other objects in MapBox GL. As far as I understood, you basically add new geo layers in JSON and tell it how to render it. From your link to the blog post I understand why they made rather complicated API for QML in Qt 5.9 - they want to have it compatible with all providers.
With interfacing Mapbox GL directly, we could make a thin layer around https://github.com/mapbox/mapbox-gl-.../qmapboxgl.hpp which seems to me significantly easier.

For start, you could read QtLocation Mapbox GL Plugin API. That should give background info. Then we can test with the demo app how it all works under Linux.

Linux (and SFOS) setup actually takes not the master branch of mapbox-gl-native, but qt-staging. This is a branch followed by QtLocation plugin and it has a sane Qt build system (no need for node.js!). So, Linux setup that should work (I have a bit different, but its probably for historical reasons):

clone https://github.com/rinigus/pkg-mapbox-gl-native (recursively)

use included mapbox-gl-native-lib.pro to build the library by moving it into mapbox-gl-native folder, making dir build, and running qmake5 against mapbox-gl-native-lib.pro. That should let you build library with make

If you wish, you could install library. Otherwise, use it from that build dir (its static lib, so all should be fine).

clone https://github.com/rinigus/mapbox-gl-qml and open the project under app subfolder

Correct the path for qmapboxgl include and library dir (or even better - make symlinks that would lead to the same paths as used in the project file).

Register as a developer at mapbox.com for getting access token.

Add access token either into environment, into main() as

Code:
qputenv("MAPBOX_ACCESS_TOKEN", "HERE GOES THE TOKEN");
before registration of qml type.

Compile and run it.

Let me know if there is any trouble. I'll continue meanwhile adding QML methods. Should be all there soon, I hope.
 

The Following 4 Users Say Thank You to rinigus For This Useful Post:
Posts: 339 | Thanked: 1,623 times | Joined on Oct 2013 @ France
#20
Originally Posted by rinigus View Post
Let me know if there is any trouble. I'll continue meanwhile adding QML methods. Should be all there soon, I hope.
Perfect instructions !
I built it and ran it successfully on a Fedora workstation, with Qt5.7.1. Doing so, I found a typo on my Mapbox access token I used on previous tests, that may explain some errors I got then.

I only had to make a few changes to let it build:
Code:
diff --git a/app/mapbox-qml.pro b/app/mapbox-qml.pro
index fe7be45..d21fb3d 100644
--- a/app/mapbox-qml.pro
+++ b/app/mapbox-qml.pro
@@ -1,6 +1,6 @@
 TEMPLATE = app
 
-QT += qml quick location positioning
+QT += qml quick location positioning sql
 CONFIG += c++14
 
 SOURCES += src/main.cpp
@@ -10,7 +10,7 @@ RESOURCES += qml.qrc
 include(../mapbox-gl-qml.pri)
 
 INCLUDEPATH += ../../mapbox-gl-native/platform/qt/include ../../mapbox-gl-native/include
-LIBS += -L../../mapbox-gl-native/build -lqmapboxgl
+LIBS += -L../../mapbox-gl-native/build -lqmapboxgl -lz
 
 # Additional import path used to resolve QML modules in Qt Creator's code model
 QML_IMPORT_PATH =
The "-lz" part solves the "error adding symbols: DSO missing from command line" error I got.
The "sql" module in the QT line was needed to solve some linker error not finding some sqlite symbols (didn't write the exact message down).

It looks like that is what I need in my project.

So my next step would be to to see how I can add the route overlay on top of this map. So now, I get a lot things to read .

Thanks for the help.
 

The Following 3 Users Say Thank You to Zeta For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 12:19.