Call setRenderIntent on the feature, not the layer

This commit is contained in:
ahocevar
2013-11-08 17:35:59 +01:00
parent d2281c4868
commit 7cf636147b
3 changed files with 46 additions and 46 deletions

View File

@@ -175,6 +175,20 @@ ol.Feature.prototype.setGeometry = function(geometry) {
};
/**
* Changes the renderIntent for this feature.
* @param {string} renderIntent Render intent.
*/
ol.Feature.prototype.setRenderIntent = function(renderIntent) {
this.renderIntent = renderIntent;
var geometry = this.getGeometry();
if (!goog.isNull(geometry)) {
this.dispatchEvent(new ol.FeatureEvent(
ol.FeatureEventType.INTENTCHANGE, this, geometry.getBounds()));
}
};
/**
* Set the symbolizers to be used for this feature.
* @param {Array.<ol.style.Symbolizer>} symbolizers Symbolizers for this
@@ -196,7 +210,8 @@ ol.Feature.DEFAULT_GEOMETRY = 'geometry';
* @enum {string}
*/
ol.FeatureEventType = {
CHANGE: 'featurechange'
CHANGE: 'featurechange',
INTENTCHANGE: 'featureintentchange'
};