Skip to content

Commit 58e62ed

Browse files
committed
Fix loading of projects with XYZ tile layers
1 parent 2e0c359 commit 58e62ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/qgsmaplayer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ bool QgsMapLayer::readLayerXml( const QDomElement& layerElement )
234234
// This is modified version of old QgsWmsProvider::parseUri
235235
// The new format has always params crs,format,layers,styles and that params
236236
// should not appear in old format url -> use them to identify version
237-
if ( !mDataSource.contains( "crs=" ) && !mDataSource.contains( "format=" ) )
237+
// XYZ tile layers do not need to contain crs,format params, but they have type=xyz
238+
if ( !mDataSource.contains( "type=" ) &&
239+
!mDataSource.contains( "crs=" ) && !mDataSource.contains( "format=" ) )
238240
{
239241
QgsDebugMsg( "Old WMS URI format detected -> converting to new format" );
240242
QgsDataSourceUri uri;

0 commit comments

Comments
 (0)