mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
|
// Copyright © 2023 Clemens Fischer
|
|
// 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))
|
|
{
|
|
throw new ArgumentException("The identifier argument must not be null or empty.", nameof(identifier));
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(supportedCrs))
|
|
{
|
|
throw new ArgumentException("The supportedCrs argument must not be null or empty.", nameof(supportedCrs));
|
|
}
|
|
|
|
if (tileMatrixes == null || !tileMatrixes.Any())
|
|
{
|
|
throw new ArgumentException("The tileMatrixes argument must not be null or an empty collection.", nameof(tileMatrixes));
|
|
}
|
|
|
|
Identifier = identifier;
|
|
SupportedCrs = supportedCrs;
|
|
TileMatrixes = tileMatrixes.OrderBy(m => m.Scale).ToList();
|
|
}
|
|
|
|
public string Identifier { get; }
|
|
public string SupportedCrs { get; }
|
|
public IList<WmtsTileMatrix> TileMatrixes { get; }
|
|
}
|
|
}
|