Skip to content

Commit edf31db

Browse files
rduivenvoordenyalldawson
authored andcommittedFeb 25, 2021
Prevent prefetching of surrounding images for WMS
For a true WMS it is not needed to prefetch surrounding tiles, because: - a WMS does not have fixed scales, so the re-using of cached images is not very likely - a WMS should always serve fresh data - Creation of WMS images can be very resourcefull (on serverside) in case of higher zoom levels or complex styling IF prefetching is preferred, the service should show itself as WMTS or WMS-C See #41691
1 parent fc8ac0e commit edf31db

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/providers/wms/qgswmsprovider.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,9 +2010,10 @@ int QgsWmsProvider::capabilities() const
20102010
}
20112011
}
20122012

2013-
// Prevent prefetch of XYZ openstreetmap images
2014-
// See: https://github.com/qgis/QGIS/issues/34813
2015-
if ( !( mSettings.mTiled && mSettings.mXyz && dataSourceUri().contains( QStringLiteral( "openstreetmap.org" ) ) ) )
2013+
// Prevent prefetch of XYZ openstreetmap images, see: https://github.com/qgis/QGIS/issues/34813
2014+
// But also prevent prefetching if service is a true WMS (mSettings.mTiled = True)
2015+
// See https://github.com/qgis/QGIS/issues/34813
2016+
if ( mSettings.mTiled && !( mSettings.mXyz && dataSourceUri().contains( QStringLiteral( "openstreetmap.org" ) ) ) )
20162017
{
20172018
capability |= Capability::Prefetch;
20182019
}

0 commit comments

Comments
 (0)
Please sign in to comment.