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@9143 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 24, 2008
1 parent d6e4c29 commit c436cb790a9010877a999ee97255c7d8f6acb810
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 c436cb7

Please sign in to comment.