MapProjection.EnableCenterUpdates method

This commit is contained in:
ClemensFischer 2026-01-24 22:41:25 +01:00
parent 98f057ca0c
commit b0352c8f94
7 changed files with 24 additions and 16 deletions

View file

@ -14,8 +14,7 @@ namespace MapControl.Projections
/// </summary>
public class ProjNetMapProjection : MapProjection
{
protected ProjNetMapProjection(bool hasCenter = false)
: base(hasCenter)
protected ProjNetMapProjection()
{
}

View file

@ -12,23 +12,23 @@ namespace MapControl.Projections
public class Wgs84OrthographicProjection : ProjNetMapProjection
{
public Wgs84OrthographicProjection()
: base(true)
{
EnableCenterUpdates();
CenterChanged();
}
protected override void CenterChanged()
{
var wktFormat =
"PROJCS[\"WGS 84 / World Mercator\"," +
WktConstants.GeogCsWgs84 + "," +
"PROJECTION[\"Orthographic\"]," +
"PARAMETER[\"latitude_of_origin\",{0:0.########}]," +
"PARAMETER[\"central_meridian\",{1:0.########}]," +
"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," +
"AXIS[\"Easting\",EAST]," +
"AXIS[\"Northing\",NORTH]" +
"AUTHORITY[\"AUTO2\",\"42003\"]]";
"PROJCS[\"WGS 84 / World Mercator\"," +
WktConstants.GeogCsWgs84 + "," +
"PROJECTION[\"Orthographic\"]," +
"PARAMETER[\"latitude_of_origin\",{0:0.########}]," +
"PARAMETER[\"central_meridian\",{1:0.########}]," +
"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," +
"AXIS[\"Easting\",EAST]," +
"AXIS[\"Northing\",NORTH]" +
"AUTHORITY[\"AUTO2\",\"42003\"]]";
CoordinateSystemWkt = string.Format(
CultureInfo.InvariantCulture, wktFormat, Center.Latitude, Center.Longitude);

View file

@ -12,8 +12,8 @@ namespace MapControl.Projections
public class Wgs84StereographicProjection : ProjNetMapProjection
{
public Wgs84StereographicProjection()
: base(true)
{
EnableCenterUpdates();
CenterChanged();
}