mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Version 5.0: Reworked MapBase and MapPath
This commit is contained in:
parent
06fd31c17b
commit
49e15ce424
41 changed files with 466 additions and 1068 deletions
|
|
@ -59,9 +59,10 @@ namespace MapControl
|
|||
{
|
||||
var size = new Size();
|
||||
|
||||
if (ParentMap != null && ParentMap.ScaleTransform.ScaleX > 0d)
|
||||
if (ParentMap != null)
|
||||
{
|
||||
var length = MinWidth / ParentMap.ScaleTransform.ScaleX;
|
||||
var scale = ParentMap.GetScale(ParentMap.Center).X;
|
||||
var length = MinWidth / scale;
|
||||
var magnitude = Math.Pow(10d, Math.Floor(Math.Log10(length)));
|
||||
|
||||
if (length / magnitude < 2d)
|
||||
|
|
@ -77,7 +78,7 @@ namespace MapControl
|
|||
length = 10d * magnitude;
|
||||
}
|
||||
|
||||
size.Width = length * ParentMap.ScaleTransform.ScaleX + StrokeThickness + Padding.Left + Padding.Right;
|
||||
size.Width = length * scale + StrokeThickness + Padding.Left + Padding.Right;
|
||||
size.Height = 1.25 * FontSize + StrokeThickness + Padding.Top + Padding.Bottom;
|
||||
|
||||
var x1 = Padding.Left + StrokeThickness / 2d;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue