Skip to content

Commit

Permalink
Fix FeatureLayer.refresh for moved point layers (#1304)
Browse files Browse the repository at this point in the history
* fix layer.refresh for moved point layers

* added call to `redraw` to update symbol/style after geometries are updated

* also redraw features

* revert

Co-authored-by: jwasilgeo <[email protected]>
  • Loading branch information
patrickarlt and jwasilgeo authored Feb 14, 2022
1 parent b993131 commit ead4338
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Layers/FeatureLayer/FeatureLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export var FeatureLayer = FeatureManager.extend({
layer.setLatLngs(latlngs);
break;
}

// update symbol/style
this.redraw(layer.feature.id);
},

/**
Expand Down Expand Up @@ -127,12 +130,8 @@ export var FeatureLayer = FeatureManager.extend({
);
}

// update geometry if necessary
if (
layer &&
this.options.simplifyFactor > 0 &&
(layer.setLatLngs || layer.setLatLng)
) {
// update geometry if the layer already existed.
if (layer && (layer.setLatLngs || layer.setLatLng)) {
this._updateLayer(layer, geojson);
}

Expand Down

0 comments on commit ead4338

Please sign in to comment.