GeoImage implementation

This commit is contained in:
ClemensFischer 2024-09-02 15:49:53 +02:00
parent 07849eb1d8
commit 3468940ebf
6 changed files with 87 additions and 110 deletions

View file

@ -32,10 +32,14 @@ namespace MapControl
public partial class MapBase : MapPanel
{
public static double ZoomLevelToScale(double zoomLevel)
=> 256d * Math.Pow(2d, zoomLevel) / (360d * MapProjection.Wgs84MeterPerDegree);
{
return 256d * Math.Pow(2d, zoomLevel) / (360d * MapProjection.Wgs84MeterPerDegree);
}
public static double ScaleToZoomLevel(double scale)
=> Math.Log(scale * 360d * MapProjection.Wgs84MeterPerDegree / 256d, 2d);
{
return Math.Log(scale * 360d * MapProjection.Wgs84MeterPerDegree / 256d, 2d);
}
public static TimeSpan ImageFadeDuration { get; set; } = TimeSpan.FromSeconds(0.1);
@ -375,7 +379,9 @@ namespace MapControl
}
internal bool InsideViewBounds(Point point)
=> point.X >= 0d && point.Y >= 0d && point.X <= ActualWidth && point.Y <= ActualHeight;
{
return point.X >= 0d && point.Y >= 0d && point.X <= ActualWidth && point.Y <= ActualHeight;
}
internal double CoerceLongitude(double longitude)
{