Skip to content

Commit 8d62d5a

Browse files
author
mhugent
committedMay 22, 2007
wms bugfix
git-svn-id: http://svn.osgeo.org/qgis/trunk@6956 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 8643bfb commit 8d62d5a

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed
 

‎src/providers/wms/qgswmsprovider.cpp‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,13 @@ QImage* QgsWmsProvider::draw(QgsRect const & viewExtent, int pixelWidth, int pi
462462
url += "STYLES=" + styles;
463463
url += "&";
464464
url += "FORMAT=" + imageMimeType;
465-
url += "&";
466-
url += "TRANSPARENT=TRUE";
465+
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
466+
{
467+
url += "&";
468+
url += "TRANSPARENT=TRUE";
469+
}
467470

468-
//qWarning(url);
471+
qWarning(url);
469472

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

494500

495501
QByteArray imagesource;

0 commit comments

Comments
 (0)
Please sign in to comment.