Skip to content
Permalink
Browse files
append resolution and transparency arguments also to tile request (fixes
  • Loading branch information
jef-n committed Jan 25, 2013
1 parent 45faef9 commit 7ad3048a1495b5da71f15e8692e6aaac63e47364
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/providers/wms/qgswmsprovider.cpp
@@ -807,8 +807,24 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, i
setQueryItem( url, "STYLES", mActiveSubStyles.join( "," ) );
setQueryItem( url, "FORMAT", mImageMimeType );
setQueryItem( url, crsKey, mImageCrs );

if ( mTiled )
{
setQueryItem( url, "TILED", "true" );
}

if ( mDpi != -1 )
{
setQueryItem( url, "DPI", QString::number( mDpi ) ); //QGIS server
setQueryItem( url, "MAP_RESOLUTION", QString::number( mDpi ) ); //UMN mapserver
setQueryItem( url, "FORMAT_OPTIONS", QString( "dpi:%1" ).arg( mDpi ) ); //geoserver
}

if ( !mImageMimeType.contains( "jpeg", Qt::CaseInsensitive ) &&
!mImageMimeType.contains( "jpg", Qt::CaseInsensitive ) )
{
setQueryItem( url, "TRANSPARENT", "TRUE" ); // some servers giving error for 'true' (lowercase)
}

int i = 0;
for ( int row = row0; row <= row1; row++ )

0 comments on commit 7ad3048

Please sign in to comment.