Minor changes

This commit is contained in:
ClemensFischer 2024-04-16 19:55:59 +02:00
parent d007afded3
commit 84d211bb01
5 changed files with 7 additions and 8 deletions

View file

@ -49,7 +49,7 @@ namespace MapControl
public override string ToString()
{
return string.Format(CultureInfo.InvariantCulture, "{0:F5},{1:F5}", Latitude, Longitude);
return string.Format(CultureInfo.InvariantCulture, "{0:F6},{1:F6}", Latitude, Longitude);
}
/// <summary>

View file

@ -76,7 +76,7 @@ namespace MapControl
}
/// <summary>
/// Gets the geodetic Location of an element.
/// Gets the Location of an element.
/// </summary>
public static Location GetLocation(FrameworkElement element)
{
@ -84,7 +84,7 @@ namespace MapControl
}
/// <summary>
/// Sets the geodetic Location of an element.
/// Sets the Location of an element.
/// </summary>
public static void SetLocation(FrameworkElement element, Location value)
{

View file

@ -11,7 +11,7 @@ namespace MapControl
{
/// <summary>
/// Map rectangle with double floating point precision, in contrast to Windows.Foundation.Rect.
/// Used by MapProjection to convert geodetic bounding boxes to/from projected map coordinates.
/// Used by MapProjection when converting geographic bounding boxes to/from projected map coordinates.
/// </summary>
public class MapRect
{

View file

@ -99,8 +99,8 @@ namespace MapControl
line.Measure(size);
label.Text = length >= 1000d
? string.Format(CultureInfo.InvariantCulture, "{0:0} km", length / 1000d)
: string.Format(CultureInfo.InvariantCulture, "{0:0} m", length);
? string.Format(CultureInfo.InvariantCulture, "{0:F0} km", length / 1000d)
: string.Format(CultureInfo.InvariantCulture, "{0:F0} m", length);
label.Width = size.Width;
label.Height = size.Height;
label.Measure(size);

View file

@ -150,8 +150,7 @@ namespace MapControl
extension = ".jpg";
}
var cacheKey = string.Format(CultureInfo.InvariantCulture,
"{0}/{1}/{2}/{3}{4}", cacheName, tile.ZoomLevel, tile.Column, tile.Row, extension);
var cacheKey = $"{cacheName}/{tile.ZoomLevel}/{tile.Column}/{tile.Row}{extension}";
var buffer = await ReadCacheAsync(cacheKey).ConfigureAwait(false);