How can I get the new feature geometry after its modification in Openlayers 6? I'm listening to the modifyend event.
The source contains around 100 features. How can I do this?
var modify = new ol.interaction.Modify({
source: map_features_source
});
modify.on('modifyend', function (evt) {
console.log(evt.target);
});
map.addInteraction(modify);
I tried this:
evt.features.getArray()[0].getGeometry().getCoordinates()
but it's not working as I have many elements in the array evt.features.getArray(). I need to find the one that was modified.