How do I disable zoom/pan animation?

4482
17
03-10-2017 01:17 AM
BjørnarSundsbø1
Occasional Contributor II

In the Runtime for WPF I was able to disable animation of zoom and pan by changing ZoomDuration and PanDuration to 0ms. I felt this resulted in a much faster experience navigating the map, and the users agreed. However, in the Runtime for .NET, this doesn't seem possible. MapView performs a zoom with a hard coded value of true for animate for the core map, and I'm not able to affect what this value can be. Is there any way I can interact with the core map to disable the animation, or at least overriding the duration value? Navigating my old map in the WPF implementation is so much more responsive than the same basemap in the .NET implementation.

I expect the runtime will not get more releases, and v100 is not ready for our needs, so we will stick with the previous release. But at least this is a feature request for the v100 API. Animations can be nice, but should at least be configurable or optional  

17 Replies
JenniferNery
Esri Regular Contributor

Thanks for your feedback. We did have global setting for zoom and pan duration.

In v100, you can also use SetViewpoint which will not have animation, or provide shorter TimeSpan in these methods: SetViewpointAsync with Timespan and SetViewpointAsync with Timespan and AnimationCurve if done in code.

But I think you mean while interacting with the map no code-behind just flick and zoom, you have no control over the animation speed, is that correct?

0 Kudos
BjørnarSundsbø1
Occasional Contributor II

I'm aware of the SetViewpoint overloads. And you are correct, I mean the direct map interaction options for double tap, pinch, wheel and flick/drag.

0 Kudos
dotMorten_esri
Esri Notable Contributor

It's on our backlog, but not currently possible to disable.

0 Kudos
BjørnarSundsbø1
Occasional Contributor II

I've started looking at 100.2.0, and I can not find a way to control the animation speed. It would be very convenient to have it available on MapViewInteractionOptions.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Are you referring to the zoom speed when double-click/mouse-wheeling on the map? Or the SetViewpointXXXX methods?

0 Kudos
BjørnarSundsbø1
Occasional Contributor II

Double click, mouse wheel and pan using mouse.

On a slightly related topic, I just upgraded to the latest version from 10.2.7 today, and experience in my actual application that zoom wheel just changes the scale but keeps the center. In my test application, it zooms around the mouse cursor. Any immediate thoughts on why this would happen? I haven't had the time to investigate or create a mockup, but perhaps you might know. This was not the case before upgrading. 

0 Kudos
dotMorten_esri
Esri Notable Contributor

As Jennifer mentioned above, there's currently no API for setting the zoom speed or amount at this point. You can disable zoom interaction, listen for double-click/wheel yourself and call the SetViewpoint methods manually if you'd like.

10.2.7 and v100.x hasn't changed behavior wrt centering. Zoom has always been around the mouse cursor.

Wrt to pan speed, the pan is the exact speed of the mouse. When you subsequently "flick" the map, it's relies on the system settings for this (I believe it's configurable in the control panel).

0 Kudos
BjørnarSundsbø1
Occasional Contributor II

Ok, thanks. Was initially referring to your previous mention that it was on your backlog. But apparently not yet added to a release yet

There must be something in my application causing the zoom center issue, since it doesn't occur in my test app. Will investigate more when I'm back at the office.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Sorry... our backlog is rather large . Unfortunately we haven't discovered the secret to infinite resources, so some things with higher priority gets done before others. I'll see what I can do to get it placed in a release in the near future.

0 Kudos