jamesrichards

Inconsistent behavior with zoomToEnvelope method

Discussion created by jamesrichards on May 10, 2010
Latest reply on May 17, 2010 by jamesrichards
Hi,

I've been experimenting with the iPhone SDK and noticed an inconsistent behavior with the zoomToEnvelope method.

I created an app with a simple map and a button that calls zoomToEnvelope. This works as expected the first time. Then I panned the map away from the envelope, and clicked the button again. Nothing happened, the map does not zoom to the envelope. Then I pinch zoomed in or out and clicked the button again. This time it worked. I confirmed that the function was being called each time through log messages and stepping through in the debugger.

I played around with this quite a bit, and it seems that zoomToEnvelope does not work unless the current scale of the map is different than the target scale of the new envelope.

I've observed this behavior in both the Simulator and on my iPod Touch device. I am using the latest beta of the ArcGIS iPhone SDK and OS version 3.1.3.

Is this the expected behavior or a possible bug?

Thanks!

James

Outcomes