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

@ -17,7 +17,7 @@ namespace MapControl
#else
[System.ComponentModel.TypeConverter(typeof(MapProjectionConverter))]
#endif
public abstract class MapProjection(bool hasCenter = false)
public abstract class MapProjection
{
public const double Wgs84EquatorialRadius = 6378137d;
public const double Wgs84Flattening = 1d / 298.257223563;
@ -56,7 +56,7 @@ namespace MapControl
public double MeterPerDegree => EquatorialRadius * Math.PI / 180d;
private Location center;
private bool updateCenter = hasCenter;
private bool updateCenter;
/// <summary>
/// Gets or sets an optional projection center. If the property is set to a non-null value,
@ -77,6 +77,11 @@ namespace MapControl
}
}
protected void EnableCenterUpdates()
{
updateCenter = true;
}
/// <summary>
/// Called by MapBase.UpdateTransform().
/// </summary>