[OpenLayers-Users] Profmance (continuation of an topic from august)

Christopher Schmidt crschmidt at metacarta.com
Thu Dec 7 12:51:23 EST 2006


On Thu, Dec 07, 2006 at 09:46:04AM -0800, Gary Townsend wrote:
> Was reading through the topic posted on performance in august and we just
> moved from openlayers 1.0 to 2.2  and have noticed a significant increase in
> wait time. Panning isn't as big a concern for us since the portion of our
> site that uses Openlayers is just a search engine to define an Area Of
> Interest and then find imagery based on that AOI. We had been using untiled
> imagery because of the benefits we saw interms of it presenting an
> interlaced image to the user faster with which the user could actually
> define an AOI before the image was done loading.
> 
>  
> 
> So when comparing our two versions of the same image search engine, the one
> with OL1.0 and OL2.2 I noticed that the 2.2 is loading an image of 1500x900
> in size behind the viewport. Is there anyway to reduce that? I tried the
> following but to no avail.

OpenLayers 2.2 uses a 'ratio' option on the untiled layer: you want to
set that to 1.0 to get the same untiled behavior you had with 1.0. This
is ideal if your user is most likely not going to drag the map at all,
but OpenLayers is optimized for the 'dragging the map' case, and a ratio
of '2' was seen as the best compromise for most purposes.

So, simply replace your 'buffer':1 with 'ratio': 1.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list