Skip to content

TileMatrixSet

Namespace: ThinkGeo.Core

This class represents a collection of ZoomLevels.

public class TileMatrixSet

Inheritance ObjectTileMatrixSet

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

public Collection<TileMatrix> Matrices { get; set; }

Property Value

Collection<TileMatrix>

Constructors

TileMatrixSet()

This is the default constructor.

public TileMatrixSet()

Remarks:

This constructor is where we set the default scales for each ZoomLevel. If you inherit from this class to create your own custom ZoomSet, then you should not call the base constructor if you want to supply your own custom ZoomLevels.

Methods

GetSnappedZoomIndex(Double)

public int GetSnappedZoomIndex(double scale)

Parameters

scale Double

Returns

Int32

GetSnappedMatrix(Double)

public ValueTuple<int, TileMatrix> GetSnappedMatrix(double scale)

Parameters

scale Double

Returns

ValueTuple<Int32, TileMatrix>

GetScales()

public Collection<double> GetScales()

Returns

Collection<Double>

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 ?TileSize.There are a total of 20 zoom levels in this set.At each successive zoom level, the map resolution doubles梥o each tile抯 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

TileMatrixSet

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.

Returns

TileMatrixSet

        A  containing one  per scale in .