[OpenLayers-Dev] Fwd: [Patch] Smoother dragging of the map on older computers

Håkon haakeyar-mailinglists at bluezone.no
Tue Nov 6 15:58:02 EST 2007


Hi,

The wiki said that I should mail the list after posting a patch to
trac, so here I am. Description from trac:
"When the openlayers map is dragged around, a lot of events are sent,
and the map is updated on every one of them, which takes quite some
time. Because of this, the map feels slow, especially on old
computers. This can be solved by creating a short timeout when the
event is received, which will update the map a little later. Any
events inbetween are ignored.

I created a patch with a possible way to implement this. It passes the
unit tests and it appears to work well in most browsers (tested in
Firefox 2, Opera 9.5 Beta and IE 6 (IEs for Linux)). If you run the
two versions side by side, you can really feel a difference.

The updateMap-method in my patch would probably be more logical as an
anonymous function in the timeout-call, but then a the function would
have been created every time the timeout is created instead of only
once when OSM is loaded.

I don't know the code structure in OpenLayers very well, so there
might be better ways to implement it."

It was pointed out that maybe the ticket was created under the wrong
component. I have no idea, so I'll have to ask some of you whether it
is in the right position, and if not, where it should be.

The wiki also said that I should state clearly that I wanted the patch
reviewed, so, ehm... I want the patch reviewed.



More information about the Dev mailing list