Call setRenderIntent on the feature, not the layer
This commit is contained in:
@@ -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'
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user