mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Version 5.1: Use C# 7
This commit is contained in:
parent
310f0cca9a
commit
7bd1d450dc
18 changed files with 42 additions and 35 deletions
|
|
@ -15,8 +15,8 @@ namespace MapControl
|
|||
/// </summary>
|
||||
public class WorldMercatorProjection : MapProjection
|
||||
{
|
||||
public static double ConvergenceTolerance = 1e-6;
|
||||
public static int MaxIterations = 10;
|
||||
public static double ConvergenceTolerance { get; set; } = 1e-6;
|
||||
public static int MaxIterations { get; set; } = 10;
|
||||
|
||||
private static readonly double maxLatitude = YToLatitude(180d);
|
||||
|
||||
|
|
@ -72,8 +72,7 @@ namespace MapControl
|
|||
|
||||
var lat = latitude * Math.PI / 180d;
|
||||
|
||||
return Math.Log(Math.Tan(lat / 2d + Math.PI / 4d)
|
||||
* ConformalFactor(lat)) * 180d / Math.PI; // p.44 (7-7)
|
||||
return Math.Log(Math.Tan(lat / 2d + Math.PI / 4d) * ConformalFactor(lat)) * 180d / Math.PI; // p.44 (7-7)
|
||||
}
|
||||
|
||||
public static double YToLatitude(double y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue