2

Is there a way to display offline maps in QtLocation without generating tiles? Like reading directly from a osm file. If it is not possible in QtLocation, is there any other modules available that I can use in QML?

I want to achieve this without using tile server even running on local server and without generating tiles separately and using them as cache for QtLocation.

Thanks in advance

Roozbeh
  • 462
  • 3
  • 14
  • I'm not sure but you might look at QGIS and see how they do it. – rbaleksandar Apr 07 '18 at 21:16
  • @rbaleksandar thats a good idea, I'll take a look at their sources – Roozbeh Apr 07 '18 at 21:19
  • Some long long time ago I've tried to implement SHAPE file viewer, check it [here](https://github.com/folibis/qsimplespatial) maybe it could be useful. Unfortunately that works with QWidget only. But you can take the idea to implement it in QML. – folibis Apr 08 '18 at 05:51
  • It is possible -- and will take you not too much time -- but you will have to look into the Location Plugin APIs and implement a plugin that reads whatever data format you'd like to use (could be an .mbtiles files you'd prepackage or download from a provider, or even some vector format -- in which case it'd be much more involved, of course). – mlvljr Apr 08 '18 at 13:54
  • A popular offline tile format is mbtiles, as already mentioned. You can get them at http://openmaptiles.org/, for examle. I don't know if QML supports mbtiles though. – scai Apr 09 '18 at 06:57
  • It's very dependent on the plugin you use. You are asking if there's a plugin that doesn't need tiles. You could have a look at https://github.com/shentok/qtlocation-plugin-mapsforge perhaps – Pa_ Apr 18 '18 at 13:59

0 Answers0