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:
ahocevar
2009-03-22 14:25:18 +00:00
parent 5c26d578ca
commit 2b1e8641f9
14 changed files with 552 additions and 59 deletions

View File

@@ -810,6 +810,26 @@ OpenLayers.Renderer.VML = OpenLayers.Class(OpenLayers.Renderer.Elements, {
return node;
},
/**
* Method: moveRoot
* moves this renderer's root to a different renderer.
*
* Parameters:
* renderer - {<OpenLayers.Renderer>} target renderer for the moved root
* root - {DOMElement} optional root node. To be used when this renderer
* holds roots from multiple layers to tell this method which one to
* detach
*
* Returns:
* {Boolean} true if successful, false otherwise
*/
moveRoot: function(renderer) {
var layer = this.map.getLayer(this.container.id);
layer && this.clear();
OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this, arguments);
layer && layer.redraw();
},
/**
* Method: importSymbol
* add a new symbol definition from the rendererer's symbol hash