mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Updated MapProjections
This commit is contained in:
parent
c6c597a142
commit
544ac32ee3
5 changed files with 129 additions and 112 deletions
|
|
@ -30,8 +30,24 @@ namespace MapControl.Projections
|
|||
private double scaleFactor;
|
||||
private string bboxFormat;
|
||||
|
||||
public IMathTransform LocationToMapTransform { get; private set; }
|
||||
public IMathTransform MapToLocationTransform { get; private set; }
|
||||
public GeoApiProjection(string wkt = null)
|
||||
{
|
||||
if (wkt != null)
|
||||
{
|
||||
WKT = wkt;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an OGC Well-known text representation of a coordinate system,
|
||||
/// i.e. a PROJCS[...] or GEOGCS[...] string as used by https://epsg.io or http://spatialreference.org.
|
||||
/// Setting this property updates the CoordinateSystem property with an ICoordinateSystem created from the WKT string.
|
||||
/// </summary>
|
||||
public string WKT
|
||||
{
|
||||
get { return CoordinateSystem?.WKT; }
|
||||
set { CoordinateSystem = new CoordinateSystemFactory().CreateFromWkt(value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ICoordinateSystem of the MapProjection.
|
||||
|
|
@ -85,16 +101,9 @@ namespace MapControl.Projections
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an OGC Well-known text representation of a coordinate system,
|
||||
/// i.e. a PROJCS[...] or GEOGCS[...] string as used by https://epsg.io or http://spatialreference.org.
|
||||
/// Setting this property updates the CoordinateSystem property with an ICoordinateSystem created from the WKT string.
|
||||
/// </summary>
|
||||
public string WKT
|
||||
{
|
||||
get { return CoordinateSystem?.WKT; }
|
||||
set { CoordinateSystem = new CoordinateSystemFactory().CreateFromWkt(value); }
|
||||
}
|
||||
public IMathTransform LocationToMapTransform { get; private set; }
|
||||
|
||||
public IMathTransform MapToLocationTransform { get; private set; }
|
||||
|
||||
public override bool IsNormalCylindrical
|
||||
{
|
||||
|
|
@ -106,15 +115,6 @@ namespace MapControl.Projections
|
|||
get { return isWebMercator; }
|
||||
}
|
||||
|
||||
|
||||
public GeoApiProjection(string wkt = null)
|
||||
{
|
||||
if (wkt != null)
|
||||
{
|
||||
WKT = wkt;
|
||||
}
|
||||
}
|
||||
|
||||
public override Point LocationToMap(Location location)
|
||||
{
|
||||
if (LocationToMapTransform == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue