Is it possible to prevent online fall backs fro Qt Location?
-
wrote on 26 May 2017, 15:21 last edited by
So according to the blog post recently about using offline tiles, online tile repositories will be queried in an attempt to resolve any tiles that can't be found locally or in the cache.
tiles will be sourced from the specified directory before being searched in the tile cache, and, after that, being requested to the provider.
I understand for most applications this is desired behavior, but for my application there are very strict controls over what should be shown to the user. In particular, no online resources at ALL should be used.
Is there a way to disable this functionality? I have already tried using the parameters shown below, but it still populated with online tiles.
Plugin { name: "osm" PluginParameter { name: 'osm.mapping.offline.directory'; value: ':/offline_tiles/'} PluginParameter { name: 'osm.mapping.providersrepository.address'; value: ''} PluginParameter { name: 'osm.mapping.custom.host'; value: ''} PluginParameter { name: 'osm.mapping.providersrepository.disabled'; value: true } }
Any advice? There may be a way to accomplish this by rewriting the
QGeoTileProviderOsm
, but I don't know where I would even start to go about doing that, or how to point to it. Will I just have to write my ownPlugin
? I also don't know how I would go about doing that.Thanks for your time
-
So according to the blog post recently about using offline tiles, online tile repositories will be queried in an attempt to resolve any tiles that can't be found locally or in the cache.
tiles will be sourced from the specified directory before being searched in the tile cache, and, after that, being requested to the provider.
I understand for most applications this is desired behavior, but for my application there are very strict controls over what should be shown to the user. In particular, no online resources at ALL should be used.
Is there a way to disable this functionality? I have already tried using the parameters shown below, but it still populated with online tiles.
Plugin { name: "osm" PluginParameter { name: 'osm.mapping.offline.directory'; value: ':/offline_tiles/'} PluginParameter { name: 'osm.mapping.providersrepository.address'; value: ''} PluginParameter { name: 'osm.mapping.custom.host'; value: ''} PluginParameter { name: 'osm.mapping.providersrepository.disabled'; value: true } }
Any advice? There may be a way to accomplish this by rewriting the
QGeoTileProviderOsm
, but I don't know where I would even start to go about doing that, or how to point to it. Will I just have to write my ownPlugin
? I also don't know how I would go about doing that.Thanks for your time
wrote on 26 May 2023, 20:14 last edited by@dirtshell I know this is 7 years old now, but did you managed to solve this? I'm experiencing the same constraints in a new project.