iPhone SDK cannot access a particular map service

1244
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
DiveshGoyal
Esri Regular Contributor
I think so. Something appears to be a problem in the service, I cannot preview it in Javascript either. Is there anything unusual about the mxd or how this service was created?

_
Divesh
0 Kudos
raghurenga
New Contributor
You have created a folder like "WhereTo" ,Which says You are using "Geometry" service and again there is a folder "WhereTo/Island_Base" Which says you are not using any service

This service will work in normal ESRI arcgis server application but for the iPhone application

"WhereTo/Island_Base" this makes problem..
0 Kudos
JithenSingh
Esri Contributor
This works fine? I have attached a screenshot showing this. Are you still having problems?

Cheers
0 Kudos
KaushikT
New Contributor
Hello Guys,


I need to develop the application using the onemap . Can anyone pls guide me how to load the basemap in the iPhone. I have downloaded iPhone SDK also the sample in which I see that we need to specify the URL from which the tiles of the map is loaded. I am not able to get that url w.r.t oneMap. It would be helpful if someone here can help me out.

Thank you
0 Kudos
NimeshJarecha
Esri Regular Contributor
The ArcGIS for iOS SDK does not support OneMap. You can use ESRI layers (Tiled, Dynamic, Feature Layer etc.) or Bing or Open Street maps only.

Regards,
Nimesh
0 Kudos
KaushikT
New Contributor
Thank you for the reply ..  Actually I tried loading the map in the view using the one map server. I use that for loading tiles. Its working fine.


But I am facing problem in adding multiple pins for the locations. It crashes while I tap on the pins for showing the callout.  Inside the AGSMapView class it crashes due to _EXC_BAD_ACCESS while didProcessSingleClick: and shouldShowCallAtPoint: is called. Did anyone face the similar problem . I used GeocodingDemo as the sample for reference.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Good to know that onemap is working.

Are you retaining the callout?

Regards,
Nimesh
0 Kudos
KaushikT
New Contributor
Hi Nimesh


It was the problem because of the callout template object , which I was creating when every time I drop the Pin using tap and hold. Every time the new instance was created .


Thank  You
0 Kudos
NimeshJarecha
Esri Regular Contributor
Good to know that you got it working now.

Regards,
Nimesh
0 Kudos