Rename renderFeatureFunction to renderGeometryFunction

This commit is contained in:
Tom Payne
2013-11-20 14:44:44 +01:00
parent 381eef2cfb
commit b11c34261b
+15 -14
View File
@@ -8,7 +8,7 @@ goog.require('ol.source.Vector');
* @enum {string} * @enum {string}
*/ */
ol.layer.VectorProperty = { ol.layer.VectorProperty = {
RENDER_FEATURE_FUNCTION: 'renderFeatureFunction', RENDER_GEOMETRY_FUNCTION: 'renderGeometryFunction',
STYLE_FUNCTION: 'styleFunction' STYLE_FUNCTION: 'styleFunction'
}; };
@@ -36,16 +36,17 @@ goog.inherits(ol.layer.Vector, ol.layer.Layer);
/** /**
* @return {function(ol.Feature): boolean|undefined} Render feature function. * @return {function(ol.geom.Geometry): boolean|undefined} Render geometry
* function.
*/ */
ol.layer.Vector.prototype.getRenderFeatureFunction = function() { ol.layer.Vector.prototype.getRenderGeometryFunction = function() {
return /** @type {function(ol.Feature): boolean|undefined} */ ( return /** @type {function(ol.geom.Geometry): boolean|undefined} */ (
this.get(ol.layer.VectorProperty.RENDER_FEATURE_FUNCTION)); this.get(ol.layer.VectorProperty.RENDER_GEOMETRY_FUNCTION));
}; };
goog.exportProperty( goog.exportProperty(
ol.layer.Vector.prototype, ol.layer.Vector.prototype,
'getRenderFeatureFunction', 'getRenderGeometryFunction',
ol.layer.Vector.prototype.getRenderFeatureFunction); ol.layer.Vector.prototype.getRenderGeometryFunction);
/** /**
@@ -70,18 +71,18 @@ ol.layer.Vector.prototype.getVectorSource = function() {
/** /**
* @param {function(ol.Feature): boolean|undefined} renderFeatureFunction * @param {function(ol.geom.Geometry): boolean|undefined} renderGeometryFunction
* Render feature function. * Render geometry function.
*/ */
ol.layer.Vector.prototype.setRenderFeatureFunction = ol.layer.Vector.prototype.setRenderGeometryFunction =
function(renderFeatureFunction) { function(renderGeometryFunction) {
this.set( this.set(
ol.layer.VectorProperty.RENDER_FEATURE_FUNCTION, renderFeatureFunction); ol.layer.VectorProperty.RENDER_GEOMETRY_FUNCTION, renderGeometryFunction);
}; };
goog.exportProperty( goog.exportProperty(
ol.layer.Vector.prototype, ol.layer.Vector.prototype,
'setRenderFeatureFunction', 'setRenderGeometryFunction',
ol.layer.Vector.prototype.setRenderFeatureFunction); ol.layer.Vector.prototype.setRenderGeometryFunction);
/** /**