[OpenLayers-Users] controlling number of off-edge tiles that loads

Christopher Schmidt crschmidt at metacarta.com
Sun Jul 29 17:10:58 EDT 2007


On Sun, Jul 29, 2007 at 08:18:11PM +0100, Barry Hunter wrote:
> This is almost certainly a very simple question, and I sure I saw something
> mentioning this somewhere, but darned if can find it now...
> 
> Anyway I have created a custom layer, which is based on the WMS layer - it
> all works great and displays fine. However many more tiles than are needed
> are fetched,  this is understandable its 'precaching' tiles so that the user
> can drag in any direction quickly.
> 
> For example only 24 tiles are needed to fill the whole screen (including
> part tiles) - however 52 tiles are retrieved, this is a bit overkill, I
> would be happy with the user having to wait a bit rather than download that
> many tiles unneeded. I guess there is simple setting to adjust this?

http://dev.openlayers.org/docs/files/OpenLayers/Layer/Grid-js.html#OpenLayers.Layer.Grid.buffer

WMS('a', 'url', {'params':'here'}, {buffer: 0})

-- Chris



More information about the Users mailing list