Renamed Wgs84MetersPerDegree

This commit is contained in:
Clemens 2022-03-02 22:03:18 +01:00
parent 535161c5a3
commit c998f19fe5
11 changed files with 32 additions and 32 deletions

View file

@ -27,15 +27,15 @@ namespace MapControl
public override Point LocationToMap(Location location)
{
return new Point(
Wgs84MetersPerDegree * (location.Longitude - Center.Longitude) * Math.Cos(Center.Latitude * Math.PI / 180d),
Wgs84MetersPerDegree * location.Latitude);
Wgs84MeterPerDegree * (location.Longitude - Center.Longitude) * Math.Cos(Center.Latitude * Math.PI / 180d),
Wgs84MeterPerDegree * location.Latitude);
}
public override Location MapToLocation(Point point)
{
return new Location(
point.Y / Wgs84MetersPerDegree,
point.X / (Wgs84MetersPerDegree * Math.Cos(Center.Latitude * Math.PI / 180d)) + Center.Longitude);
point.Y / Wgs84MeterPerDegree,
point.X / (Wgs84MeterPerDegree * Math.Cos(Center.Latitude * Math.PI / 180d)) + Center.Longitude);
}
}
}