mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Version 4.12. Revised projections
This commit is contained in:
parent
8cafe207cb
commit
90aa92def0
25 changed files with 390 additions and 167 deletions
|
|
@ -23,6 +23,9 @@ namespace MapControl
|
|||
public const double PixelPerDegree = TileSize / 360d;
|
||||
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -33,7 +36,7 @@ namespace MapControl
|
|||
/// <summary>
|
||||
/// Indicates if this is a normal cylindrical projection.
|
||||
/// </summary>
|
||||
public bool IsCylindrical { get; protected set; } = false;
|
||||
public bool IsNormalCylindrical { get; protected set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if this is a web mercator projection, i.e. compatible with MapTileLayer.
|
||||
|
|
@ -57,12 +60,13 @@ namespace MapControl
|
|||
public Matrix ViewportTransform { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the transform matrix from viewport coordinates to cartesian map coordinates (pixels).
|
||||
/// Gets the transform matrix from viewport coordinates (pixels) to cartesian map coordinates.
|
||||
/// </summary>
|
||||
public Matrix InverseViewportTransform { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the scaling factor from cartesian map coordinates to viewport coordinates.
|
||||
/// Gets the scaling factor from cartesian map coordinates to viewport coordinates (pixels)
|
||||
/// at the projection's point of true scale.
|
||||
/// </summary>
|
||||
public double ViewportScale { get; private set; }
|
||||
|
||||
|
|
@ -151,7 +155,7 @@ namespace MapControl
|
|||
/// </summary>
|
||||
public virtual string WmsQueryParameters(BoundingBox boundingBox)
|
||||
{
|
||||
if (string.IsNullOrEmpty(CrsId) || !boundingBox.HasValidBounds)
|
||||
if (string.IsNullOrEmpty(CrsId))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue