Use the feature style if defined
Same behavior as ol.layer.Vector
This commit is contained in:
@@ -176,9 +176,13 @@ ol.FeatureOverlay.prototype.handleMapPostCompose_ = function(event) {
|
|||||||
var frameState = event.frameState;
|
var frameState = event.frameState;
|
||||||
var pixelRatio = frameState.pixelRatio;
|
var pixelRatio = frameState.pixelRatio;
|
||||||
var resolution = frameState.viewState.resolution;
|
var resolution = frameState.viewState.resolution;
|
||||||
var i, ii, styles;
|
var i, ii, styles, featureStyleFunction;
|
||||||
this.features_.forEach(function(feature) {
|
this.features_.forEach(function(feature) {
|
||||||
styles = styleFunction(feature, resolution);
|
featureStyleFunction = feature.getStyleFunction();
|
||||||
|
styles = goog.isDef(featureStyleFunction) ?
|
||||||
|
featureStyleFunction.call(feature, resolution) :
|
||||||
|
styleFunction(feature, resolution);
|
||||||
|
|
||||||
if (!goog.isDefAndNotNull(styles)) {
|
if (!goog.isDefAndNotNull(styles)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user