improved last commit

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9752 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2008-12-07 15:05:21 +00:00
parent e0a19f5423
commit 6aa1c6cfdb

View File

@ -379,14 +379,14 @@ QImage* QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth,
crsKey = "CRS";
}
int dcpTypeSize = mCapabilities.capability.request.getMap.dcpType.size();
if(dcpTypeSize < 1)
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;
}
QString url = prepareUri( mCapabilities.capability.request.getMap.dcpType.front().http.get.onlineResource.xlinkHref );
QString url = prepareUri( dcpType.front().http.get.onlineResource.xlinkHref );
url += "SERVICE=WMS";
url += "&";
@ -413,8 +413,6 @@ QImage* QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth,
url += "TRANSPARENT=TRUE";
}
qWarning( url.toUtf8() );
// cache some details for if the user wants to do an identifyAsHtml() later
mGetFeatureInfoUrlBase = baseUrl;
mGetFeatureInfoUrlBase += "SERVICE=WMS";