#628 - a feature has a geometry - a geometry doesn't have a feature - features are rendered, selected, moved, modified, etc - down in the renderer, expando properties on nodes are limited to _featureId, _style, and _options - this removes expandos that created circular references back through the map and to other dom elements - when the renderer is involved in selecting features, it returns a featureId (instead of a geometry or feature) and the layer is responsible for fetching the appropriate feature

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3043 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-04-10 16:07:56 +00:00
parent 8af1822d94
commit 645bff1286
21 changed files with 335 additions and 336 deletions
+21 -6
View File
@@ -106,13 +106,26 @@ OpenLayers.Renderer.prototype =
return this.resolution;
},
/**
* Draw the feature. The optional style argument can be used
* to override the feature's own style. This method should only
* be called from layer.drawFeature(). Implemented by a renderer
* subclass.
*
* @param {OpenLayers.Feature.Vector} feature
* @param {Object} style
*/
drawFeature: function(feature, style) {},
/**
* virtual function
*
* Draw a geometry on the specified layer.
* Draw a geometry. This should only be called from the renderer itself.
* Use layer.drawFeature() from outside the renderer.
*
* @param geometry {OpenLayers.Geometry}
* @param style {Object}
* @private
*/
drawGeometry: function(geometry, style) {},
@@ -127,15 +140,17 @@ OpenLayers.Renderer.prototype =
/**
* virtual function
*
* Returns a geometry from an event that happened on a layer.
* How this happens is specific to the renderer.
* Returns a feature id from an event on the renderer.
* How this happens is specific to the renderer. This should be
* called from layer.getFeatureFromEvent().
*
* @param evt {OpenLayers.Event}
*
* @returns A geometry from an event that happened on a layer
* @type OpenLayers.Geometry
* @returns A feature id or null
* @type String
* @private
*/
getGeometryFromEvent: function(evt) {},
getFeatureIdFromEvent: function(evt) {},
/**
* virtual function