Select to view content in your preferred language

Editor Widget with Local Feature Service

1306
8
01-23-2013 06:59 PM
JordanFaulkner
Emerging Contributor
Hi guys and girls,

I'm in the process of prototyping a web app using the ArcGIS JavaScript API, and I've taken the code from: "http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/ed_editing_widget" along with the measurement widget sample and some more simple layout stuff. I'm using a local feature service and I have ran into an error primarily with the editor widget. Whenever a polygon is drawn, the shape is not saved to the map by that I mean when I double click to finish the shape, it disappears from the map. Additionally when I try to delete other polygons already on the feature layer they are not deleted, also moving or reshaping polygons appears to work but when the map is panned or zoomed the changes revert back.

Is it a permissions or is there a setting that needs to be set on the feature layer?

Thanks for any help.
Jordan Faulkner
0 Kudos
8 Replies
JohnGravois
Deactivated User
what do you mean "local" feature layer?

have you tried using web developer tools or fiddler to inspect the web traffic which results from your attempts to pass an edit?  it sounds like they are probably failing, and your best hope is to take a closer look at what you are attempting to pass.
0 Kudos
JordanFaulkner
Emerging Contributor
"Request URL:
http://localhost:33180/proxy.ashx?http://ingisd01/ArcGIS/rest/services/Tokanui/tokanui_paddocks_nztm...
Request Method:
POST
Status Code:
404 Not Found"

is what I get when using dev tools to see requests made. This suggest some mistake in the proxy location on my part.

By local feature I mean it is being hosted on a local private server, along with a basemap I am using.
0 Kudos
JordanFaulkner
Emerging Contributor
No need to worry, the issue has been resolved! Silly mistake was made on my part!
0 Kudos
GaneshSolai_Sambandam
Regular Contributor
No need to worry, the issue has been resolved! Silly mistake was made on my part!


Hi John
I am getting the same error on my side. Can you tell me or put some of your sample code to fix mine.

In my case, I have around 9 feature layers, out of which there 6 point feature layer, 1 line feature layer and 2 polygon feature layer.

The editing is  working fine for 7 of the feature layers (although 1 polygon feature layer is working), 2 of them are not working (line and polygon).

When I draw a line for line feature layer, I get drawing tool get activated and when I double click to complete the task, the new feature doesn't appear on the map. when I checked the post request on the map - I am getting a status of 200 and it means edit has been succesfull. I don't know where the problem is?

Secondly, when I click the line and polygon feature layer, I get error message from IE saying my script is running slow.

Can anyone help me on this, please.

Regards
Ganesh
0 Kudos
JohnGravois
Deactivated User
@ganesh,
in addition to checking the response status, it would also be helpful to inspect the response JSON text to confirm whether or not your edit has been completed successfully.
0 Kudos
GaneshSolai_Sambandam
Regular Contributor
@ganesh,
in addition to checking the response status, it would also be helpful to inspect the response JSON text to confirm whether or not your edit has been completed successfully.


Hi Jon
Thank you very much for your support. Can you tell me how to check to JSON text to confirm edit has been completed?
0 Kudos
JohnGravois
Deactivated User
using fiddler (or browser developer tools) find the request passed to the applyEdits operation of your particular feature service layer and inspect the response itself to make sure that it includes '"success":true' (see attached screenshot).

[ATTACH=CONFIG]30997[/ATTACH]
0 Kudos
GaneshSolai_Sambandam
Regular Contributor
using fiddler (or browser developer tools) find the request passed to the applyEdits operation of your particular feature service layer and inspect the response itself to make sure that it includes '"success":true' (see attached screenshot).

[ATTACH=CONFIG]30997[/ATTACH]


Hi Jgravois
Extremely thank you for your help.

I versioned the ARCSDE feature class and it is working fine. For some reason, the feature class within ARCSDE was corrupted even
though it was versioned before. I export feature class as xml workspace document and reimported back into the ARCSDE geodatabase and versioned the newly imported feature class and it is now working perfectly alright on web editing.

Regards
Ganesh
0 Kudos