summaryrefslogtreecommitdiffstats
path: root/src/plugins/geoservices/osm
diff options
context:
space:
mode:
authorMatthias Rauter <matthias.rauter@qt.io>2023-11-10 11:34:39 +0100
committerMatthias Rauter <matthias.rauter@qt.io>2023-11-23 07:15:18 +0100
commitfe4580824b92d69349eb8bba5de3d48dd8d9a71c (patch)
tree7a8251d4ada11e9a5a4ee16cf9eb0221bda0a4ad /src/plugins/geoservices/osm
parentafa75142d118d750bd13d02c104140ff77cb9339 (diff)
Avoid adding x-y-z structure of tile server if the url end with a key
We previously added the x-y-z structure "%z/%x/%y.png" if the url did not end with ".png". This is not very flexible and will not allow to add an apikey that does not end with ".png". Searching for "%x" instead should be more flexible. Fixes: QTBUG-115742 Change-Id: I0ec4cf1713292896b84894224c1e279babc486ed Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/geoservices/osm')
-rw-r--r--src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
index 16c6fbc4..1a786dbb 100644
--- a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
@@ -185,7 +185,7 @@ QGeoTiledMappingManagerEngineOsm::QGeoTiledMappingManagerEngineOsm(const QVarian
if (parameters.contains(QStringLiteral("osm.mapping.copyright")))
m_customCopyright = parameters.value(QStringLiteral("osm.mapping.copyright")).toString();
- if (!tmsServer.endsWith(".png"))
+ if (!tmsServer.contains("%x"))
tmsServer += QStringLiteral("%z/%x/%y.png");
m_providers.push_back(
new QGeoTileProviderOsm( nmCached,