1

I've been trying to edit data in a FeatureService, hosted on my own ArcGIS Server (I'm not using ArcGIS Online).

I have created a map in my ArcGIS Server's Mobile Content Directory, using the following JSON:

{
    "version" : "1.1",
    "operationalLayers" : [{
            "url" : "http://example.com/ArcGIS/rest/services/Bridges/FeatureServer/0",
            "visibility" : true,
            "opacity" : 0.75,
            "title" : "Bridges"
        }
    ],
    "baseMap" : {
        "baseMapLayers" : [{
                "url" : "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
            }
        ],
        "title" : "World Topographic Map"
    }
}

I've reached upto this point, by using Dave Bouwman's Blog and this ESRI Documentation.

I can add the map to the ArcGIS App on my Android Device. The data shows up, but the Edit tool (the little pencil Icon) does not show up.

Using this video from ESRI, I can get an editable map via ArcGIS online, but I want an editable map without ArcGIS Online.

Is it possible to edit a feature service directly, without using ArcGIS Online?

  • You've tagged this as arcgis-10.0 but is that the precise version of ArcGIS for Server that you are using? – PolyGeo Dec 5 '13 at 4:47
  • @PolyGeo: Yes we are still stuck on ArcGIS Server 10.0; – Devdatta Tengshe Dec 5 '13 at 5:09
1

The Linked pdf said

...the best way to understand the JSON format is to look at examples from ArcGIS Online

On searching for ArcGIS web map JSON format, I found that ESRI does have some limited documentation for this JSON format here.

Though the documentation itself is sparse, the samples are more than helpful. The relevant sample in my case was: ArcGIS feature service operational layers.

If you look at the JSON, you will see that each featurelayer has a popup, as well at the entire object has a widgets property. This was the key to the whole problem.

I added these two things to my JSON Document, and republished in the Mobile Content Directory.

After this, I could view the attributes as well as edit the data in ArcGIS for Android.

My final JSON is something like this:

{
    "version" : "1.1",
    "operationalLayers" : [{
            "url" : "http://example.com/ArcGIS/rest/services/Bridges/FeatureServer/0",
            "visibility" : true,
            "opacity" : 0.75,
            "title" : "Bridges",
            "mode" : 1,
            "id" : 1,
            "popupInfo" : {
                "title" : "Bridge Info",
                "fieldInfos" : [{
                        "fieldName" : "BLC",
                        "label" : "Name",
                        "isEditable" : true,
                        "tooltip" : "",
                        "visible" : true,
                        "format" : null,
                        "stringFieldOption" : "textbox"
                    }
                ],
                "description" : null,
                "showAttachments" : false,
                "mediaInfos" : []
            }
            ],
            "baseMap" : {
                "baseMapLayers" : [{
                        "url" : "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
                    }
                ],
                "title" : "World Topographic Map"
            },
            "widgets" : {
                "editor" : {}
            }
        }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.