Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtLocation offline map



  • Hi,

    I am interested in using the offline map with osm plugin (osm.mapping.offline.directory), and I found this blog post giving an example. The example does compile and run but does not work offline (works only online). I am using Qt 5.8 and I cannot find what I have done wrong since I just downloaded the example without modifying it ... Is there someone who tried to make the same example work or have an experience using the osm offline map ?

    Thanks



  • Ok, so I am replying myself but I found help on slack : I just needed to change the activeMapType to map.supportedMapTypes[2] instead of map.supportedMapTypes[0].



  • Thanks a lot, your post is really helpful for me!

    @akane do you know why we have to change the activeMapType to map.supportedMapTypes[2] ? Because on the tiles filename, the map_id is 3



  • Hi,

    I know it's been a while but my problem is related to the exact same thing...
    I'm using Qt 5.12 with QtLocation and qml, and want to display offline maps.
    BUT, I want to create my own map, based on an image file (tiff for example).
    I understand that I have to create a tiles folder. So I did. and managed to display tiles that were earlier saved to a cache folder of my choice.
    I've also managed to create a single tile cropped from my image.
    What I can't do is create the entire set of tiles from my image.
    I've tried QGis with different plugins, tried Mapnik and a few other methods that I read about,
    but none of them worked.

    Is there a working method for taking a map from an image file, and convert it to osm tiles?

    Thanks!


Log in to reply