Skip to content

Commit

Permalink
Use base url passed to the provider if there is no url from the capab…
Browse files Browse the repository at this point in the history
…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 b7a0c91
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -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 += "&";
Expand Down

0 comments on commit b7a0c91

Please sign in to comment.