Select to view content in your preferred language

Unable to locate the json of a map

2081
3
10-04-2012 07:21 AM
AnamikaDas
Emerging Contributor
Hi

I am trying to host some maps on our arcgis server for IOS development. I am following the help at http://help.arcgis.com/en/arcgismobile/10.0/apis/iphone/AppGuide/Maps.pdf

For starters I have been trying to bring up the sample map that is provided by default on the server. I added the map to arcgis.online as mentioned in the document to get the item id and then trying to fetch the json from that item id. I tried both sharing the map with everybody and also by generating a user token.

http://www.arcgis.com/home/item.html?id=563f670ec7454f468365042a9353f6ca
http://www.arcgis.com/sharing/content/items/563f670ec7454f468365042a9353f6ca/data?f=pjson

However the web page remains blank and no json comes up like it is coming up for the sample. Can someone let me know what is going wrong here and how could I create a json for my map.
Tags (2)
0 Kudos
3 Replies
RussRoberts
Esri Notable Contributor
The item id you are using is coming from a map service item and not a web map. You will need to place this item within a web map and save it off. Then use the new web map id within the JSON extraction URL and you will be able to bring that JSON into your mobile content server.

Cheers
Russ
0 Kudos
AnamikaDas
Emerging Contributor
The item id you are using is coming from a map service item and not a web map. You will need to place this item within a web map and save it off. Then use the new web map id within the JSON extraction URL and you will be able to bring that JSON into your mobile content server.

Cheers
Russ


Thank you Russ for the reply. I was able to get the json for my sample web map now and I have added that to the
Text in the mobile server.

However when I am trying to use the url "http://vm64qajob29008:6080/arcgis/rest/services/SampleWorldCities/MapServer" in my xcode to bring up the map on my ipad, i just get a gray screen.

What could be going wrong here?

I am sorry if I am asking really basic questions here but I have just started working on this and any help will be greatly appreciated.

The xcode I am using :
AGSTiledMapServiceLayer *tiledLayer = [[AGSTiledMapServiceLayer alloc] initWithURL:[NSURL URLWithString:kTiledMapServiceURL]];

where:
#define kTiledMapServiceURL @"http://vm64qajob29008:6080/arcgis/rest/services/SampleWorldCities/MapServer"

My json:

{
  "operationalLayers": [],
  "baseMap": {
    "baseMapLayers": [{
      "id": "SampleWorldCities_5410",
      "opacity": 1,
      "visibility": true,
      "url": "http://vm64qajob29008:6080/arcgis/rest/services/SampleWorldCities/MapServer"
    }],
    "title": "SampleWorldCities"
  },
  "version": "1.6"
}

The extent I have defined is:
104.53020709870626,-25.471925275660684,75.35704494206294,51.908146633940035
0 Kudos
AnamikaDas
Emerging Contributor
I figured out the issue. The problem seems to be with the vpn connectivity on the IPAd. I was able to view the map in the IPAD simulator.

Thanks.
0 Kudos