Skip to content

Commit

Permalink
wms bugfix
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6956 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 22, 2007
1 parent 0df5d53 commit fc1ea6e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/providers/wms/qgswmsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,13 @@ QImage* QgsWmsProvider::draw(QgsRect const & viewExtent, int pixelWidth, int pi
url += "STYLES=" + styles;
url += "&";
url += "FORMAT=" + imageMimeType;
url += "&";
url += "TRANSPARENT=TRUE";
if(!imageMimeType.contains("jpeg", Qt::CaseInsensitive) && !imageMimeType.contains("jpg", Qt::CaseInsensitive)) //MH: jpeg does not support transparency and some servers complain if jpg and transparent=true
{
url += "&";
url += "TRANSPARENT=TRUE";
}

//qWarning(url);
qWarning(url);

// cache some details for if the user wants to do an identifyAsHtml() later
mGetFeatureInfoUrlBase = baseUrl;
Expand All @@ -488,8 +491,11 @@ QImage* QgsWmsProvider::draw(QgsRect const & viewExtent, int pixelWidth, int pi
mGetFeatureInfoUrlBase += "STYLES=" + styles;
mGetFeatureInfoUrlBase += "&";
mGetFeatureInfoUrlBase += "FORMAT=" + imageMimeType;
mGetFeatureInfoUrlBase += "&";
mGetFeatureInfoUrlBase += "TRANSPARENT=TRUE";
if(!imageMimeType.contains("jpeg", Qt::CaseInsensitive) && !imageMimeType.contains("jpg", Qt::CaseInsensitive))
{
mGetFeatureInfoUrlBase += "&";
mGetFeatureInfoUrlBase += "TRANSPARENT=TRUE";
}


QByteArray imagesource;
Expand Down

0 comments on commit fc1ea6e

Please sign in to comment.