mapbox-gl-draw
mapbox-gl-draw copied to clipboard
Tracking changes in draw.update
Hello,
I'm using draw.update event and I want to know which parts of a feature have been changed when the action is change_coordinates. The feature collection contains the feature as is after the change, but I don't know which coordinates/vertex have changed. Is there a way to get the changed values?
I'm no expert but I think you could to use turf.
You should keep your copy of old data and then use the event data to compare them both.
Suggestion: draw.update
must have both parameters, previousFeatures
and currentFeatures
.