Skip to content

Commit

Permalink
fix wmts (fixes #12241; followup 1e97b62)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 24, 2015
1 parent 06e2186 commit 251aca6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -559,8 +559,9 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, in
//t.start(); //t.start();


} }
else if ( mSettings.mMaxWidth != 0 && mSettings.mMaxHeight != 0 ) else
{ {
QgsDebugMsg( QString( "mTiled:%1 mMaxWidth:%2 mMaxHeight:%3" ).arg( mSettings.mTiled ).arg( mSettings.mMaxWidth ).arg( mSettings.mMaxHeight ) );
mTileReqNo++; mTileReqNo++;


double vres = viewExtent.width() / pixelWidth; double vres = viewExtent.width() / pixelWidth;
Expand Down Expand Up @@ -598,7 +599,7 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, in


tileMode = mTileLayer->tileMode; tileMode = mTileLayer->tileMode;
} }
else else if ( mSettings.mMaxWidth != 0 && mSettings.mMaxHeight && != 0 )
{ {
static QgsWmtsTileMatrix tempTm; static QgsWmtsTileMatrix tempTm;
tempTm.topLeft = QgsPoint( mLayerExtent.xMinimum(), mLayerExtent.yMaximum() ); tempTm.topLeft = QgsPoint( mLayerExtent.xMinimum(), mLayerExtent.yMaximum() );
Expand All @@ -610,6 +611,11 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, in


tileMode = WMSC; tileMode = WMSC;
} }
else
{
QgsDebugMsg( "empty tile size" );
return mCacheImage;
}


QgsDebugMsg( QString( "layer extent: %1,%2 %3x%4" ) QgsDebugMsg( QString( "layer extent: %1,%2 %3x%4" )
.arg( qgsDoubleToString( mLayerExtent.xMinimum() ) ) .arg( qgsDoubleToString( mLayerExtent.xMinimum() ) )
Expand Down Expand Up @@ -831,10 +837,6 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, in
); );
#endif #endif
} }
else
{
QgsDebugMsg( "empty tile size" );
}


return mCachedImage; return mCachedImage;
} }
Expand Down

0 comments on commit 251aca6

Please sign in to comment.