I'm having the case where I want to add a modify interaction over GeoJSON (loaded from URL) that is created previously, while changing the existing geometry without adding new vertices, but I get new vertices created where the original geometry not changed (images below, unfortunately gif is large), the first image shows the original geometry
the second image shows what happen after I grab some end and move it.
this is the code I'm using:
fetch("url").then(res=>res.json()).then(
(data)=>{
let vectorSource = new ol.source.Vector({
features:new ol.format.GeoJSON().readFeatures(data)
})
let vectorLayer = new ol.layer.Vector({
source: vectorSource
})
let modification_interaction = new ol.interaction.Modify({
source: vectorSource,
insertVertexCondition: false
})
this.olmap.map.addInteraction(modification_interaction)
this.olmap.map.addLayer(vectorLayer)
}
OpenLayers version is v6.4.3,
ol.events.condition.never
, orfunction(){return false}