mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update MapBase.Avalonia.cs
This commit is contained in:
parent
8948af0723
commit
e8aec18323
|
|
@ -48,7 +48,7 @@ namespace MapControl
|
||||||
|
|
||||||
public static readonly StyledProperty<Location> TargetCenterProperty =
|
public static readonly StyledProperty<Location> TargetCenterProperty =
|
||||||
DependencyPropertyHelper.Register<MapBase, Location>(nameof(TargetCenter), new Location(),
|
DependencyPropertyHelper.Register<MapBase, Location>(nameof(TargetCenter), new Location(),
|
||||||
async (map, oldValue, newValue) => await map.TargetCenterPropertyChangedAsync(newValue),
|
async (map, oldValue, newValue) => await map.TargetCenterPropertyChanged(newValue),
|
||||||
(map, value) => map.CoerceCenterProperty(value),
|
(map, value) => map.CoerceCenterProperty(value),
|
||||||
true);
|
true);
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ namespace MapControl
|
||||||
|
|
||||||
public static readonly StyledProperty<double> TargetZoomLevelProperty =
|
public static readonly StyledProperty<double> TargetZoomLevelProperty =
|
||||||
DependencyPropertyHelper.Register<MapBase, double>(nameof(TargetZoomLevel), 1d,
|
DependencyPropertyHelper.Register<MapBase, double>(nameof(TargetZoomLevel), 1d,
|
||||||
async (map, oldValue, newValue) => await map.TargetZoomLevelPropertyChangedAsync(newValue),
|
async (map, oldValue, newValue) => await map.TargetZoomLevelPropertyChanged(newValue),
|
||||||
(map, value) => map.CoerceZoomLevelProperty(value),
|
(map, value) => map.CoerceZoomLevelProperty(value),
|
||||||
true);
|
true);
|
||||||
|
|
||||||
|
|
@ -82,7 +82,7 @@ namespace MapControl
|
||||||
|
|
||||||
public static readonly StyledProperty<double> TargetHeadingProperty =
|
public static readonly StyledProperty<double> TargetHeadingProperty =
|
||||||
DependencyPropertyHelper.Register<MapBase, double>(nameof(TargetHeading), 0d,
|
DependencyPropertyHelper.Register<MapBase, double>(nameof(TargetHeading), 0d,
|
||||||
async (map, oldValue, newValue) => await map.TargetHeadingPropertyChangedAsync(newValue),
|
async (map, oldValue, newValue) => await map.TargetHeadingPropertyChanged(newValue),
|
||||||
(map, value) => map.CoerceHeadingProperty(value),
|
(map, value) => map.CoerceHeadingProperty(value),
|
||||||
true);
|
true);
|
||||||
|
|
||||||
|
|
@ -153,7 +153,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task TargetCenterPropertyChangedAsync(Location targetCenter)
|
private async Task TargetCenterPropertyChanged(Location targetCenter)
|
||||||
{
|
{
|
||||||
if (!internalPropertyChange && !targetCenter.Equals(Center))
|
if (!internalPropertyChange && !targetCenter.Equals(Center))
|
||||||
{
|
{
|
||||||
|
|
@ -206,7 +206,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task TargetZoomLevelPropertyChangedAsync(double targetZoomLevel)
|
private async Task TargetZoomLevelPropertyChanged(double targetZoomLevel)
|
||||||
{
|
{
|
||||||
if (!internalPropertyChange && targetZoomLevel != ZoomLevel)
|
if (!internalPropertyChange && targetZoomLevel != ZoomLevel)
|
||||||
{
|
{
|
||||||
|
|
@ -241,7 +241,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task TargetHeadingPropertyChangedAsync(double targetHeading)
|
private async Task TargetHeadingPropertyChanged(double targetHeading)
|
||||||
{
|
{
|
||||||
if (!internalPropertyChange && targetHeading != Heading)
|
if (!internalPropertyChange && targetHeading != Heading)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue