ASGPS location does not convert to spatial reference of basemap

528
0
12-06-2010 11:03 PM
KhairulNizam
New Contributor
Hi guys,

I'm trying to display the device location using this mapserver, but the coordinates are not converted to the correct spatial reference automatically. (It becomes 0,0)

http://www.onemap.sg/ArcGIS/rest/services/basemap/MapServer

Any ideas why this doesn't work? Thanks in advanced.

2010-12-07 16:51:48.231 Project R1[14243:207] AGSTiledMapServiceLayer SR: PROJCS["SVY21",GEOGCS["SVY21[WGS84]",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",28001.642],PARAMETER["False_Northing",38744.572],PARAMETER["Central_Meridian",103.8333333333333],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",1.366666666666667],UNIT["Meter",1.0]]

// NSLog(@"agsMapView gps enabled ? %@ : Location Device SR - %f, %f", agsMapView.gps.enabled ? @"Yes" : @"No", [agsMapView.gps currentLocation].coordinate.latitude, [agsMapView.gps currentLocation].coordinate.longitude);
// NSLog(@"agsMapView gps enabled ? %@ : Location Basemap SR - %f, %f", agsMapView.gps.enabled ? @"Yes" : @"No", [agsMapView.gps currentPoint].x, [agsMapView.gps currentPoint].y);

2010-12-07 16:51:48.534 Project R1[14243:207] UpdateLocation
2010-12-07 16:51:48.536 Project R1[14243:207] agsMapView gps enabled ? Yes : Location Device SR - -1.991306, -1.991307
2010-12-07 16:51:48.537 Project R1[14243:207] agsMapView gps enabled ? Yes : Location Basemap SR - 0.000000, 0.000000
0 Kudos
0 Replies