Version

Using Map Window Animation

The Map Window Animation feature provides functionality for changing how the xamMap™ control’s window is animated when panning or zooming operations occur. You can change mode and duration of the map window animation using control’s WindowAnimationMode and WindowAnimationDuration properties respectively.

There are three scenarios that you need to consider while using map window animation:

  • If the map is composed of map layer(s) and map tile source provider then animation for zooming and panning respects WindowAnimationMode and WindowAnimationDuration values;

  • If the map contains only map layer(s) then animation is done according to WindowAnimationMode and WindowAnimationDuration values;

  • If the map contains only map tile source provider then the animation is done according to the algorithm in the MultiScaleImage property’s type object.

The following table lists all supported animation modes and their description.

WindowAnimationMode Description

Map window steps from one position to another and the WindowAnimationDuration is ignored.

Map window moves at constant speed from one position to another using the WindowAnimationDuration

Map window moves smoothly from one position to another using the WindowAnimationDuration

Map window accelerates and decelerates from one position to another using the WindowAnimationDuration

The following snippet shows how to add logarithmic map window animation with 2-seconds duration in the xamMap control.

In XAML:

<ig:XamMap x:Name="igMap"
           WindowAnimationMode="Logarithmic"
           WindowAnimationDuration="0:0:2" >
</ig:XamMap>

In Visual Basic:

Me.igMap.WindowAnimationMode = MapWindowAnimationMode.Logarithmic
Me.igMap.WindowAnimationDuration = TimeSpan.FromMilliseconds(2000)

In C#:

this.igMap.WindowAnimationMode = MapWindowAnimationMode.Logarithmic;
this.igMap.WindowAnimationDuration = TimeSpan.FromMilliseconds(2000);