Select to view content in your preferred language

Encountered an issue with AGSGraphicsLayer

1950
2
07-22-2013 10:40 PM
Dominic_EdwayneRivera
New Contributor
I'm a newbie in ArcGIS, currently I'm trying out the CallOutSample project in ArcGIS website.

I could not display the callout layer when I replace the base map url to our local map, but when using a base map url the callouts   that I added  shows.  I only changed the URL map and added two more makers while I commented out the sample makers inside.


I attached two screenshot images to show what I'm talking about.
Currently using iOS SDK 10.1

Any advice or inputs are appreciated

Base map: http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer
Local map: http://e1.onemap.sg/arcgis/rest/services/SM128/MapServer



Thanks
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: technobrat

I think the markers that you've added contain coordinates that don't match the local map's spatial reference.
Most probably, the coordinates are in web mercator, and that's why they line up correctly on the base map (which is also in web mercator spatial reference).

To get things to work with the local map, adjust the coordinates of the markers based on that map's spatial reference.
0 Kudos
Dominic_EdwayneRivera
New Contributor
I'm using the wgs84SpatialReference to convert the Core Location coordinates.
wgs84SpatialReference seems to work in Android.

self.mapPoint = [AGSPoint pointWithX:103.84186149088200 y:1.37064698975933 spatialReference:[AGSSpatialReference wgs84SpatialReference]];
  self.mapPoint = (AGSPoint *)[engine projectGeometry:self.mapPoint toSpatialReference:[AGSSpatialReference webMercatorSpatialReference]];


Are there other spatial reference I can use to correct the coordinates of the markers on the map?


thanks
0 Kudos