Skip to content
Permalink
Browse files

Bump up the tile request limit in WMS provider

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 adc88f247a4f5087a0bdb9aba8cf277ee6d50be3
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/wms/qgswmsprovider.cpp
@@ -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

0 comments on commit adc88f2

Please sign in to comment.
You can’t perform that action at this time.