Attached property MapPanel.MapRect

This commit is contained in:
ClemensFischer 2026-01-28 15:55:30 +01:00
parent 881b39c4b4
commit 69b105c11f
12 changed files with 150 additions and 96 deletions

View file

@ -329,8 +329,16 @@ namespace MapControl
if (crs.StartsWith("AUTO2:") || crs.StartsWith("AUTO:"))
{
crs = string.Format(CultureInfo.InvariantCulture, "{0},1,{1:0.########},{2:0.########}",
crs, projection.Center.Longitude, projection.Center.Latitude);
var lon = 0d;
var lat = 0d; ;
if (projection.Center != null)
{
lon = projection.Center.Longitude;
lat = projection.Center.Latitude;
}
crs = string.Format(CultureInfo.InvariantCulture, "{0},1,{1:0.########},{2:0.########}", crs, lon, lat);
}
return crs;