TileMatrixSet¶
Namespace: ThinkGeo.Core
This class represents a collection of ZoomLevels.
public class TileMatrixSet
Inheritance Object → TileMatrixSet
Remarks:
This class represents a collection of ZoomLevels. Each ZoomLevel has a different scale and can store Styles that determine how InternalFeatures draw.
Properties¶
Matrices¶
Gets or sets the Matrices.
public Collection<TileMatrix> Matrices { get; set; }
Property Value¶
TileWidth¶
This now equals to TileMatrices[0].TileWidth, suppose all the tile matrices have the same tile width. But you can create a tile matrix set with different tile width for each matrix.
public int TileWidth { get; set; }
Property Value¶
TileHeight¶
This now equals to TileMatrices[0].TileHeight, suppose all the tile matrices have the same tile height. But you can create a tile matrix set with different tile height for each matrix.
public int TileHeight { get; set; }
Property Value¶
TileMatrices¶
This property is used to store the collection of TileMatrix.
public Collection<TileMatrix> TileMatrices { get; set; }
Property Value¶
Constructors¶
TileMatrixSet()¶
This is the default constructor.
public TileMatrixSet()
Methods¶
GetSnappedZoomIndex(Double)¶
Returns snapped zoom index for .
public int GetSnappedZoomIndex(double scale)
Parameters¶
scale Double
The scale factor to apply.
Returns¶
Int32
The result of the operation.
GetSnappedMatrix(Double)¶
Returns the snapped matrix for the provided scale.
public ValueTuple<int, TileMatrix> GetSnappedMatrix(double scale)
Parameters¶
scale Double
The scale factor to match against the matrix set.
Returns¶
ValueTuple<Int32, TileMatrix>
The snapped matrix index and corresponding tile matrix.
GetScales()¶
Returns scales.
public Collection<double> GetScales()
Returns¶
Collection<Double>
The result of the operation.
CreateTileMatrixSet(Int32, RectangleShape, GeographyUnit, Int32)¶
Return a tile matrix set, which consists of given number (20 by default) of zoom levels. Zoom level 0 covers the entire BoundingBox with a single tile of size TileSize x TileSize.There are a total of 20 zoom levels in this set.At each successive zoom level, the map resolution doubles-so each tile's ground scale is half that of the previous level.
public static TileMatrixSet CreateTileMatrixSet(int tileSize, RectangleShape boundingBox, GeographyUnit boundingBoxUnit, int zoomLevelCount)
Parameters¶
tileSize Int32
boundingBox RectangleShape
boundingBoxUnit GeographyUnit
zoomLevelCount Int32
Returns¶
CreateTileMatrixSet(Int32, RectangleShape, GeographyUnit, IEnumerable<Double>)¶
Creates a TileMatrixSet whose zoom levels correspond exactly to the provided .
public static TileMatrixSet CreateTileMatrixSet(int tileSize, RectangleShape boundingBox, GeographyUnit boundingBoxUnit, IEnumerable<double> scales)
Parameters¶
tileSize Int32
The width and height, in pixels, of each square tile in the resulting matrix set.
boundingBox RectangleShape
The geographic area that every tile matrix in the set will cover.
boundingBoxUnit GeographyUnit
The unit of measurement for the coordinates in .
scales IEnumerable<Double>
An ordered sequence of map scales. One will be created for each scale value. A containing one per scale in .