Update MapPanel.cs

This commit is contained in:
ClemensFischer 2024-03-14 19:40:02 +01:00
parent 263a1b7188
commit 1c1a301361

View file

@ -207,8 +207,8 @@ namespace MapControl
position.HasValue && position.HasValue &&
IsOutsideViewport(position.Value)) IsOutsideViewport(position.Value))
{ {
location = new Location(location.Latitude, parentMap.ConstrainedLongitude(location.Longitude)); position = parentMap.LocationToView(
position = parentMap.LocationToView(location); new Location(location.Latitude, parentMap.ConstrainedLongitude(location.Longitude)));
} }
return position; return position;