Hi - we are trying to use the Editor widget (JS API 4.17) in our web app however it seems it automatically enables editing for all editable FeatureLayers and GeoJSON Layers. We want to disable add/edit for all the GeoJSON Layers - according to the documentation we could do that by providing `layerInfos` with the right flags - however, `layerInfos.layer` seems to only allow `FeatureLayer` (in TS typings and as described in the documentation) but not other types.
Force casting GeoJSONLayer type to "FeatureLayer" seems to work but it definitely isn't ideal - I'm wondering if this is an issue with the documentation & TS typings, or if there is a better way to do this?
Solved! Go to Solution.
I am new to the community. I am working on the geoJSON layer. I have added an editor to edit and add features to this layer. after edit, I need to save these edits or newly added features to GeoJson so I added one button and on click event, I am trying to send it to an external API to update my existing GEOJSON. But I am not able to access my geojson layer on button click event.Please help me with this.I appriciate your responce.