From fe4580824b92d69349eb8bba5de3d48dd8d9a71c Mon Sep 17 00:00:00 2001 From: Matthias Rauter Date: Fri, 10 Nov 2023 11:34:39 +0100 Subject: 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 --- src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/geoservices/osm') 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, -- cgit v1.2.3