2020-03-20 18:12:56 +01:00
|
|
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
2022-01-14 20:22:56 +01:00
|
|
|
|
// © 2022 Clemens Fischer
|
2020-03-20 18:12:56 +01:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
|
|
|
|
|
public class WmtsTileMatrixSet
|
|
|
|
|
|
{
|
|
|
|
|
|
public WmtsTileMatrixSet(string identifier, string supportedCrs, IEnumerable<WmtsTileMatrix> tileMatrixes)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (string.IsNullOrEmpty(identifier))
|
|
|
|
|
|
{
|
2021-02-11 23:34:37 +01:00
|
|
|
|
throw new ArgumentException("The identifier argument must not be null or empty.", nameof(identifier));
|
2020-03-20 18:12:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(supportedCrs))
|
|
|
|
|
|
{
|
2021-02-11 23:34:37 +01:00
|
|
|
|
throw new ArgumentException("The supportedCrs argument must not be null or empty.", nameof(supportedCrs));
|
2020-03-20 18:12:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-02-11 23:34:37 +01:00
|
|
|
|
if (tileMatrixes == null || !tileMatrixes.Any())
|
2020-03-20 18:12:56 +01:00
|
|
|
|
{
|
2021-02-11 23:34:37 +01:00
|
|
|
|
throw new ArgumentException("The tileMatrixes argument must not be null or an empty collection.", nameof(tileMatrixes));
|
2020-03-20 18:12:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Identifier = identifier;
|
|
|
|
|
|
SupportedCrs = supportedCrs;
|
|
|
|
|
|
TileMatrixes = tileMatrixes.OrderBy(m => m.Scale).ToList();
|
|
|
|
|
|
}
|
2022-12-01 23:01:06 +01:00
|
|
|
|
|
|
|
|
|
|
public string Identifier { get; }
|
|
|
|
|
|
public string SupportedCrs { get; }
|
|
|
|
|
|
public IList<WmtsTileMatrix> TileMatrixes { get; }
|
2020-03-20 18:12:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|