mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update MapScale.cs
This commit is contained in:
parent
7fa2e37266
commit
caf6a9c8a4
|
|
@ -70,10 +70,10 @@ namespace MapControl
|
|||
protected override Size MeasureOverride(Size availableSize)
|
||||
{
|
||||
var size = new Size();
|
||||
double scale;
|
||||
|
||||
if (ParentMap != null)
|
||||
if (ParentMap != null && (scale = ParentMap.GetScale(ParentMap.Center).X) > 0d)
|
||||
{
|
||||
var scale = ParentMap.GetScale(ParentMap.Center).X;
|
||||
var length = MinWidth / scale;
|
||||
var magnitude = Math.Pow(10d, Math.Floor(Math.Log10(length)));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue