<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Hi</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">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?</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">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.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Thanks again</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Philippe<br /><br /> Le 07-07-2018 20:31, Ola Røer Thorsen a écrit :
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">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.<br /> <br /> 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.<br /> <br /> Any clue welcomed to help getting me started.</blockquote>
<br /> If you write a small http mbtiles server then you can use one of the<br /> existing plugins that are bundled with Qt. I’ve done this using the<br /> mapboxgl-plugin. You can run the “server” from a thread in your<br /> application if you want.<br /> <br /> This might be the easiest solution for you, sounds like you have most<br /> of it already.<br /> <br /> For the mapbox-gl plugin, pass it an additional style to use, then<br /> serve this style from your server. You must also serve a “tilejson”<br /> file. Check out tileserver-gl on github for inspiration<br /> (node.js-based).<br /> <br /> Cheers,<br /> Ola<br /> <br /> _______________________________________________<br /> Interest mailing list<br /> <a href="mailto:Interest@qt-project.org">Interest@qt-project.org</a><br /> <a href="http://lists.qt-project.org/mailman/listinfo/interest" target="_blank" rel="noopener noreferrer">http://lists.qt-project.org/mailman/listinfo/interest</a></blockquote>
</div>
</body></html>