mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
MapProjection properties
This commit is contained in:
parent
9a26fdaefc
commit
e6b25c2f8d
7 changed files with 31 additions and 71 deletions
|
|
@ -25,8 +25,6 @@ namespace MapControl.Projections
|
|||
public class GeoApiProjection : MapProjection
|
||||
{
|
||||
private ICoordinateSystem coordinateSystem;
|
||||
private bool isNormalCylindrical;
|
||||
private bool isWebMercator;
|
||||
private double scaleFactor;
|
||||
private string bboxFormat;
|
||||
|
||||
|
|
@ -83,19 +81,19 @@ namespace MapControl.Projections
|
|||
var falseEasting = projection.GetParameter("false_easting");
|
||||
var falseNorthing = projection.GetParameter("false_northing");
|
||||
|
||||
isNormalCylindrical =
|
||||
IsNormalCylindrical =
|
||||
(centralMeridian == null || centralMeridian.Value == 0d) &&
|
||||
(centralParallel == null || centralParallel.Value == 0d) &&
|
||||
(falseEasting == null || falseEasting.Value == 0d) &&
|
||||
(falseNorthing == null || falseNorthing.Value == 0d);
|
||||
isWebMercator = CrsId == "EPSG:3857" || CrsId == "EPSG:900913";
|
||||
IsWebMercator = CrsId == "EPSG:3857" || CrsId == "EPSG:900913";
|
||||
scaleFactor = 1d;
|
||||
bboxFormat = "{0},{1},{2},{3}";
|
||||
}
|
||||
else
|
||||
{
|
||||
isNormalCylindrical = true;
|
||||
isWebMercator = false;
|
||||
IsNormalCylindrical = true;
|
||||
IsWebMercator = false;
|
||||
scaleFactor = Wgs84MetersPerDegree;
|
||||
bboxFormat = "{1},{0},{3},{2}";
|
||||
}
|
||||
|
|
@ -106,16 +104,6 @@ namespace MapControl.Projections
|
|||
|
||||
public IMathTransform MapToLocationTransform { get; private set; }
|
||||
|
||||
public override bool IsNormalCylindrical
|
||||
{
|
||||
get { return isNormalCylindrical; }
|
||||
}
|
||||
|
||||
public override bool IsWebMercator
|
||||
{
|
||||
get { return isWebMercator; }
|
||||
}
|
||||
|
||||
public override Point LocationToMap(Location location)
|
||||
{
|
||||
if (LocationToMapTransform == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue