Select to view content in your preferred language

Cannot Edit Using Javascript API Sample

1828
12
02-10-2013 01:57 AM
junespina
Emerging Contributor
Hi,

Our organization is trying to implement a simple web editing mapping application using the Javascript API sample on the ArcGIS Resource Center. This is what we did.
a. We Downloaded the application
b. Edited the snippet for defining the Center
c. Add our feature service layer published through our ArcGIS Server
d. We also downloaded the ASP.NET proxy page and modified it per instructions from the resource center.

we noticed that the sample works (Editing) only when it is not downloaded. But when we downloaded it, the editing feature seems to be disabled...

Any Ideas?

Thanks in advance...

Jun
0 Kudos
12 Replies
DianaBenedict
Frequent Contributor
Hello,

Its been days, since i've posted this thread, at our end we tried doing everything from step 1. unfortunately the edit function still doesn't work...and its getting to be a bit frustrating...

can i ask, is there anyone who actually used the Javascript API sample, particularly the edit function, that worked?

I hope the guys from ESRI from the javascript department would help...thanks


Jun



Jun
I have been using the editing functionality with the Javascript API successfully.  I am able to edit ArcSDE data from both 10.0 or 10.1. After SP1 was realeased, I have also been able to edit SDE Data that is stored in 9.3.1 (seems like they fixed that issue).

Below is a list of "todo" to make sure that your data is editable:
1) Make sure you can edit the SDE data from within the MXD that you use to publish your service.  Editor --> start editing.  Select a feature or two and make a minor change then save the edits and confirm you do not get any errors.  If you do then more than likely you are encountering permission issues.
2) In ArcMap, verify that the data that you are editing all come from one SDE connection (keep note of this connection information).  Essentially, you want to have 1 mxd/service that contains the data that you are editing (points to SDE).  Do not add any reference data to this MXD.  You will want 1 or more seperate MXDs for your "reference" data.  To make things simple, I would only add 1 SDE layer in your "edit feature service" mxd.
3) IMPORTANT: In order to edit data via your feature service, you MUST Add a "Data Source" to you ArcGIS server.  If you do not do this you will see an error when you attempt to "analyze" and publish your feature service.  Use your ArcCatalog GIS Server connection to add a data source. This Data Source must match the SDE connection mentioned above. You can simply import the same connection information.
4) Verify the "Geodatabase Connection Properties" matches the "transactional version" that you are connecting to in your ArcMap MXD.  (In ArcCatalog r-click the connection --> Geodatabase Connection Properties) verify against the MXD data source (TOC--> source tab) all of this should match up with the right version).
5) Publish the service: if all is done above correctly then you should get no Errors (maybe warnings).
6) Confirm your Proxy is working correctly.  Use Firefox --> Firebug or Chrome (ctrl + shift+ i) to view the network traffic and errors OR IE9 F12 (refresh the page so you can see if all is well with your app)

Good Luck
0 Kudos
JoseSanchez
Frequent Contributor
Diana,

When using SDE  with JavaScript do you post/reconcile with JavaScript or open the version with ArcMap to post?

Thanks
0 Kudos
JeffPace
MVP Alum
There is no post and reconcile in javascript.  You are editing in the version posted (or version defined at 10.2) and its last in last out .

That version would then be reconciled back at the office, or you could publish a geoprocessing tool to do it
0 Kudos