[OpenLayers-Users] Custom drag:done handler interferes with map-dragging

Christopher Schmidt crschmidt at metacarta.com
Thu Jun 19 12:21:02 EDT 2008


On Thu, Jun 19, 2008 at 06:18:28PM +0200, Claudius Henrichs wrote:
> Hello there,
> 
> I want to perform a map update (getting new markers) each time dragging 
> the map has finished. What i tried so far ended up in the map-dragging 
> getting disabled:
> 
>    // Create a drag handler
>    var draghandler = new OpenLayers.Handler.Drag(this, {done: function() 
> {this, updatemarkers();}} );
> 
>    // Attaching the draghandler to the map
>    draghandler.setMap(map);
> 
>    // Activate draghandler
>    draghandler.activate();
> 
> What can I do better?

map.events.register("moveend", null, updatemarkers);

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list