Unusual behavior with rotation and zooming

Discussion created by jeggert_vpi on Feb 23, 2012

I'm working on a project that is using ESRI ArcGIS Client 2.4, and we have been stuck with a small issue.  Our application pans and rotates the map based on updates from a vehicle, and there is a zoom control for the user.  When we disable the rotation option, everything works fine.  With the rotation enabled, and no zooming occurs, also everything is normal.  However, when the user rapidly zooms in and out, while the vehicle is moving and rotating, our application has a chance to become unresponsive.

During debugging, when everything is running normally, our override for GetTileSource will usually get called on average about 20-30 times when zooming in to the highest level, followed by a receipt of ExtentEventArgs event indicating the extent has changed.  When our system does get hung up, I've observed that our GetTileSource method is called several thousand times without receiving an ExtentEventArgs event. Since ESRI is busy loading these thousands of tiles, it is holding up our UI.  We aren't sure why ESRI is trying to load that many tiles.

We thought it could have been because of 2 events happening at the same time (zoom and rotate), so we placed our redraw method inside a lock, to ensure that we performing a Client.Map.ZoomTo while it was still processing a change to Client.Map.Rotation, but that lock didn't change any behavior.

Any suggestions on what is causing ESRI to load 100 times the amount of tiles it normally does, and how to work around that?

Thank you.