Version 4.7.0: Fixed UWP MapBase.CenterPoint

This commit is contained in:
ClemensFischer 2018-03-11 21:03:44 +01:00
parent 05cf3e7d3d
commit 9566c2d708
3 changed files with 20 additions and 6 deletions

View file

@ -39,6 +39,10 @@ namespace MapControl
nameof(TargetHeading), typeof(double), typeof(MapBase),
new PropertyMetadata(0d, (o, e) => ((MapBase)o).TargetHeadingPropertyChanged((double)e.NewValue)));
internal static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register(
"CenterPoint", typeof(Windows.Foundation.Point), typeof(MapBase),
new PropertyMetadata(new Windows.Foundation.Point(), (o, e) => ((MapBase)o).CenterPointPropertyChanged((Windows.Foundation.Point)e.NewValue)));
public MapBase()
{
MapProjection = new WebMercatorProjection();
@ -61,5 +65,10 @@ namespace MapControl
UpdateTransform();
};
}
private void CenterPointPropertyChanged(Windows.Foundation.Point center)
{
CenterPointPropertyChanged(new Location(center.Y, center.X));
}
}
}