Remove ol.FeatureStyleFunction support
This commit is contained in:
@@ -364,14 +364,9 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
|
||||
*/
|
||||
const render = function(feature) {
|
||||
let styles;
|
||||
let styleFunction = feature.getStyleFunction();
|
||||
const styleFunction = feature.getStyleFunction() || vectorLayer.getStyleFunction();
|
||||
if (styleFunction) {
|
||||
styles = styleFunction.call(feature, resolution);
|
||||
} else {
|
||||
styleFunction = vectorLayer.getStyleFunction();
|
||||
if (styleFunction) {
|
||||
styles = styleFunction(feature, resolution);
|
||||
}
|
||||
styles = styleFunction(feature, resolution);
|
||||
}
|
||||
if (styles) {
|
||||
const dirty = this.renderFeature(
|
||||
@@ -384,8 +379,8 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
|
||||
const features = [];
|
||||
vectorSource.forEachFeatureInExtent(extent,
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
*/
|
||||
* @param {ol.Feature} feature Feature.
|
||||
*/
|
||||
function(feature) {
|
||||
features.push(feature);
|
||||
}, this);
|
||||
|
||||
Reference in New Issue
Block a user