AnsweredAssumed Answered

Basic zooming issue.

Question asked by sjmahmud on Sep 20, 2015
Latest reply on Sep 21, 2015 by Gagandeep_Singh-esristaff

Hi, I'm trying to use esri map for the first time in my iOS app POC. I have instantiated the map object but I seem to have a problem zooming to user current location using AGSEnvelope object. Here is code:


CLLocation *location = self.myLocationManager.location;

float extentDelta = 0.025;

AGSEnvelope *envelope = [AGSEnvelope envelopeWithXmin:(location.coordinate.longitude - extentDelta)

   ymin:(location.coordinate.latitude -  extentDelta)

   xmax:(location.coordinate.longitude + extentDelta)

   ymax:(location.coordinate.latitude +  extentDelta)

   spatialReference:[AGSSpatialReference wgs84SpatialReference]];

  [self.ibMapView zoomToEnvelope:envelope animated:YES];


It is zooming into North Sea near UK. I am sure the CLLocation is coming with my current location. Please help.