[OpenLayers-Dev] Fwd: [Patch] Smoother dragging of the map on
cameron.shorter at gmail.com
Tue Nov 6 22:58:47 EST 2007
Great idea. I haven't looked at the code, but am interested to know:
* Some events which get resent, like mouse moves when panning are ok to drop
* Other one-off events, like click to query should not be dropped.
Are you able to distinguish between the two?
> 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.
> Dev mailing list
> Dev at openlayers.org
Geospatial Systems Architect
Tel: +61 (0)2 8570 5050
Mob: +61 (0)419 142 254
Think Globally, Fix Locally
Commercial Support for Geospatial Open Source Software
More information about the Dev