Added WorldMercatorProjection, fixed bounding box problems when changing projection.

This commit is contained in:
ClemensF 2017-10-27 17:15:18 +02:00
parent 2f123886ff
commit 156ebfe177
21 changed files with 586 additions and 469 deletions

View file

@ -19,10 +19,14 @@ namespace MapControl
/// </summary>
public abstract class MapProjection
{
public const int TileSize = 256;
public const double Wgs84EquatorialRadius = 6378137d;
public const double Wgs84Flattening = 1d / 298.257223563;
public static readonly double Wgs84Eccentricity = Math.Sqrt((2d - Wgs84Flattening) * Wgs84Flattening);
public const double MetersPerDegree = Wgs84EquatorialRadius * Math.PI / 180d;
public const int TileSize = 256;
/// <summary>
/// Gets the scaling factor from cartesian map coordinates in degrees to viewport coordinates for the specified zoom level.
/// </summary>