Skip to content

Commit

Permalink
improved last commit
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@9752 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 7, 2008
1 parent 7bf27ff commit cb08848
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -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 += "&";
Expand All @@ -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";
Expand Down

0 comments on commit cb08848

Please sign in to comment.