Skip to content

Commit

Permalink
Add simplifyFactor to esri-feature layer
Browse files Browse the repository at this point in the history
This allows SMK configuration to specify a "simplifyFactor" value to increase performance for layers with many complex features.
  • Loading branch information
michaelpnelson committed Jun 26, 2023
1 parent 769397d commit 87c4b26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/smk/viewer-leaflet/layer/layer-esri-feature-leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ include.module( 'layer-leaflet.layer-esri-feature-leaflet-js', [ 'layer.layer-es
cfg.drawingInfo.renderer.symbol.url = ( new URL( cfg.drawingInfo.renderer.symbol.url, document.location ) ).toString()
}

if (layers[0].config.simplifyFactor) {
cfg.simplifyFactor = layers[0].config.simplifyFactor;
}

const overlayPane = self.map.getPane('overlayPane');
const layerPane = self.map.createPane(layers[0].config.id, overlayPane);
layerPane.style.zIndex = zIndex;
Expand Down

0 comments on commit 87c4b26

Please sign in to comment.