mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
MapProjection properties
This commit is contained in:
parent
9a26fdaefc
commit
e6b25c2f8d
7 changed files with 31 additions and 71 deletions
|
|
@ -23,11 +23,7 @@ namespace MapControl
|
|||
public EquirectangularProjection()
|
||||
{
|
||||
CrsId = DefaultCrsId;
|
||||
}
|
||||
|
||||
public override bool IsNormalCylindrical
|
||||
{
|
||||
get { return true; }
|
||||
IsNormalCylindrical = true;
|
||||
}
|
||||
|
||||
public override Vector GetRelativeScale(Location location)
|
||||
|
|
|
|||
|
|
@ -37,26 +37,17 @@ namespace MapControl
|
|||
/// <summary>
|
||||
/// Indicates if this is a normal cylindrical projection.
|
||||
/// </summary>
|
||||
public virtual bool IsNormalCylindrical
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
public bool IsNormalCylindrical { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if this is a web mercator projection, i.e. compatible with MapTileLayer.
|
||||
/// </summary>
|
||||
public virtual bool IsWebMercator
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
public bool IsWebMercator { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the absolute value of the minimum and maximum latitude that can be transformed.
|
||||
/// </summary>
|
||||
public virtual double MaxLatitude
|
||||
{
|
||||
get { return 90d; }
|
||||
}
|
||||
public double MaxLatitude { get; protected set; } = 90d;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the relative map scale at the specified Location.
|
||||
|
|
|
|||
|
|
@ -17,26 +17,12 @@ namespace MapControl
|
|||
{
|
||||
public const string DefaultCrsId = "EPSG:3857";
|
||||
|
||||
private static readonly double maxLatitude = YToLatitude(180d);
|
||||
|
||||
public WebMercatorProjection()
|
||||
{
|
||||
CrsId = DefaultCrsId;
|
||||
}
|
||||
|
||||
public override bool IsNormalCylindrical
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool IsWebMercator
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override double MaxLatitude
|
||||
{
|
||||
get { return maxLatitude; }
|
||||
IsNormalCylindrical = true;
|
||||
IsWebMercator = true;
|
||||
MaxLatitude = YToLatitude(180d);
|
||||
}
|
||||
|
||||
public override Vector GetRelativeScale(Location location)
|
||||
|
|
|
|||
|
|
@ -20,21 +20,11 @@ namespace MapControl
|
|||
public static double ConvergenceTolerance { get; set; } = 1e-6;
|
||||
public static int MaxIterations { get; set; } = 10;
|
||||
|
||||
private static readonly double maxLatitude = YToLatitude(180d);
|
||||
|
||||
public WorldMercatorProjection()
|
||||
{
|
||||
CrsId = DefaultCrsId;
|
||||
}
|
||||
|
||||
public override bool IsNormalCylindrical
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override double MaxLatitude
|
||||
{
|
||||
get { return maxLatitude; }
|
||||
IsNormalCylindrical = true;
|
||||
MaxLatitude = YToLatitude(180d);
|
||||
}
|
||||
|
||||
public override Vector GetRelativeScale(Location location)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue