Hi list! I have customized a control that work with 3 different layers. The control is initializing with one of three layers and i insert the selectFeature control.
initialize: function(layer) { this.layer = layer; (...) this.selectControl = new OpenLayers.Control.SelectFeature( layer, selectOptions ); this.mensagem = window.Mensagens[2]; this.virtualStyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['test']); this.virtualStyle.fillOpacity = 0.9; this.virtualStyle.strokeOpacity = 0.9; this.virtualStyle.fillColor = "red"; }, I can change the layers and draw the features in the activate: activate: function() { (...) this.layer = layer; this.selectFeature = layer; (...) } My problem is when i try select a feature in the layer: i can select only in the layer where i initialize (when i change the layer in the initialize of the control i can select the features). I see the openlayers trac (select features in multiple layers): http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html But it doesn't work! Any idea List? Best regards, Helder Brandão -- View this message in context: http://n2.nabble.com/Change-layer-in-the-control-activate-tp2335536p2335536.html Sent from the OpenLayers Dev mailing list archive at Nabble.com.
_______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev