[QGIS Commit] r9776 - trunk/qgis/src/providers/wms

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Dec 12 11:02:36 EST 2008


Author: mhugent
Date: 2008-12-12 11:02:36 -0500 (Fri, 12 Dec 2008)
New Revision: 9776

Modified:
   trunk/qgis/src/providers/wms/qgswmsprovider.cpp
Log:
Use base url passed to the provider if there is no url from the capabilities request. Hopefully fixes bugs #1434 and #1453

Modified: trunk/qgis/src/providers/wms/qgswmsprovider.cpp
===================================================================
--- trunk/qgis/src/providers/wms/qgswmsprovider.cpp	2008-12-12 05:52:57 UTC (rev 9775)
+++ trunk/qgis/src/providers/wms/qgswmsprovider.cpp	2008-12-12 16:02:36 UTC (rev 9776)
@@ -379,15 +379,17 @@
     crsKey = "CRS";
   }
 
+  QString url;
   std::vector<QgsWmsDcpTypeProperty> dcpType = mCapabilities.capability.request.getMap.dcpType;
   if(dcpType.size() < 1)
   {
-    mError = tr("Could not determine URL for GetMap from the WMS capabilities response");
-    return 0;
+    url = baseUrl;
   }
+  else
+  {
+    url = prepareUri( dcpType.front().http.get.onlineResource.xlinkHref );
+  }
 
-  QString url = prepareUri( dcpType.front().http.get.onlineResource.xlinkHref );
-
   url += "SERVICE=WMS";
   url += "&";
   url += "VERSION=" + mCapabilities.version;



More information about the QGIS-commit mailing list