[Interest] qtLocation and mbtiles

maitai maitai at virtual-winds.org
Mon Jul 9 11:45:48 CEST 2018


Hi 

Thanks Ola for your reply and advise. I gave it a try and it is working
nicely (the server is in a thread of the main application as you
suggested). I used the osm plugin instead of mapbox-gl, is there any
reason why mapbox-gl would be more advantageous? 

I might anyway go for the full subclassing method, because I also have
security issues (some of the mbtiles contain encrypted tiles and that
way it is too easy to catch them once decrypted). I should also find a
way to avoid caching, etc. 

Thanks again 
Philippe

Le 07-07-2018 20:31, Ola Røer Thorsen a écrit : 

>> I need to create a plugin for qtLocation that would use a local mbtile sql database instead of an online provider or a directory. The mbtiles management part is not an issue, I have already a class responding to tiles queries that I use in another widget-based application.
>> 
>> So far my understanding is that I need to subclass QGeoServiceProviderFactoryV2 and all other relevant classes. Is it the correct approach or is there something more simple? I couldn't find any sample on internet, and I find the documentation very limited.
>> 
>> Any clue welcomed to help getting me started.
> 
> If you write a small http mbtiles server then you can use one of the
> existing plugins that are bundled with Qt. I've done this using the
> mapboxgl-plugin. You can run the "server" from a thread in your
> application if you want.
> 
> This might be the easiest solution for you, sounds like you have most
> of it already.
> 
> For the mapbox-gl plugin, pass it an additional style to use, then
> serve this style from your server. You must also serve a "tilejson"
> file. Check out tileserver-gl on github for inspiration
> (node.js-based).
> 
> Cheers,
> Ola
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180709/f59932e9/attachment.html>


More information about the Interest mailing list