Pullup r2999:3087 for RC2.

svn merge trunk/openlayers/@2999 trunk/openlayers/@HEAD branches/openlayers/2.4/



git-svn-id: http://svn.openlayers.org/branches/openlayers/2.4@3088 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-04-20 01:10:43 +00:00
parent b6fb16153c
commit b5103eb8ce
58 changed files with 1399 additions and 503 deletions

View File

@@ -106,36 +106,72 @@ 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().
*
* @param {OpenLayers.Feature.Vector} feature
* @param {Object} style
* @private
*/
drawFeature: function(feature, style) {
if(style == null) {
style = feature.style;
}
this.drawGeometry(feature.geometry, style, feature.id);
},
/**
* 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}
* @param {String} featureId
* @private
*/
drawGeometry: function(geometry, style) {},
drawGeometry: function(geometry, style, featureId) {},
/**
* virtual function
*
* Clear all vectors from the renderer
*
* @private
*/
clear: function() {},
/**
* 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) {},
/**
* This is called by the layer to erase features
* @param {Array(OpenLayers.Feature.Vector)} features
* @private
*/
eraseFeatures: function(features) {
if(!(features instanceof Array)) {
features = [features];
}
for(var i=0; i<features.length; ++i) {
this.eraseGeometry(features[i].geometry);
}
},
/**
* virtual function
@@ -143,6 +179,7 @@ OpenLayers.Renderer.prototype =
* Remove a geometry from the renderer (by id)
*
* @param geometry {OpenLayers.Geometry}
* @private
*/
eraseGeometry: function(geometry) {},