[OpenLayers-Dev] moveend, zoomend, and dragend events

Eric Lemoine eric.c2c at gmail.com
Fri Jul 18 07:53:40 EDT 2008


On Fri, Jul 18, 2008 at 11:01 AM, Pierre GIRAUD <bluecarto at gmail.com> wrote:
> Hi all,
>
> Sorry to bother with such a discussion once more, but I still don't
> feel happy with the way we handle map events.
>
> If I'm correct, we are not really able to know that the map has only
> been panned. What if we want to distinguish a zoom and a simple pan ?
> We can't !
>
> To fix that, here are 2 different proposals :
>  - add a "panend" event, which would be triggered when the map is
> finished panned,
>  - trigger the "moveend" event with an object as argument with a
> "zoomChanged" property (and mark the "zoomend" event as deprecated).
>
> I'm personally in favor of the second one because it simplifies the
> code by decreasing the number of different events.

I'm +1 on the second option.

Thanks,
--
Eric



More information about the Dev mailing list