Inconsistent behavior with zoomToEnvelope method

742
4
05-10-2010 09:41 PM
JamesRichards1
Occasional Contributor
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
0 Kudos
4 Replies
ChanceYohman
New Contributor
Could you attach your source code?
0 Kudos
JamesRichards1
Occasional Contributor
Here is the source code. The Locate button in the lower left is the one to try. It fires the showLocation method in MyFirstMapAppViewController.m. Let me know if you have any further questions.

Thanks!

James
0 Kudos
DiveshGoyal
Esri Regular Contributor
Thanks for reporting this. We'll look into it.

_
Divesh
0 Kudos
JamesRichards1
Occasional Contributor
Thanks Divesh. Please let us know what you find out.
0 Kudos