[OpenLayers-Users] Turning default mouse actions on and off

Nick Whitelegg nick at hogweed.org
Fri Aug 25 13:32:39 CDT 2006


As part of a facility to allow users to calculate the distance by dragging the 
mouse along their route, I would like to turn the default drag action (i.e. 
moving the map) off, and then on again when the user has finished calculating 
the distance.

Turning it off seems easy enough, just do

map.events.remove('mousemove');

but how do I turn it back on again? I'd imagine something like

map.events.register('mousemove', map, defaultMoveAction)

but what should "defaultMoveAction" equal?

Thanks,
Nick


More information about the Users mailing list