Const
Use editor.addFeature(geojson) with a GeoJSON Feature instead, e.g. editor.addFeature({type: 'Feature', properties: {featureClass: 'NAVLINK'}, geometry: {type: 'LineString', coordinates: [[lon, lat], [lon, lat]]}}).
editor.addFeature(geojson)
editor.addFeature({type: 'Feature', properties: {featureClass: 'NAVLINK'}, geometry: {type: 'LineString', coordinates: [[lon, lat], [lon, lat]]}})
Deprecated
Use
editor.addFeature(geojson)with a GeoJSON Feature instead, e.g.editor.addFeature({type: 'Feature', properties: {featureClass: 'NAVLINK'}, geometry: {type: 'LineString', coordinates: [[lon, lat], [lon, lat]]}}).