Looking at this example, it seems possible to activate two controls at the same time, but on the same layer for this example. You can try to create each control separately and then activate them one after an other to make them working at the same time!

http://openlayers.org/dev/examples/highlight-feature.html

I didn't try this, but it seems possible!

Geoffrey


Le Wed, 03 Aug 2011 18:54:07 +0200, magiconair <[email protected]> a écrit:

I have a map with two vector layers "*devices*", "*geofences*". The
"*devices*" layer contains features not modifiable by the user (e.g. a
circle for each device). The "*geofences*" layer contains polygons which the
user has created with the DrawFeature() control.

What I would like to do is the following:

1. Catch 'hover' events on 'devices' (e.g. for displaying a popup)
2. Allow the user to click on a polygon and immediately edit it

For that I have a *SelectFeature* control on the '*devices*' layer and a
*ModifyFeature* control on the *geofences* layer. However, it doesn't seem
to be possible to have them *both active at the same time*. When both
controls are active the 'hover' works but the 'edit feature' does not.

I've setup an example based on the select-feature-multilayer example under
this link.

https://go-left.com/maptest/ol/examples/select-edit.html
https://go-left.com/maptest/ol/examples/select-edit.html

Any help or insight is highly appreciated.

Thanks
Frank

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/SelectFeature-and-ModifyFeature-tp6649428p6649428.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users


--
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to