cyohman

Error in Navigating the Map Tutorial

Discussion created by cyohman on Jan 20, 2010
Latest reply on Feb 22, 2010 by cyohman
First off, I know I have other threads to respond to in the forums. I wanted to bring to light the small error here:

http://help.esri.com/en/ArcGIsmobile/9.4/apis/iPhone/Concepts/00PW0000001W000000.htm

AGSEnvelope *envelope = [AGSEnvelope envelopeWithXmin:-124.83145667 ymin:30.49849464  ymin:30.49849464 xmax:-113.91375495  ymax:44.69150688  spatialReference:mapView.spatialReference];
      [self.mapView zoomToEnvelope:envelope];

should be:

AGSEnvelope *envelope = [AGSEnvelope envelopeWithXmin:-124.83145667  ymin:30.49849464 xmax:-113.91375495  ymax:44.69150688  spatialReference:mapView.spatialReference];
      [self.mapView zoomToEnvelope:envelope];

There's an extra ymin.

Also, how should centerAtPoint behave when called? I put the call provided in mapDidLoad, but it doesn't appear to work after the zoomToEnvelope call or with the zoomToEnvelope call commented out.

Thanks in advance and keep up the good work.

Outcomes