XAML-Map-Control/MapControl/Shared/LatLonBox.cs

32 lines
989 B
C#
Raw Normal View History

2025-02-27 18:46:32 +01:00
namespace MapControl
2024-09-09 16:44:45 +02:00
{
/// <summary>
/// A BoundingBox with optional rotation. Used by GeoImage and GroundOverlay.
/// </summary>
public class LatLonBox : BoundingBox
{
2024-09-11 11:53:09 +02:00
public LatLonBox(double latitude1, double longitude1, double latitude2, double longitude2, double rotation = 0d)
2024-09-09 16:44:45 +02:00
: base(latitude1, longitude1, latitude2, longitude2)
{
Rotation = rotation;
}
2024-09-11 11:53:09 +02:00
public LatLonBox(Location location1, Location location2, double rotation = 0d)
2024-09-09 16:44:45 +02:00
: base(location1, location2)
{
Rotation = rotation;
}
2024-09-11 11:53:09 +02:00
public LatLonBox(BoundingBox boundingBox, double rotation = 0d)
: base(boundingBox.South, boundingBox.West, boundingBox.North, boundingBox.East)
{
Rotation = rotation;
}
2024-09-09 16:44:45 +02:00
/// <summary>
/// Gets a counterclockwise rotation angle in degrees.
/// </summary>
public double Rotation { get; }
}
}