[OpenLayers-Dev] New DragFeature Control and SelectFeatureControl cross layers. Want to share

Andreas Hocevar ahocevar at opengeo.org
Thu Jan 15 10:10:37 EST 2009

Hi Andre,

2009/1/13 Andre Pereira de Matos <andre.matos at co.sapo.pt>:
> I have made a Project with openlayers, and at some point I had to make a new
> handler and a new control to provide draggable feature and handle events
> like, click, mouseover, mouseout in features that was in different layers.
> The Openlayers control (DragFeature, SelectFeature) and handlers (Drag,
> Feature) only works if the features are all in the same layer and the layer
> is on the top.

I have no experience with the DragFeature control, but I have created
a solution for feature selection that works with multiple layers
recently [1]. An example is also avaialable [2].

You may want to check this out, and I'd be interested to see your
approach. Also, it would be cool to see if my approach also works with
the DragFeature control.


[1] http://trac.openlayers.org/ticket/1666
[2] http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html

Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

More information about the Dev mailing list