changed the renderer's getRenderLayer method to getRenderLayerId, which

always works even if the layer is not added to a map. Also removed an 
unneeded map.events.unregister from Control.SelectFeature. r=elemoine
(closes #2022)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9160 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2009-04-01 13:43:53 +00:00
parent 59c49eb98e
commit b1c11b9814
4 changed files with 13 additions and 18 deletions

View File

@@ -898,17 +898,16 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {
},
/**
* Method: getRenderLayer
* Method: getRenderLayerId
* 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.
* used, this will be different from the id of 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).
* {String} the id of the output layer.
*/
getRenderLayer: function() {
return this.map.getLayer(this.root.parentNode.parentNode.id);
getRenderLayerId: function() {
return this.root.parentNode.parentNode.id;
},
/**