Skip to content

Commit

Permalink
Bump up the tile request limit in WMS provider
Browse files Browse the repository at this point in the history
Max. 100 tiles is just too low. The max request area is currently 2000x2000 pixels
which boils down to approx 8x8 tiles of size 256x256, therefore max 64 tiles.
However this is the ideal case if the view scale matches the scale of tiles.
If the map view scale is approx in between two levels, we may need 12x12 tiles
to serve the request, so bumping the maximum to 256 should be enough.
  • Loading branch information
wonder-sk committed Sep 13, 2016
1 parent 0259935 commit adc88f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -710,9 +710,9 @@ QImage *QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth, i
#if QGISDEBUG
int n = ( col1 - col0 + 1 ) * ( row1 - row0 + 1 );
QgsDebugMsg( QString( "tile number: %1x%2 = %3" ).arg( col1 - col0 + 1 ).arg( row1 - row0 + 1 ).arg( n ) );
if ( n > 100 )
if ( n > 256 )
{
emit statusChanged( QString( "current view would need %1 tiles. tile request per draw limited to 100." ).arg( n ) );
emit statusChanged( QString( "current view would need %1 tiles. tile request per draw limited to 256." ).arg( n ) );
return image;
}
#endif
Expand Down

0 comments on commit adc88f2

Please sign in to comment.