mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-15 11:25:09 +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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue