Re: [Interest] qtLocation and mbtiles

2018-07-09 Thread Ola Røer Thorsen
>
>
> 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'm using a mix of vector and raster tiles, so I needed mapbox-gl. If you
only use raster tiles then osm should be just fine! I guess it should be
much easier to use as a starting point for your own plugin too.

Cheers,
Ola
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qtLocation and mbtiles

2018-07-09 Thread maitai
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@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qtLocation and mbtiles

2018-07-07 Thread Ola Røer Thorsen


> 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@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qtLocation and mbtiles

2018-07-07 Thread maitai

Hi all,

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.
Thanks
Philippe (using qt 5.11.1)
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest