SelectFeature control can now select across multiple vector
layers when passed an array of layers instead of a single layer with the constructor. This changeset also introduces a new layer type, Layer.Vector.RootContainer, which will be set as the topmost layer by the SelectFeature control and collect the svg/vml/canvas roots of multiple vector layers. r=crschmidt (closes #1666) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9116 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -445,6 +445,23 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: display
|
||||
* Hide or show the Layer
|
||||
*
|
||||
* Parameters:
|
||||
* display - {Boolean}
|
||||
*/
|
||||
display: function(display) {
|
||||
OpenLayers.Layer.prototype.display.apply(this, arguments);
|
||||
// we need to set the display style of the root in case it is attached
|
||||
// to a foreign layer
|
||||
var currentDisplay = this.div.style.display;
|
||||
if(currentDisplay != this.renderer.root.style.display) {
|
||||
this.renderer.root.style.display = currentDisplay;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: addFeatures
|
||||
|
||||
Reference in New Issue
Block a user