Skip to content

WmtsTiledOverlay

Namespace: ThinkGeo.Core

Represents an overlay object that gets map images from the WMTS server you specify.

public class WmtsTiledOverlay : WebBasedTileOverly`1, System.IDisposable

Inheritance ObjectOverlayTileOverlayWebBasedTileOverly<WmtsLayer>WmtsTiledOverlay
Implements IDisposable

Remarks:

The WmtsOverlay gets images from one or more WMTS servers that you specify. Usually, you add a WMTS server URI to the ServerUris collection and the WmtsOverlay will make a request to that WMTS server to get its tile images.

You can also add multiple WMTS server URIs to the ServerUris collection. The WmtsOverlay will randomly send requests to those WMTS servers in a concurrent fashion. This means that the tile images can come from different WMTS servers, thus greatly enhancing performance. Do not add URIs of differently-configured WMTS servers to the ServerUris collection.

Properties

ServerUris

public Collection<Uri> ServerUris { get; }

Property Value

Collection<Uri>

TileCache

public RasterTileCache TileCache { get; set; }

Property Value

RasterTileCache

CapabilitiesCacheTimeout

public TimeSpan CapabilitiesCacheTimeout { get; set; }

Property Value

TimeSpan

ActiveLayerName

public string ActiveLayerName { get; set; }

Property Value

String

WmtsSeverEncodingType

public WmtsSeverEncodingType WmtsSeverEncodingType { get; set; }

Property Value

WmtsSeverEncodingType

WmtsServerLayers

public Collection<WmtsServerLayer> WmtsServerLayers { get; set; }

Property Value

Collection<WmtsServerLayer>

ActiveStyleName

public string ActiveStyleName { get; set; }

Property Value

String

Parameters

public Dictionary<string, string> Parameters { get; }

Property Value

Dictionary<String, String>

OutputFormat

public string OutputFormat { get; set; }

Property Value

String

Credentials

public ICredentials Credentials { get; set; }

Property Value

ICredentials

LowerScale

public double LowerScale { get; set; }

Property Value

Double

UpperScale

public double UpperScale { get; set; }

Property Value

Double

TileMatrixSetName

public string TileMatrixSetName { get; set; }

Property Value

String

AxisOrder

public WmtsAxisOrder AxisOrder { get; set; }

Property Value

WmtsAxisOrder

ProjectionConverter

public ProjectionConverter ProjectionConverter { get; set; }

Property Value

ProjectionConverter

ProjectedTileCache

public RasterTileCache ProjectedTileCache { get; set; }

Property Value

RasterTileCache

TileMatrixSets

The tile matrix sets of this WmtsTiledOverlay in Dictionary.

public Dictionary<string, WmtsTileMatrixSet> TileMatrixSets { get; }

Property Value

Dictionary<String, WmtsTileMatrixSet>

WebProxy

Gets or sets the Web Proxy for web service.

public IWebProxy WebProxy { get; set; }

Property Value

IWebProxy

TimeoutInSeconds

Gets or sets the length of time, in seconds, before the request times out.

public int TimeoutInSeconds { get; set; }

Property Value

Int32

ImageFormat

Gets and sets drawing format for the tiles.

public RasterTileFormat ImageFormat { get; set; }

Property Value

RasterTileFormat

JpegQuality

Gets or sets the image quality when the TileImageFormat is Jpeg; otherwise this property has no effects. Its default value is 80.

public int JpegQuality { get; set; }

Property Value

Int32

IsCacheOnly

Gets or sets a value indicating whether this instance is cache only.

public bool IsCacheOnly { get; set; }

Property Value

Boolean
true if this instance is cache only; otherwise, false.

IsVisible

Gets or sets if this overlay is visible.

public bool IsVisible { get; set; }

Property Value

Boolean

DrawingQuality

public DrawingQuality DrawingQuality { get; set; }

Property Value

DrawingQuality

TileSizeMode

Gets or sets the tile size mode.

public TileSizeMode TileSizeMode { get; set; }

Property Value

TileSizeMode

        The tile size mode.

TileResolution

Gets or sets the tile resolution.

public TileResolution TileResolution { get; set; }

Property Value

TileResolution

        The tile resolution.

TileType

Gets and sets the overlay is formed by multiple tiles or single tile.

public TileType TileType { get; set; }

Property Value

TileType

TileWidth

Gets and sets the width of the tile.

public int TileWidth { get; set; }

Property Value

Int32

TileHeight

Gets and sets the height of the tile.

public int TileHeight { get; set; }

Property Value

Int32

TileSnappingMode

Gets or sets the tileView snapping mode.

public TileSnappingMode TileSnappingMode { get; set; }

Property Value

TileSnappingMode

TileBuffer

This property gets and sets the number of extra rows and colums of tiles on each side which will surround the minimum grid tiles to cover the map.

public int TileBuffer { get; set; }

Property Value

Int32

MaxExtent

This property gets or sets the max extent of matrix to calculate the tiles.

public RectangleShape MaxExtent { get; set; }

Property Value

RectangleShape

Remarks:

By default, MaxExtent is null; the matrix is created depending on the GeographyUnit of current map. When it's DecimalDegree, the matrix' is calculated as (-180, 90, 180, -90) as MaxExtent. While it's not DecimalDegree, the matrix is (-20037508.2314698, 20037508.2314698, 20037508.2314698, -20037508.2314698); It's allowed to modify it to customize the matrix.

WrappingMode

Thie property gets or sets whether allow wrap date line.

public WrappingMode WrappingMode { get; set; }

Property Value

WrappingMode

WrappingExtent

public RectangleShape WrappingExtent { get; set; }

Property Value

RectangleShape

CanRefreshRegion

public bool CanRefreshRegion { get; protected set; }

Property Value

Boolean

IsBase

public bool IsBase { get; set; }

Property Value

Boolean

Name

Gets or sets the name of this overaly.

public string Name { get; set; }

Property Value

String

MapArguments

Gets or sets current map information which will be used for calculating mechanism.

public MapArguments MapArguments { get; set; }

Property Value

MapArguments

OverlayCanvas

Gets or sets the actual canvas which maintains all the visual elements on the overlay.

public Canvas OverlayCanvas { get; set; }

Property Value

Canvas

DrawingExceptionMode

This property gets and sets the DrawingExceptionMode used when an exception occurs during drawing.

public DrawingExceptionMode DrawingExceptionMode { get; set; }

Property Value

DrawingExceptionMode

RefreshTypeOnResize

public OverlayRefreshType RefreshTypeOnResize { get; set; }

Property Value

OverlayRefreshType

Attribution

public string Attribution { get; set; }

Property Value

String

IsEmpty

This property gets if this overlay is empty or not.

public bool IsEmpty { get; }

Property Value

Boolean

Remarks:

This property enhances the performance of the overlay while drawing. If is true, we will skip drawing this overlay and continue drawing the next overlay.

AutoRefreshInterval

public TimeSpan AutoRefreshInterval { get; set; }

Property Value

TimeSpan

Constructors

WmtsTiledOverlay(IEnumerable<Uri>)

public WmtsTiledOverlay(IEnumerable<Uri> serverUris)

Parameters

serverUris IEnumerable<Uri>

WmtsTiledOverlay(IEnumerable<Uri>, IWebProxy)

public WmtsTiledOverlay(IEnumerable<Uri> serverUris, IWebProxy webProxy)

Parameters

serverUris IEnumerable<Uri>

webProxy IWebProxy

WmtsTiledOverlay(IEnumerable<Uri>, WmtsSeverEncodingType)

public WmtsTiledOverlay(IEnumerable<Uri> serverUris, WmtsSeverEncodingType wmtsSeverEncodingType)

Parameters

serverUris IEnumerable<Uri>

wmtsSeverEncodingType WmtsSeverEncodingType

WmtsTiledOverlay(IEnumerable<Uri>, IWebProxy, WmtsSeverEncodingType)

public WmtsTiledOverlay(IEnumerable<Uri> serverUris, IWebProxy webProxy, WmtsSeverEncodingType wmtsSeverEncodingType)

Parameters

serverUris IEnumerable<Uri>

webProxy IWebProxy

wmtsSeverEncodingType WmtsSeverEncodingType

Methods

GetRequestUris(RectangleShape, Int32, Int32)

public Collection<Uri> GetRequestUris(RectangleShape requestExtent, int canvasWidth, int canvasHeight)

Parameters

requestExtent RectangleShape

canvasWidth Int32

canvasHeight Int32

Returns

Collection<Uri>

GetServerCapabilitiesXml()

public string GetServerCapabilitiesXml()

Returns

String

GetServerLayerNames()

public Collection<string> GetServerLayerNames()

Returns

Collection<String>

GetServerLayerStyles()

public Collection<string> GetServerLayerStyles()

Returns

Collection<String>

GetServerTileMatrixSetNames()

public Collection<string> GetServerTileMatrixSetNames()

Returns

Collection<String>

GetLayerOutputFormats(String)

public Collection<string> GetLayerOutputFormats(string layerName)

Parameters

layerName String

Returns

Collection<String>

RemoveCachedCapability()

public bool RemoveCachedCapability()

Returns

Boolean

GetTileCore()

protected TileView GetTileCore()

Returns

TileView

OpenAsyncCore()

protected Task OpenAsyncCore()

Returns

Task

GetDrawingCellsCore(RectangleShape, Int32)

protected Dictionary<string, MatrixCell> GetDrawingCellsCore(RectangleShape targetExtent, int tileBuffer)

Parameters

targetExtent RectangleShape

tileBuffer Int32

Returns

Dictionary<String, MatrixCell>

SaveStateCore()

This method saves overlay state to a byte array.

protected Byte[] SaveStateCore()

Returns

Byte[]
A byte array indicates current overlay state.

LoadStateCore(Byte[])

This method restore the overlay state back from the specified state.

protected void LoadStateCore(Byte[] state)

Parameters

state Byte[]
This parameter indicates the state for restore the overlay.

GetZoomLevelSet(String)

public ZoomLevelSet GetZoomLevelSet(string tileMatrixSetName)

Parameters

tileMatrixSetName String

Returns

ZoomLevelSet

Events

SendingWebRequest

public event EventHandler<SendingWebRequestEventArgs> SendingWebRequest;

SentWebRequest

public event EventHandler<SentWebRequestEventArgs> SentWebRequest;

SendingHttpRequest

public event EventHandler<SendingHttpRequestMessageEventArgs> SendingHttpRequest;

ReceivedHttpResponse

public event EventHandler<ReceivedHttpResponseMessageEventArgs> ReceivedHttpResponse;

DrawTilesProgressChanged

This event raises when download progress is changed.

public event EventHandler<DrawTilesProgressChangedTileOverlayEventArgs> DrawTilesProgressChanged;

DrawingTile

This event raises before the tile is drawing.

public event EventHandler<DrawingTileTileOverlayEventArgs> DrawingTile;

DrawnTile

This event raises after the tile is drawn.

public event EventHandler<DrawnTileTileOverlayEventArgs> DrawnTile;

DrawingException

public event EventHandler<DrawingExceptionTileOverlayEventArgs> DrawingException;

DrawnException

public event EventHandler<DrawnExceptionTileOverlayEventArgs> DrawnException;

TileTypeChanged

public event EventHandler<TileTypeChangedTileOverlayEventArgs> TileTypeChanged;

TileTypeChanging

public event EventHandler<TileTypeChangingTileOverlayEventArgs> TileTypeChanging;

Drawing

This event raises before the overlay is drawing.

public event EventHandler<DrawingOverlayEventArgs> Drawing;

Drawn

This event raises after the overlay is drawn.

public event EventHandler<DrawnOverlayEventArgs> Drawn;

DrawingAttribution

public event EventHandler<DrawingAttributionOverlayEventArgs> DrawingAttribution;

DrawnAttribution

public event EventHandler<DrawnAttributionOverlayEventArgs> DrawnAttribution;

ThrowingException

public event EventHandler<ThrowingExceptionOverlayEventArgs> ThrowingException;