Select to view content in your preferred language

iPhone SDK cannot access a particular map service

1309
10
04-19-2010 07:41 PM
Wee_LengAng
New Contributor
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?
0 Kudos
10 Replies
DeniseKing
Esri Regular Contributor
If a post provides the answer to your question, then we encourage you to mark the post as "the answer" by activating the green check mark  right of the post. You can also "vote" on posts that you find helpful by clicking the blue caret mark. More information about the ArcGIS Discussion Forums MVP Program found here.

Thank you,
Esri Support
0 Kudos