Hi guys,
I got problem.
I can add new feature without problem, but when i want to select and update feature it does not select to update.
I use JS 4.15 Version.
Here is a code i use.
Help please
//Add Regulator
var urduli = new FeatureLayer({url: "http://LocalHost:6080/arcgis/rest/services/test/aragvi_service/FeatureServer/4",
title:"Regulator",
visible: true,
outFields:["*"],
})
map.add(Regulator)
var editor = new Editor({
view: view,
layerInfos: [{
layer: Regulator, // pass in the feature layer
fieldConfig: [ // Specify which fields to configure
{
name: "Comments",
label: "კომენტარი"
}],
enabled: true, // default is true, set to false to disable editing functionality
addEnabled: true, // default is true, set to false to disable the ability to add a new feature
updateEnabled: true, // default is true, set to false to disable the ability to edit an existing feature
deleteEnabled: true // default is true, set to false to disable the ability to delete features
}]
});
view.ui.add(editor, "top-right");
One thing to check is that your service allows for updates. Go into ArcGIS Server manager and examine the service properties to see if the update operation is permitted.
It is usually switched on by default for Feature services, so it would be only if you or someone turned it off.
Hi vakhtang zubiashvili, to debug this, open your developer tool, F12 on chrome
when you click on ok/add/update on your editor, it will trigger a http request to your feature layer
http://LocalHost:6080/arcgis/rest/services/test/aragvi_service/FeatureServer/4
and hit the rest endpoint I think it is applyEdit
You can copy that URL and change the format from f=json to f=html which will present you with a HTML page for updating the feature. You can then debug from there to know what went wrong.
Hope that helps
I'm also facing this issue. The update is not working. Once I click update, it doesn't trigger any HTTP requests! Nothing happens.
How can I fix this? I'm using version 4.27.0
I am encountering the same problem with the ArcGIS API Editor widget for JavaScript version 4.27.0. Like you, when I click the update button, no HTTP request is initiated and no action is taken.
Here are a few things I have checked so far:
Making sure the layers have editing enabled on the server side.
I'm still working on the problem, but I was wondering if you've had any success since your post. If you've found a solution, I'd love to hear about it.
async initializeEditor() {
const [Editor] = await loadModules(['esri/widgets/Editor']);
await Variables._self._view.when();
const layers = Variables._self.map.layers.toArray();
const snappingOptions = {
enabled: true,
selfEnabled: true,
featureEnabled: true,
updateEnabled: true,
featureSources: layers.map((layer) => ({ layer })),
};
const editor = new Editor({
view: Variables._self._view,
updateEnabled: true,
snappingOptions: snappingOptions,
});
Variables._self._view.ui.add(editor, 'top-right');
}
I see that this topic is stopped, any solution?
Any progress on this topic?