wlang-esrisa-esridist

iPhone SDK cannot access a particular map service

Discussion created by wlang-esrisa-esridist on Apr 19, 2010
Latest reply on Mar 13, 2012 by dking-esristaff
I hope someone can help us with this. We are currently testing the iPhone SDK.

We are not able to load a map onto the iPhone from the following map server:
http://www.whereto.sg/WMGIS01/rest/services/WhereTo/Island_Base/MapServer

We are using the default MapView project that came with the ESRI iPhone SDK.

We�??ve tried the following URLs for the Tiled Map Service Layer in the MapView project:
http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer (It works. Street Map being displayed)
http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer (It works. Imagery Map being displayed)
http://www.onemap.sg/ArcGIS/rest/services/basemap/MapServer (It works. OneMap being displayed)


We've performed http request/response tracing for the above as well. When the URL is set to http://www.whereto.sg/WMGIS01/rest/services/WhereTo/Island_Base/MapServer , it did perform a request to it and receives the response in json string, but proceed no further.

The following HTTP Request is being sent from the iPhone App when using it as the Tiled Map Service Layer:
OneMap: http://www.onemap.sg/ArcGIS/rest/services/basemap/MapServer?f=json
WhereTo.sg: http://www.whereto.sg/WMGIS01/rest/services/WhereTo/Island_Base/MapServer?f=json

Comparing the json strings returned from the various servers, one difference we can spot is the 'layer' definition section, which we've extracted and shown below:
 
OneMap:
  "layers" : [
    {
      "id" : 0,
      "name" : "IMAP_GD.COAST_LINE",
      "parentLayerId" : -1,
      "defaultVisibility" : true,
      "subLayerIds" : null
    }
  ],

ESRI Street Map:
"layers" : [
    {
      "id" : 0,
      "name" : "World Street Map",
      "parentLayerId" : -1,
      "defaultVisibility" : true,
      "subLayerIds" : null
    }
  ],

Whereto.sg:
"layers" : [
   
  ],


We're not sure if that is the reason that the map failed to show.

For OneMap, the layer is 0, and this url http://www.onemap.sg/ArcGIS/rest/services/basemap/MapServer/0?f=json returns the json string for layer 0.
For ESRI Street Map, the layer is also 0, and this url http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/0?f=json returns the json string for layer 0.
For whereto.sg, there is no layer definition.

Is this the reason why the map failed to load?

Outcomes