Select to view content in your preferred language

iOS app - Editing JSON

5880
12
10-24-2011 12:39 PM
AliciaSoto
Occasional Contributor
Hello everyone,

I have been playing with the iOS app and the JSON settings. I'm not knowledgeable enough yet to create my own iOS application. (plus I don't have an Intel-based Macintosh)

I'm currently working with my own data off ArcGIS Server 10. I've managed to get my data to display as an operational layer on top of a basemap by editing the JSON.

{
  "version" : "1.3",
  "operationalLayers" : [
    {
       "url" : "http://myservername/ArcGIS/rest/services/maps/MyData/MapServer",
       "visibility" : true,
       "opacity" : 1,
       "title" : "Layers"
     }],
   "baseMap" : {
   "baseMapLayers" : [
     {
       "id" : "World_Topo_Map8225",
       "opacity" : 1,
       "visibility" : true,
       "url" : "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
      }],
    }
}


Everything works great, but is it possible to add an 'identify' tool to my app by only editing the JSON script? without publishing the data on arcgis online?

Thank you for your time.
0 Kudos
12 Replies
AliciaSoto
Occasional Contributor
Your formatting is slightly off. For a map service you do not have to set the service URL for each individual layer within a map service.


Ah! Now it makes sense to me!

Thank you!
0 Kudos
DustinEdgeman
New Contributor
Can anyone help me with my JSON? We have our own ArcGIS server and I've been able to add multiple maps accessible via iOS applications, however, I have also been having problems with the changes no longer allowing me to identify features. Attached is the JSON I have tried based on all the forums I have read but when I try to open the map from an iOS device I get the error that the map can't be opened. Anyone have any thoughts?
0 Kudos
AliciaSoto
Occasional Contributor
Can anyone help me with my JSON? We have our own ArcGIS server and I've been able to add multiple maps accessible via iOS applications, however, I have also been having problems with the changes no longer allowing me to identify features. Attached is the JSON I have tried based on all the forums I have read but when I try to open the map from an iOS device I get the error that the map can't be opened. Anyone have any thoughts?


When I run your JSON through the validator, I get this error:

Parse error on line 5:
...id": "Online_Myname""visibility": true,
-----------------------^
Expecting '}', ':', ',', ']'


It looks like you're missing a comma or something
0 Kudos