[OpenLayers-Dev] Change layer in the control activate
Helder Brandão
helder.brandao at gmail.com
Mon Feb 16 10:53:00 EST 2009
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20090216/0befa305/attachment.html
More information about the Dev
mailing list