Hi,
My question: Do we have to work with ArcGIS Runtime SDK for iOS in order to plot esri points x,y ?
I live in Portugal, and the city of Lisbon has many web services we can use, but I found myself in a big issue:
i.e (if I try to use one of the web services api they have at:
http://digc.cm-lisboa.pt/DIGC/...
and if I choose i.e. option /116/1 that stands for "traditional coffee shops" and get the first item
http://digc.cm-lisboa.pt/DIGC/...
Just take a look at the geo coordinates....
What the hell is Point:
X: -1024499,0043
Y: 4678426,5468
if I try to draw it on the map it doesn't correspond to the real Lat Long for that coffee shop.
Take a closer look at this link:
http://digc.cm-lisboa.pt/DIGC/...
Geometry Type: esriGeometryPoint
Extent:
XMin: -1028372.32756313
YMin: 4676782.25640479
XMax: -1011303.94154349
YMax: 4693079.50182223
Spatial Reference: 102113
//My question:
//Do we have to work with ArcGIS Runtime SDK for iOS in order to plot esri points x,y ?
- (void)viewDidLoad {
[super viewDidLoad];
NSURL *mapUrl = [NSURL URLWithString:@"http://services.arcgisonline.c..."];
AGSTiledMapServiceLayer *tiledLyr = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:mapUrl];
[self.mapView addMapLayer:tiledLyr withName:@"Tiled Layer"];
//
AGSSpatialReference *sr = [AGSSpatialReference spatialReferenceWithWKID:102113];
AGSEnvelope *env = [AGSEnvelope envelopeWithXmin:-1028372.32756313 ymin:4676782.25640479 xmax:-1011303.94154349 ymax:4693079.50182223 spatialReference:sr];
[self.mapView zoomToEnvelope:env animated:YES]
}What if you try the method "zoomToGeometry:withPadding:animated" to zoom directly to the point?
Hi Savio,
For me, the cafe appears to be in the right place.
So given that, I think your question is about Spatial References.
-1024499.0043,4678426.5468 (x,y in meters) is in Web Mercator Spatial Reference (usually known as WKID 102100 or 3857, but 102113 is an older identifier). This translates to 38.6974539920001,-9.20323083499994 as lat,lon.
You can do one of a few things:
So, you don't have to work with the Esri SDKs and APIs to use the data as it comes out of the service, but they can make your life a lot easier if you do.
Does this help?
Nick.