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:
@@ -331,12 +331,6 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {
|
||||
*/
|
||||
rendererRoot: null,
|
||||
|
||||
/**
|
||||
* Property: root
|
||||
* {DOMElement}
|
||||
*/
|
||||
root: null,
|
||||
|
||||
/**
|
||||
* Property: xmlns
|
||||
* {String}
|
||||
@@ -887,6 +881,36 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {
|
||||
*/
|
||||
createNode: function(type, id) {},
|
||||
|
||||
/**
|
||||
* Method: moveRoot
|
||||
* moves this renderer's root to a different renderer.
|
||||
*
|
||||
* Parameters:
|
||||
* renderer - {<OpenLayers.Renderer>} target renderer for the moved root
|
||||
*/
|
||||
moveRoot: function(renderer) {
|
||||
var root = this.root;
|
||||
if(renderer.root.parentNode == this.rendererRoot) {
|
||||
root = renderer.root;
|
||||
}
|
||||
root.parentNode.removeChild(root);
|
||||
renderer.rendererRoot.appendChild(root);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: getRenderLayer
|
||||
* Gets the layer that this renderer's output appears on. If moveRoot was
|
||||
* used, this will be different from the layer containing the features
|
||||
* rendered by this renderer.
|
||||
*
|
||||
* Returns:
|
||||
* {<OpenLayers.Layer.Vector>} the output layer, if any (i.e. this method
|
||||
* will not return a layer if it is not added to a map).
|
||||
*/
|
||||
getRenderLayer: function() {
|
||||
return this.map.getLayer(this.root.parentNode.parentNode.id);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: isComplexSymbol
|
||||
* Determines if a symbol cannot be rendered using drawCircle
|
||||
|
||||
Reference in New Issue
Block a user