[OpenLayers-Users] Too many tiles being loaded

Eric Lemoine eric.lemoine at camptocamp.com
Tue Mar 16 02:04:29 EDT 2010


On Monday, March 15, 2010, Dylan Parry <me at dylanparry.com> wrote:
> Hi,
>
> I’ve got a layer on one of my maps and it seems to be loading many more
> tiles than are actually necessary for the viewport. Looking at the
> screen, it would probably suffice to load in maybe 10 tiles at most, but
> it seems to be loading upwards of 60 each time, which means that zooming
> in takes ages to load any tiles that are actually in the viewport as
> it’s too busy loading in ones outside it! The code I’ve got for the
> layer is:
>
> layer = new OpenLayers.Layer.TMS("Layer", "…", { 'type':'png',
> 'getURL':getMapUrl }, { 'buffer':0 });

have you tried setting "buffer" in the same object as "type" and
"getURL"? I'm not sure TMS takes four args (sorry I can't check right
now).

Cheers,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list