[OpenLayers-Users] Two Controls at the same time
Shadin
shadin__a at hotmail.com
Sat Dec 21 23:51:00 PST 2013
I have a problem about modifying control for multiple layers .
on the map there are tow layers i would like to modify.
in addition for the second layer, i have a select control to show a popup
i tried:
layer1_control=new OpenLayers.Control.ModifyFeature(layer1, {
id: "ModifyFeatureControl1",
mode:
OpenLayers.Control.ModifyFeature.RESIZE |
OpenLayers.Control.ModifyFeature.DRAG});
layer2_control= new OpenLayers.Control.ModifyFeature(layer2, {
id: "ModifyFeatureControl2",
mode:
OpenLayers.Control.ModifyFeature.DRAG});
layer2.events.on({
featureselected: function(e) {
createPopup(e.feature);
},
featureunselected: function (e) {
}
});
the problem is these controls are not working in same time. only the last
added layer control!
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Two-Controls-at-the-same-time-tp5095390.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list