mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-03 12:00:04 +02:00
Update MapPath.cs
This commit is contained in:
parent
3edafd6228
commit
8df5625382
|
|
@ -91,10 +91,10 @@ namespace MapControl
|
||||||
|
|
||||||
if (location != null && parentMap.MapProjection.IsNormalCylindrical)
|
if (location != null && parentMap.MapProjection.IsNormalCylindrical)
|
||||||
{
|
{
|
||||||
var viewPos = parentMap.LocationToView(location);
|
var pos = parentMap.LocationToView(location);
|
||||||
|
|
||||||
if (viewPos.X < 0d || viewPos.X > parentMap.RenderSize.Width ||
|
if (pos.X < 0d || pos.X > parentMap.RenderSize.Width ||
|
||||||
viewPos.Y < 0d || viewPos.Y > parentMap.RenderSize.Height)
|
pos.Y < 0d || pos.Y > parentMap.RenderSize.Height)
|
||||||
{
|
{
|
||||||
longitudeOffset = parentMap.ConstrainedLongitude(location.Longitude) - location.Longitude;
|
longitudeOffset = parentMap.ConstrainedLongitude(location.Longitude) - location.Longitude;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue