diff --git a/MapControl/Avalonia/MapItem.Avalonia.cs b/MapControl/Avalonia/MapItem.Avalonia.cs index f61064ab..93727d90 100644 --- a/MapControl/Avalonia/MapItem.Avalonia.cs +++ b/MapControl/Avalonia/MapItem.Avalonia.cs @@ -7,7 +7,7 @@ public static readonly StyledProperty LocationProperty = DependencyPropertyHelper.AddOwner(MapPanel.LocationProperty, null, - (item, oldValue, newValue) => item.UpdateMapTransform(newValue)); + (item, oldValue, newValue) => item.UpdateMapTransform()); protected override void OnPointerPressed(PointerPressedEventArgs e) { diff --git a/MapControl/Shared/MapItem.cs b/MapControl/Shared/MapItem.cs index e369cbf5..de39ed47 100644 --- a/MapControl/Shared/MapItem.cs +++ b/MapControl/Shared/MapItem.cs @@ -60,7 +60,7 @@ namespace MapControl // parentMap.ViewportChanged += OnViewportChanged; - UpdateMapTransform(Location); + UpdateMapTransform(); } } } @@ -81,7 +81,7 @@ namespace MapControl { parentMap.ViewportChanged += OnViewportChanged; - UpdateMapTransform(Location); + UpdateMapTransform(); } } @@ -91,14 +91,14 @@ namespace MapControl private void OnViewportChanged(object sender, ViewportChangedEventArgs e) { - UpdateMapTransform(Location); + UpdateMapTransform(); } - private void UpdateMapTransform(Location location) + private void UpdateMapTransform() { - if (mapTransform != null && parentMap != null && location != null) + if (mapTransform != null && parentMap != null && Location != null) { - mapTransform.Matrix = parentMap.GetMapTransform(location); + mapTransform.Matrix = parentMap.GetMapTransform(Location); } } } diff --git a/MapControl/WPF/MapItem.WPF.cs b/MapControl/WPF/MapItem.WPF.cs index 6c18dc7c..f74531a3 100644 --- a/MapControl/WPF/MapItem.WPF.cs +++ b/MapControl/WPF/MapItem.WPF.cs @@ -11,7 +11,7 @@ namespace MapControl public static readonly DependencyProperty LocationProperty = DependencyPropertyHelper.AddOwner(MapPanel.LocationProperty, null, - (item, oldValue, newValue) => item.UpdateMapTransform(newValue)); + (item, oldValue, newValue) => item.UpdateMapTransform()); static MapItem() { diff --git a/MapControl/WinUI/MapItem.WinUI.cs b/MapControl/WinUI/MapItem.WinUI.cs index a60ff9a2..99280ee4 100644 --- a/MapControl/WinUI/MapItem.WinUI.cs +++ b/MapControl/WinUI/MapItem.WinUI.cs @@ -25,7 +25,7 @@ namespace MapControl (item, oldValue, newValue) => { MapPanel.SetLocation(item, newValue); - item.UpdateMapTransform(newValue); + item.UpdateMapTransform(); }); private Windows.Foundation.Point? pointerPressedPosition;