Reworked MapProjection

Return nullable Point from LocationToMap. Use MapRect instead of WinUI/UWP Rect replacement. Drop Vector. Add Scale struct.
This commit is contained in:
ClemensFischer 2022-12-02 16:50:10 +01:00
parent bab1788334
commit 218a85316c
28 changed files with 249 additions and 324 deletions

View file

@ -22,7 +22,7 @@ namespace MapControl
CrsId = DefaultCrsId;
}
public override Point LocationToMap(Location location)
public override Point? LocationToMap(Location location)
{
if (location.Equals(Center))
{
@ -35,7 +35,7 @@ namespace MapControl
if (Math.Abs(lat - lat0) > Math.PI / 2d || Math.Abs(dLon) > Math.PI / 2d)
{
return new Point(double.NaN, double.NaN);
return null;
}
return new Point(