[OpenLayers-Users] Can multiple mouse handler controls be active?

Rohan Parkes melanchthon76 at gmail.com
Sun Aug 21 19:38:18 EDT 2011


I have a vector layer displaying geometries, with a selectFeature control.
When the user selects a feature, one or more vector layers become active on
top of the lowest layer, displaying geometries that abut the selected
geometry. Additionally, there is a top layer with icons that displays a
popup containing infomation about the abutting geometry when clicked.

The icon layer is implemented as a vector layer rather than as a marker
layer. (The documentation seems to indicate that the marker layer type is
deprecated. There were additional reasone why this wasn't the favoured
solution.) To make the icons clickable, I have added a customised click
control to that layer, inspired by an example in the OL demos.

The problem is that when active, the click control seems to be preventing
the clicks from permeating to the featureSelect control, so that when the
top icon layer displays, the user can no longer select a geometry on the
lowest layer. This is not a problem in IE, but is in every other browser.

The Feature handler in the click control has parameters called stopClick and
stopDown that seem to be designed to allow mouse events to permeate, but
setting them to true has no effect (and in any case, as they default to
false, they should be causing the same problem in IE).

Is it possible to have multiple controls active that respond to mouse
events? Otherwise, can anyone suggest a better implementation for what I am
trying to build?

Rohan Parkes
Melbourne
Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110822/de5b5e50/attachment.html


More information about the Users mailing list