mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-14 19:05:12 +00:00
Changed IMapLayer interface
This commit is contained in:
parent
57ee896f8a
commit
1d4c5a4b90
8 changed files with 28 additions and 32 deletions
|
|
@ -28,9 +28,15 @@ namespace MapControl.UiTools
|
|||
|
||||
protected override bool GetIsEnabled(MapBase map)
|
||||
{
|
||||
return map.MapLayer is not IMapLayer mapLayer
|
||||
|| mapLayer.SupportedCrsIds == null
|
||||
|| mapLayer.SupportedCrsIds.Contains(CrsId);
|
||||
var supportedCrsIds = map.MapLayer switch
|
||||
{
|
||||
WmsImageLayer wmsImageLayer => wmsImageLayer.SupportedCrsIds,
|
||||
WmtsTileLayer wmtsTileLayer => wmtsTileLayer.TileMatrixSets.Keys,
|
||||
MapTileLayer => [WebMercatorProjection.DefaultCrsId],
|
||||
_ => null
|
||||
};
|
||||
|
||||
return supportedCrsIds == null || supportedCrsIds.Contains(CrsId);
|
||||
}
|
||||
|
||||
protected override bool GetIsChecked(MapBase map)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<DefineConstants>UWP</DefineConstants>
|
||||
<RootNamespace>MapControl.UiTools</RootNamespace>
|
||||
<AssemblyTitle>XAML Map Control UI Tools Library for UWP</AssemblyTitle>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DisableRuntimeMarshalling>true</DisableRuntimeMarshalling>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue