private void OnCheckAutoPanMode(object commandParameter)
{
if (Controller == null) return;
if (commandParameter is AutoPanModeChangedEventArgs)
{
var e = commandParameter as AutoPanModeChangedEventArgs;
if (e.OldMode == AutoPanMode.CompassNavigation && e.OldMode != e.NewMode)
{
Controller.ResetMapRotation();
}
}
}