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:
@@ -27,6 +27,12 @@ OpenLayers.Renderer = OpenLayers.Class({
|
||||
*/
|
||||
container: null,
|
||||
|
||||
/**
|
||||
* Property: root
|
||||
* {DOMElement}
|
||||
*/
|
||||
root: null,
|
||||
|
||||
/**
|
||||
* Property: extent
|
||||
* {<OpenLayers.Bounds>}
|
||||
@@ -237,6 +243,32 @@ OpenLayers.Renderer = OpenLayers.Class({
|
||||
* geometry - {<OpenLayers.Geometry>}
|
||||
*/
|
||||
eraseGeometry: function(geometry) {},
|
||||
|
||||
/**
|
||||
* Method: moveRoot
|
||||
* moves this renderer's root to a (different) renderer.
|
||||
* To be implemented by subclasses that require a common renderer root for
|
||||
* feature selection.
|
||||
*
|
||||
* Parameters:
|
||||
* renderer - {<OpenLayers.Renderer>} target renderer for the moved root
|
||||
*/
|
||||
moveRoot: function(renderer) {},
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* To be overridden by subclasses that implement moveRoot.
|
||||
*
|
||||
* Returns:
|
||||
* {<OpenLayers.Layer.Vector>} the output layer, if any (i.e. this method
|
||||
* will not return a layer if the layer is not added to a map).
|
||||
*/
|
||||
getRenderLayer: function() {
|
||||
return this.map.getLayer(this.container.id);
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Renderer"
|
||||
});
|
||||
Reference in New Issue
Block a user