osm.mapping.offline.directory parameter value issues
-
I have been trying to use the offline directory parameter for the osm plugin, but am having trouble putting a file directory into the value. This blog post (https://www.qt.io/blog/2017/05/24/qtlocation-using-offline-map-tiles-openstreetmap-plugin) provides an example of using the parameter by putting tiles into a .qrc resource file. However, I want to upload lots of tiles and the program starts having memory issues at that point and crashes. So, instead of uploading the images to a .qrc file I thought it would be a better idea to put a file directory into the value, such as "file:///C:/<folder location>/". However, for some reason this method doesn't work and Qt can't load the images when I use a file directory. I am able to load an image into the program just by putting it onto the screen (just in a random spot, unrelated to the plugin), so I know Qt isn't having trouble accessing my files, but I'm wondering if it might be because I'm trying to access an entire folder?
This is a minimal version of the code; it's pretty much what's in that blog post from 2017 with the offline_tiles folder located inside of a file called qml.qrc
Map { id: map anchors.fill: parent zoomLevel: 1 activeMapType: map.supportedMapTypes[1] center: QtPositioning.coordinate(0, 0) plugin: Plugin { name: "osm" parameters: [ PluginParameter { name: "osm.mapping.offline.directory" value: ":/offline_tiles/" } ] } }
}