[OpenLayers-Users] Controls and map events

Eric Lemoine eric.c2c at gmail.com
Thu Jan 10 06:29:26 EST 2008


On Jan 9, 2008 1:18 PM, Attila Csipa <plists at prometheus.org.yu> wrote:
> Stiff familiarizing myself with OpenLayers, I ran into something I'm not sure
> is a design intention or am I simply doing something wrong: Controls do not
> have events, and if I have a control that operates on features, my map events
> get obstructed. Example - I have a Control.DragFeature on the map, but would
> also like that a single non-drag click (map.events.register("click"...))
> would result in a popup. The order of control/event addition/registration
> apparently did not have any effect on their behaviour - just clicking on
> features which were in a layer that was marked as a layer for DragFeature did
> nothing but change the cursor from draggable to normal. Essentially I'd like
> to do something like the fallThrough property of the Event class except
> controls AFAICS have no event properties. Am I being clueless again ? :)

Since pretty soon, the drag handler has a stopDown API property that
one can set to allow/disallow event propagation. You can try to do
dragControl.dragHandler.stopDown = true. Currently, there's no way to
set the drag handler options when initializing the drag feature
control. I think this is lacking.

--
Eric



More information about the Users mailing list