I am having some problems using the JS Editing samples. Features geometry changes are not being saved. After a page refresh the feature changes revert to the original size, location, etc.
Thanks.
-Will
Solved! Go to Solution.
Hi Will,
Feature classes that are published as feature services do not have to be registered as versioned. What samples are you running into issues with?
Hi Will,
Feature classes that are published as feature services do not have to be registered as versioned. What samples are you running into issues with?
Move and edit vertices | ArcGIS API for JavaScript
and
Editor widget | ArcGIS API for JavaScript
I setup and tested the proxy.ashx page which appears to be working.
The only error I am seeing (in the console) on creating features is a syntax error but with no error code.
It appears that edits are being made to the database since I can move features (polygons) and update attributes, but as soon as I pan the map or refresh the page, the changes disappear.
database: oracle
AGS: 10.2
JSAPI: 3.15
Data is published with schema owner connection and feature service (Feature Access) selected with options checked to add, update, delete, etc.
Thanks.
Will
What is the JSON response of the edit request? I'd imagine that the application makes it seem like the edit is going through, but the request fails at the Rest API. If the request is actually failing, the response should show the error in JSON. You can also take a look at the Server logs for any indication of why the edit is failing. Finally, see if you can submit the request directly at the REST endpoint to eliminate any application level issues.
Not sure how to check the JSON response, unless you are referring to the response in the console. The message in the console is "syntax error" with no error code.
[object Error]{description: "Syntax error", log: undefined, message: "Syntax error", name: "SyntaxError", number: -2146827286}
I have successfully tested deletes and attribute updates at rest endpoint.
Is there a way I can test a simple delete from the javascript application? I have a feeling that the proxy is the cause.
Thanks.
Finally solved this problem by changing the feature service rest endpoint url to the web adaptor Url. Http over 6080 was the problem.
Working great now!
Will,
Just to add to Jakes reply. Here is the documentation link to Authoring Feature Services
Author feature services—Documentation (10.3 and 10.3.1) | ArcGIS for Server
Versioned and nonversioned geodatabase data is supported. Esri recommends you use nonversioned in feature services, because nonversioned data scales better for editing. There are some nonsimple data types (for example, network edges), however, that must be versioned for you to edit them through a feature service.