Skip to content
Permalink
Browse files

Use base url passed to the provider if there is no url from the capab…

…ilities request. Hopefully fixes bugs #1434 and #1453

git-svn-id: http://svn.osgeo.org/qgis/trunk@9776 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 12, 2008
1 parent c861e6c commit b7a0c91850a9613d342af3db100f649ec9b965c8
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/providers/wms/qgswmsprovider.cpp
@@ -379,14 +379,16 @@ QImage* QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth,
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 += "&";

0 comments on commit b7a0c91

Please sign in to comment.