Skip to content
Permalink
Browse files
fix for misprojected wms layers after project load
git-svn-id: http://svn.osgeo.org/qgis/trunk@7350 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 7, 2007
1 parent 973592a commit bc72f778c446f94ea4b2f0e0bf6461872b9a87ad
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 bc72f77

Please sign in to comment.