Skip to content

Commit

Permalink
Merge pull request #4267 from camptocamp/GSGMF-658-Kml-print
Browse files Browse the repository at this point in the history
Missing layer param in style function call
  • Loading branch information
fredj committed Sep 26, 2018
2 parents 71e5d19 + a176846 commit ec186c6
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/print/VectorEncoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,9 @@ exports.prototype.encodeVectorLayer = function(arr, layer, resolution) {
const originalFeature = features[i];

let styleData = null;
let styleFunction = originalFeature.getStyleFunction();
const styleFunction = originalFeature.getStyleFunction() || layer.getStyleFunction();
if (styleFunction !== undefined) {
styleData = styleFunction.call(originalFeature, resolution);
} else {
styleFunction = layer.getStyleFunction();
if (styleFunction !== undefined) {
styleData = styleFunction.call(layer, originalFeature, resolution);
}
styleData = styleFunction.call(layer, originalFeature, resolution);
}
const origGeojsonFeature = this.geojsonFormat.writeFeatureObject(originalFeature);
/**
Expand Down

0 comments on commit ec186c6

Please sign in to comment.