[OpenLayers-Dev] Re: OSM layer panning at trunk

christopher.schmidt at nokia.com christopher.schmidt at nokia.com
Thu Mar 3 11:04:23 EST 2011


There are two changes in OpenLayers that explain this:

 1. We only request new tiles when the mouse has stopped for a short delay.
(This is tileLoadingDelay on the Layer, defaults to 100). This is to prevent
constant shifting of tiles while panning, which was hurting performance. This
can be changed to the 2.10 behavior by setting this delay to 0, as I understand
it. 

 2. We load a smaller buffer. The default buffer of 2 that was used in previous
    releases was really not designed for the way tiles are usually made available
    today: tiles these days are both much larger (an OSM tile near my house 
    *averages* 11k, some being up to 50k!), and faster to load. Because of this, 
    rather than loading, for example, 42 tiles for a 500x500px map, we set the
    buffer to 0, loading only 12 -- and saving up to 300KB in data transferred
    in the default case.
  
    Setting this to 2 will get you the previous behavior, but if your'e on a 
    device which is not lagging by dragging, setting the tileLoadingDelay to 
    0 may be a wiser choice.

-- Chris

On Mar 3, 2011, at 2:35 AM, ext Denis Rykov wrote:

> Thanks for reply. I've changed buffer property and now all works flawlessly!
> 
> On Thu, Mar 3, 2011 at 1:33 PM, Bruno Binet <bruno.binet at camptocamp.com> wrote:
>> Or because of this:
>> http://trac.osgeo.org/openlayers/ticket/2998
>> 
>> On 3 March 2011 08:11, Bart van den Eijnden (OSGIS) <bartvde at osgis.nl> wrote:
>>> The default value of buffer was changed from 2 to 0, which probably
>>> explains this?
>>> 
>>> Best regards,
>>> Bart
>>> 
>>>> http://gis-lab.info/share/DR/sandbox/osm-release.html
>>>> http://gis-lab.info/share/DR/sandbox/osm-trunk.html
>>>> 
>>>> On Thu, Mar 3, 2011 at 1:01 PM, Denis Rykov <rykovd at gmail.com> wrote:
>>>>> Hi devs!
>>>>> I've made two examples with different version of OpenLayers - 2.10 and
>>>>> trunk version.
>>>>> Both examples contains map with one OSM layer and shows different
>>>>> behavior while map panning.
>>>>> I guess that at the second (trunk) example while panning tiles loads
>>>>> only after moveend event, but in the first example it does not.
>>>>> Could anyone explain this behavior?
>>>>> 
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Dev mailing list
>>> Dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>>> 
>> 
>> 
>> 
>> --
>> Bruno Binet
>> 
>> Camptocamp France SAS
>> Savoie Technolac, BP 352
>> 73377 Le Bourget du Lac, Cedex
>> 
>> Mail : bruno.binet at camptocamp.com
>> http://www.camptocamp.com
>> 
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev



More information about the Dev mailing list