Restore MapBase.ViewScale property

This commit is contained in:
ClemensFischer 2022-11-02 19:49:18 +01:00
parent 10f89b0da9
commit 14c26b34e8
3 changed files with 26 additions and 0 deletions

View file

@ -215,6 +215,12 @@ namespace MapControl
set => SetValue(AnimationEasingFunctionProperty, value);
}
/// <summary>
/// Gets the scaling factor from cartesian map coordinates to view coordinates,
/// i.e. pixels per meter, as a read-only dependency property.
/// </summary>
public double ViewScale => (double)GetValue(ViewScaleProperty);
/// <summary>
/// Gets the ViewTransform instance that is used to transform between cartesian map coordinates
/// and view coordinates.
@ -770,6 +776,8 @@ namespace MapControl
}
}
SetViewScale(ViewTransform.Scale);
OnViewportChanged(new ViewportChangedEventArgs(projectionChanged, Center.Longitude - centerLongitude));
centerLongitude = Center.Longitude;