[OpenLayers-Dev] OpenLayer.Select.Feature and Root Container
geographika at gmail.com
Thu May 19 11:36:15 EDT 2011
The OpenLayer.Select.Feature allows either a single layer or an array of
layers to be passed into the constructor.
If an array of layers is passed to the control then all the layers are
collected up and put into a OpenLayers.Layer.Vector.RootContainer.
This caused an error where I could no longer set opacity on a layer when
it had been added to a select control e.g.
var map = new OpenLayers.Map('map');
var vectorLayer = new OpenLayers.Layer.Vector();
var tool = new OpenLayers.Control.SelectFeature([vectorLayer],
id="OpenLayers.Layer.Vector_37_root" style="opacity: 0.3;">
//vectorLayer.setOpacity(0.5); //will no longer work as the
"element is null" when trying to set the opacity
Should the setOpacity function be overriden in the
OpenLayers.Layer.Vector class to take this into account?
I can file this as a ticket if it is an issue rather than just my
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dev