Skip to content

Commit

Permalink
Fix loading of projects with XYZ tile layers
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Sep 5, 2016
1 parent 2e0c359 commit 58e62ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/qgsmaplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ bool QgsMapLayer::readLayerXml( const QDomElement& layerElement )
// This is modified version of old QgsWmsProvider::parseUri
// The new format has always params crs,format,layers,styles and that params
// should not appear in old format url -> use them to identify version
if ( !mDataSource.contains( "crs=" ) && !mDataSource.contains( "format=" ) )
// XYZ tile layers do not need to contain crs,format params, but they have type=xyz
if ( !mDataSource.contains( "type=" ) &&
!mDataSource.contains( "crs=" ) && !mDataSource.contains( "format=" ) )
{
QgsDebugMsg( "Old WMS URI format detected -> converting to new format" );
QgsDataSourceUri uri;
Expand Down

0 comments on commit 58e62ed

Please sign in to comment.