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:
@@ -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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user