O'Reilly logo

Building Web Applications with ArcGIS by Hussein Nasser

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding ArcGIS's editing capabilities

Currently, the food and drinks layer is being fetched as a read-only map service located at the URL: http://arcgismachine:6080/arcgis/rest/services/Bestaurants/MapServer/0. The only difference is that it points to the enterprise geodatabase. You can see the following code in mybestaurants.html which confirms that:

//load the food and drinks layer into an object
lyr_foodanddrinks = new esri.layers.FeatureLayer("http://arcgismachine:6080/arcgis/rest/services/Bestaurants/MapServer/0", { outFields: ["*"] } 
);

We won't be able to edit MapServerlayer, we have to use FeatureServer. We will show how to change this in the next section.

Adding or updating records in a service with ArcGIS JavaScript API is simple. We only ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required