Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 843e6c8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -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";
Expand All @@ -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 += "&";
Expand Down Expand Up @@ -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 += "&";
Expand Down

0 comments on commit 843e6c8

Please sign in to comment.