CsWinRT1028, C# LangVersion 12

This commit is contained in:
ClemensFischer 2025-09-15 17:46:31 +02:00
parent e1a4ba3fd6
commit c0783efb4a
27 changed files with 67 additions and 119 deletions

View file

@ -6,29 +6,19 @@ using Avalonia;
namespace MapControl
{
public class WmtsTileMatrix
// See 07-057r7_Web_Map_Tile_Service_Standard.pdf, section 6.1.a, page 8:
// "standardized rendering pixel size" is 0.28 mm
//
public class WmtsTileMatrix(
string identifier, double scaleDenominator, Point topLeft,
int tileWidth, int tileHeight, int matrixWidth, int matrixHeight)
{
// See 07-057r7_Web_Map_Tile_Service_Standard.pdf, section 6.1.a, page 8:
// "standardized rendering pixel size" is 0.28 mm
public WmtsTileMatrix(string identifier, double scaleDenominator, Point topLeft,
int tileWidth, int tileHeight, int matrixWidth, int matrixHeight)
{
Identifier = identifier;
Scale = 1 / (scaleDenominator * 0.00028); // 0.28 mm
TopLeft = topLeft;
TileWidth = tileWidth;
TileHeight = tileHeight;
MatrixWidth = matrixWidth;
MatrixHeight = matrixHeight;
}
public string Identifier { get; }
public double Scale { get; }
public Point TopLeft { get; }
public int TileWidth { get; }
public int TileHeight { get; }
public int MatrixWidth { get; }
public int MatrixHeight { get; }
public string Identifier { get; } = identifier;
public double Scale { get; } = 1 / (scaleDenominator * 0.00028); // 0.28 mm
public Point TopLeft { get; } = topLeft;
public int TileWidth { get; } = tileWidth;
public int TileHeight { get; } = tileHeight;
public int MatrixWidth { get; } = matrixWidth;
public int MatrixHeight { get; } = matrixHeight;
}
}