Primary constructor parameters

This commit is contained in:
ClemensFischer 2025-11-26 23:34:22 +01:00
parent f63fba98c1
commit 65462697df
8 changed files with 35 additions and 31 deletions

View file

@ -10,12 +10,18 @@ namespace MapControl
string identifier, double scale, Point topLeft,
int tileWidth, int tileHeight, int matrixWidth, int matrixHeight)
{
public string Identifier { get; } = identifier;
public double Scale { get; } = scale;
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;
public string Identifier => identifier;
public double Scale => scale;
public Point TopLeft => topLeft;
public int TileWidth => tileWidth;
public int TileHeight => tileHeight;
public int MatrixWidth => matrixWidth;
public int MatrixHeight => matrixHeight;
// Indicates if the total width in meters covers the whole earth
// circumference (minus one millimeter for floating point precision).
//
public bool HasFullHorizontalCoverage { get; } =
matrixWidth * tileWidth / scale >= 360d * MapProjection.Wgs84MeterPerDegree - 1e-3;
}
}