On 16/03/2010 06:04, Eric Lemoine wrote: > On Monday, March 15, 2010, Dylan Parry<m...@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).
Ah yes, you were right! Much better now, thanks, only 15 tiles per request, which is still more than enough to fill the viewport, but considerably fewer than the 60+ it was loading before. -- Dylan Parry _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users