Skip to content
Permalink
Browse files

fix for misprojected wms layers after project load

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7350 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 7, 2007
1 parent facacf8 commit 2bf7c5bf42084f96ac9e9d38217f6fbc28d0a4a9
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/core/qgsmaplayer.cpp
@@ -142,10 +142,12 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
QDomElement mne = mnl.toElement();
mDataSource = mne.text();

// Set a SRS (any will do) so that we don't ask the user.
// We will overwrite whatever GDAL etc picks up anway
// Set the SRS so that we don't ask the user.
// Make it the saved SRS to have WMS layer projected correctly.
// We will still overwrite whatever GDAL etc picks up anyway
// further down this function.
mSRS->createFromSrsId(GEOSRS_ID);
QDomNode srsNode = layer_node.namedItem("srs");
mSRS->readXML(srsNode);

// now let the children grab what they need from the DOM node.
if (!readXML_( layer_node ))
@@ -186,8 +188,8 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
mne = mnl.toElement();
setLayerName( mne.text() );

//read srs
QDomNode srsNode = layer_node.namedItem("srs");
// overwrite srs
// FIXME: is this necessary?
mSRS->readXML(srsNode);

//read transparency level

0 comments on commit 2bf7c5b

Please sign in to comment.
You can’t perform that action at this time.