mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-02-20 14:44:56 +01:00
Updated MetricGrid
This commit is contained in:
parent
ef88d6566c
commit
8840a9bd91
|
|
@ -47,7 +47,7 @@ namespace MapControl
|
|||
var p2 = ParentMap.ViewTransform.MapToView(new Point(x, mapRect.Y + mapRect.Height));
|
||||
figures.Add(CreateLineFigure(p1, p2));
|
||||
|
||||
var text = string.Format("{0:F0}", x);
|
||||
var text = x.ToString("F0");
|
||||
labels.Add(new Label(text, p1.X, p1.Y, 0d, HorizontalAlignment.Left, VerticalAlignment.Bottom));
|
||||
labels.Add(new Label(text, p2.X, p2.Y, 0d, HorizontalAlignment.Left, VerticalAlignment.Top));
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ namespace MapControl
|
|||
var p2 = ParentMap.ViewTransform.MapToView(new Point(mapRect.X + mapRect.Width, y));
|
||||
figures.Add(CreateLineFigure(p1, p2));
|
||||
|
||||
var text = string.Format("{0:F0}", y);
|
||||
var text = y.ToString("F0");
|
||||
labels.Add(new Label(text, p1.X, p1.Y, 0d, HorizontalAlignment.Left, VerticalAlignment.Bottom));
|
||||
labels.Add(new Label(text, p2.X, p2.Y, 0d, HorizontalAlignment.Right, VerticalAlignment.Bottom));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ namespace MapControl.Projections
|
|||
{
|
||||
var sign = Math.Sign(LatitudeOfOrigin);
|
||||
var phi = sign * latitude * Math.PI / 180d;
|
||||
|
||||
var e = Math.Sqrt((2d - Flattening) * Flattening);
|
||||
var eSinPhi = e * Math.Sin(phi);
|
||||
var t = Math.Tan(Math.PI / 4d - phi / 2d)
|
||||
|
|
|
|||
Loading…
Reference in a new issue