[QGIS Commit] r9143 - trunk/qgis/src/providers/wms
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Aug 24 04:40:37 EDT 2008
Author: mhugent
Date: 2008-08-24 04:40:35 -0400 (Sun, 24 Aug 2008)
New Revision: 9143
Modified:
trunk/qgis/src/providers/wms/qgswmsprovider.cpp
Log:
Use SRS for WMS 1.1.1 and CRS for WMS 1.3 (like described in the OGC specification), fixes #1242
Modified: trunk/qgis/src/providers/wms/qgswmsprovider.cpp
===================================================================
--- trunk/qgis/src/providers/wms/qgswmsprovider.cpp 2008-08-24 08:21:38 UTC (rev 9142)
+++ trunk/qgis/src/providers/wms/qgswmsprovider.cpp 2008-08-24 08:40:35 UTC (rev 9143)
@@ -373,6 +373,12 @@
// 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 @@
url += "&";
url += "BBOX=" + bbox;
url += "&";
- url += "CRS=" + imageCrs;
+ url += crsKey + "=" + imageCrs;
url += "&";
url += "WIDTH=" + width;
url += "&";
@@ -412,7 +418,7 @@
mGetFeatureInfoUrlBase += "&";
mGetFeatureInfoUrlBase += "BBOX=" + bbox;
mGetFeatureInfoUrlBase += "&";
- mGetFeatureInfoUrlBase += "CRS=" + imageCrs;
+ mGetFeatureInfoUrlBase += crsKey + "=" + imageCrs;
mGetFeatureInfoUrlBase += "&";
mGetFeatureInfoUrlBase += "WIDTH=" + width;
mGetFeatureInfoUrlBase += "&";
More information about the QGIS-commit
mailing list