Thread: [SailfishOS] Mapbox GL Native QML plugin
View Single Post
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#37
Originally Posted by jdrescher View Post
OK thanks, I will try to make it work with OSM Scout server. Just a few more questions:
- Jolla 1 won't work with MapBox, right?
Right, Mapbox GL is not working on J1. Unless someone will come out and manage to fix it.

Originally Posted by jdrescher View Post
- OSM Scout Server: user has to decide if he wants to keep the classic map or a vector map for MapBox. Is it possible to keep both maps on the phone (although that would need very much space on the SD card)?
No, user can choose all possible backends by choosing corresponding settings. As a shortcuts, there are two options - just vector maps (Mapbox GL) or vector (Mapbox GL) and raster-generated on device (Mapnik). It would require larger space on the storage (SD Card).

Originally Posted by jdrescher View Post
- if I want to release my app with the MapBox QML component, the users also need mapboxgl-qml-1.1.0-10.27.1.jolla.armv7hl.rpm on their devices. How can I deliver it to them? Do they have to install it manually?
Its packaged at OpenRepos: https://openrepos.net/content/rinigu...indings-qt-qml

So, you could ask them to add my repository into their list of repositories and add mapboxgl-qml (name of the package) as dependency. This is probably the best way since it allows them to get the latest version with the bugs fixed (as the one I am fixing now).

The package is built at OBS, so they or you can take it from there (https://build.merproject.org/package...s/mapboxgl-qml).

You could also add this package into your repository. But that would require that you would be updating it as well.

Originally Posted by jdrescher View Post
- does a user of my app need to enter his own token for MapBox?
No, it doesn't have to be. Usually, its expected that you will put your API token. Right now, it allows you to get 50000 map tile downloads for free (see mapbox pricing) and then the developer would have to pay. I would suggest to keep an eye and if you start approaching that limit (wouldn't come overnight), cut it off or ask users for money.

However, there are alternatives. In addition to OSM Scout Server, @otsaloma setup his own server as a part of Poor Maps package. You could ask him for access key and suggest users to donate to him for this service. In addition, there are also other providers for map tiles which have free tier as well (Mapzen, for example).

And an update regarding the SSL bug. Looks like I missed testing online sources when we were searching for solution for localhost connection in offline mode. When switched to CURL-based downloads, the online sources broke if they use HTTPS. Its caused by adding hard-coded certificate file by Mapbox GL (https://github.com/mapbox/mapbox-gl-...ource.cpp#L249). In our phones (and on my Linux PC), the file with such name is missing. Now I am testing a patch without this hard-coded filename and checking if the default libcurl settings are good enough. On PC, it fixed an issue. On phone, I'll learn later tonight.
 

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