Skip to content
Permalink
Browse files
Use SRS for WMS 1.1.1 and CRS for WMS 1.3 (like described in the OGC …
…specification), fixes #1242

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9143 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 24, 2008
1 parent 24f36ea commit 843e6c86935aa4a8fcf2f7a19af2b1d3001c8cac
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/providers/wms/qgswmsprovider.cpp
@@ -373,6 +373,12 @@ QImage* QgsWmsProvider::draw( QgsRect const & viewExtent, int pixelWidth, int p

// compose the URL query string for the WMS server.

QString crsKey = "SRS"; //SRS in 1.1.1 and CRS in 1.3.0
if ( mCapabilities.version == "1.3.0" || mCapabilities.version == "1.3")
{
crsKey = "CRS";
}

QString url = baseUrl;

url += "SERVICE=WMS";
@@ -383,7 +389,7 @@ QImage* QgsWmsProvider::draw( QgsRect const & viewExtent, int pixelWidth, int p
url += "&";
url += "BBOX=" + bbox;
url += "&";
url += "CRS=" + imageCrs;
url += crsKey + "=" + imageCrs;
url += "&";
url += "WIDTH=" + width;
url += "&";
@@ -412,7 +418,7 @@ QImage* QgsWmsProvider::draw( QgsRect const & viewExtent, int pixelWidth, int p
mGetFeatureInfoUrlBase += "&";
mGetFeatureInfoUrlBase += "BBOX=" + bbox;
mGetFeatureInfoUrlBase += "&";
mGetFeatureInfoUrlBase += "CRS=" + imageCrs;
mGetFeatureInfoUrlBase += crsKey + "=" + imageCrs;
mGetFeatureInfoUrlBase += "&";
mGetFeatureInfoUrlBase += "WIDTH=" + width;
mGetFeatureInfoUrlBase += "&";

0 comments on commit 843e6c8

Please sign in to comment.