Removed GeoApiProjection.GetBboxValue

This commit is contained in:
ClemensFischer 2024-04-17 20:10:45 +02:00
parent b8f4af969d
commit a741877e80
4 changed files with 9 additions and 17 deletions

View file

@ -794,7 +794,7 @@ namespace MapControl
if (resetTransformCenter)
{
// Check if transform center moved across the dateline.
// Check if transform center has moved across 180° longitude.
//
transformCenterChanged = Math.Abs(center.Longitude - transformCenter.Longitude) > 180d;
@ -814,7 +814,7 @@ namespace MapControl
SetViewScale(ViewTransform.Scale);
// Check if view center moved across the dateline.
// Check if view center has moved across 180° longitude.
//
transformCenterChanged = transformCenterChanged || Math.Abs(Center.Longitude - centerLongitude) > 180d;
centerLongitude = Center.Longitude;

View file

@ -130,15 +130,14 @@ namespace MapControl
/// </summary>
public virtual string GetBboxValue(MapRect mapRect)
{
// Truncate bounding box to 1 cm precision.
// Truncate values for seamless stitching of two WMS images at 180° longitude,
// as done in WmsImageLayer.GetImageAsync.
//
const double p = 0.01;
return string.Format(CultureInfo.InvariantCulture, "{0:F2},{1:F2},{2:F2},{3:F2}",
p * Math.Ceiling(mapRect.XMin / p),
p * Math.Ceiling(mapRect.YMin / p),
p * Math.Floor(mapRect.XMax / p),
p * Math.Floor(mapRect.YMax / p));
0.01 * Math.Ceiling(100d * mapRect.XMin),
0.01 * Math.Ceiling(100d * mapRect.YMin),
0.01 * Math.Floor(100d * mapRect.XMax),
0.01 * Math.Floor(100d * mapRect.YMax));
}
}
}

View file

@ -22,7 +22,7 @@ namespace MapControl
public bool ProjectionChanged { get; }
/// <summary>
/// Indicates that the view transform center has moved across the dateline.
/// Indicates that the view transform center has moved across 180° longitude.
/// Used to control when a MapTileLayer should be updated immediately.
/// </summary>
public bool TransformCenterChanged { get; }