[OpenLayers-Users] Marker events don't get propagate

Claudio V. claudio.carvalho at lemaf.ufla.br
Wed Sep 5 10:38:22 PDT 2012


Hello, this is my first time here on the list after using OpenLayers for a
couple of months and only now I've faced a problem I couldn't solve
directly from documentation:
When I add a Markers Layer and populate it I can capture the marker's
events normally and display a popup, for example. But that only works when
the Markers Layer is on top, if it the last one added.
My code looks like the following:

marker.events.register("mousedown", this, function(){ /* show popup */ });

I've tried using
    marker.events.register("mousedown", this, function(){ /* show popup
*/ }, true);
and
    marker.events.register("mousedown", this, function(){ /* show popup
*/ }, {'extension':true});
but I'm not sure that's the problem.

Whenever I add another layer, even if it isn't overlapping the markers, I
can't listen to their events.
How should I proceed to capture these events when the layer isn't on top?
Is using "marker.events.register()" the right way? Or maybe there's a
control for that? I'm kind of lost, so any help would be very appreciated.

Thanks in advance and sorry for the English.
Claudio V.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120905/dd6bd148/attachment-0001.html>


More information about the Users mailing list