Hello,
I'm not able to get the Editor widget to work with a GeoJSONLayer in the 4.22 version, but in the 4.21 version with the same code, it works. I don't believe the configuration has changed at all, which is why I'm confused. The first screenshot is Editor widget working correctly in 4.21, the second is the same code in 4.22. Im swapping out the versions in the script tag.
Im also getting a typescript error when building with ES modules in the same situation:
Is someone able to check if this is happening to them?
Solved! Go to Solution.
Hi there,
At 4.22, we added GeoJSONLayer.editingEnabled property on GeoJSONLayer and by default it is set to false. GeoJSONLayer did not editingEnabled property in previous versions of 4.21 and editing was allowed without this check. Please set the editingEnabled to true in your GeoJSONLayer constructor and it should solve the problem you are running into.
Hi there,
At 4.22, we added GeoJSONLayer.editingEnabled property on GeoJSONLayer and by default it is set to false. GeoJSONLayer did not editingEnabled property in previous versions of 4.21 and editing was allowed without this check. Please set the editingEnabled to true in your GeoJSONLayer constructor and it should solve the problem you are running into.
ahh thank you so much Undral, totally missed that in the documentation!
do you have any idea why Typescript is complaining about layer not being of type Feature Layer? Is this expected behavior @UndralBatsukh ?
which explains that teh docs say that in typescript this is not possible and you must cast geoJSON layer to Featur Layer, ive done that and it works but field configs object does not work. thanks,