mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update MapLayers.cs
This commit is contained in:
parent
5336d07704
commit
947488a567
|
|
@ -2,6 +2,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
#if WINDOWS_UWP
|
||||
using Windows.UI;
|
||||
using Windows.UI.Xaml;
|
||||
|
|
@ -183,11 +184,17 @@ namespace ViewModel
|
|||
MaxBoundingBoxWidth = 360;
|
||||
}
|
||||
|
||||
protected override string GetMapRequestUri()
|
||||
protected override string GetCrsParam(MapProjection projection)
|
||||
{
|
||||
return base.GetMapRequestUri()
|
||||
.Replace("&CRS=AUTO2:97001,", "&CRS=AUTO2:7CS01,")
|
||||
.Replace("&CRS=AUTO2:97002,", "&CRS=AUTO2:7CS02,");
|
||||
switch (projection.CrsId)
|
||||
{
|
||||
case "AUTO2:97001":
|
||||
return string.Format(CultureInfo.InvariantCulture, "CRS=AUTO2:7CS01,1,{0},{1}", projection.Center.Longitude, projection.Center.Latitude);
|
||||
case "AUTO2:97002":
|
||||
return string.Format(CultureInfo.InvariantCulture, "CRS=AUTO2:7CS02,1,{0},{1}", projection.Center.Longitude, projection.Center.Latitude);
|
||||
default:
|
||||
return base.GetCrsParam(projection);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue