Class: WmtsLayer

WmtsLayer(config, timeString)

Displays a WMTS image layer.

Constructor

new WmtsLayer(config, timeString)

Constructs a WMTS image layer.
Parameters:
Name Type Description
config Object Specifies configuration information for the layer. Must contain the following properties:
  • identifier: {String} The layer name.
  • service: {String} The URL of the WMTS server
  • format: {String} The mime type of the image format to request, e.g., image/png.
  • tileMatrixSet: {{}} The tile matrix set to use for this layer.
  • style: {String} The style to use for this layer.
  • title: {String} The display name for this layer.
timeString String The time parameter passed to the WMTS server when imagery is requested. May be null, in which case no time parameter is passed to the server.
Source:
Throws:
If the specified layer capabilities reference is null or undefined.
Type
ArgumentError

Extends

Members

detailControl :Number

Controls the level of detail switching for this layer. The next highest resolution level is used when an image's texel size is greater than this number of pixels, up to the maximum resolution of this layer.
Type:
  • Number
Default Value:
  • 1.75
Source:

(readonly) displayName :String

The displayName specified to this layer's constructor.
Type:
  • String
Overrides:
Source:

enabled :Boolean

Indicates whether to display this layer.
Type:
  • Boolean
Inherited From:
Default Value:
  • true
Source:

(readonly) imageFormat :String

The image format specified to this layer's constructor.
Type:
  • String
Source:

(readonly) inCurrentFrame :Boolean

Indicates whether elements of this layer were drawn in the most recently generated frame.
Type:
  • Boolean
Overrides:
Source:

(readonly) layerIdentifier :String

The WMTS layer identifier of this layer.
Type:
  • String
Source:

maxActiveAltitude :Number

The eye altitude below which this layer is displayed, in meters.
Type:
  • Number
Inherited From:
Default Value:
  • Number.MAX_VALUE (always displayed)
Source:

minActiveAltitude :Number

The eye altitude above which this layer is displayed, in meters.
Type:
  • Number
Inherited From:
Default Value:
  • -Number.MAX_VALUE (always displayed)
Source:

opacity :Number

This layer's opacity, which is combined with the opacity of shapes within layers. Opacity is in the range [0, 1], with 1 indicating fully opaque.
Type:
  • Number
Inherited From:
Default Value:
  • 1
Source:

pickEnabled :Boolean

Indicates whether this layer is pickable.
Type:
  • Boolean
Overrides:
Default Value:
  • true
Source:

(readonly) resourceUrl :String

The url specified to this layer's constructor.
Type:
  • String
Source:

(readonly) styleIdentifier :String

The style identifier specified to this layer's constructor.
Type:
  • String
Source:

(readonly) tileMatrixSet :String

The tileMatrixSet specified to this layer's constructor.
Type:
  • String
Source:

time :Date

The time to display. This property selects the layer contents that represents the specified time. If null, layer-type dependent contents are displayed.
Type:
  • Date
Inherited From:
Source:

(readonly) timeString :String

The time string passed to this layer's constructor.
Type:
  • String
Source:

Methods

(static) createTileMatrixSet(params)

Constructs a tile matrix set object.
Parameters:
Name Type Description
params Object Specifies parameters for the tile matrix set. Must contain the following properties:
  • matrixSet: {String} The matrix name.
  • prefix: {Boolean} It represents if the identifier of the matrix must be prefixed by the matrix name.
  • projection: {String} The projection of the tiles.
  • topLeftCorner: {Array} The coordinates of the top left corner.
  • extent: {Array} The boundinx box for this matrix.
  • resolutions: {Array} The resolutions array.
  • matrixSet: {Number} The tile size.
Source:
Throws:
  • If the specified params.matrixSet is null or undefined. The name of the matrix to use for this layer.
    Type
    ArgumentError
  • If the specified params.prefix is null or undefined. It represents if the identifier of the matrix must be prefixed by the matrix name
    Type
    ArgumentError
  • If the specified params.projection is null or undefined.
    Type
    ArgumentError
  • If the specified params.extent is null or undefined.
    Type
    ArgumentError
  • If the specified params.resolutions is null or undefined.
    Type
    ArgumentError
  • If the specified params.tileSize is null or undefined.
    Type
    ArgumentError
  • If the specified params.topLeftCorner is null or undefined.
    Type
    ArgumentError

(static) formLayerConfiguration(wmtsLayerCapabilities, style, matrixSet, imageFormat) → {Object}

Forms a configuration object for a specified WmtsLayerCapabilities layer description. The configuration object created and returned is suitable for passing to the WmtsLayer constructor.

This method also parses any time dimensions associated with the layer and returns them in the configuration object's "timeSequences" property. This property is a mixed array of Date objects and PeriodicTimeSequence objects describing the dimensions found.

Parameters:
Name Type Description
wmtsLayerCapabilities WmtsLayerCapabilities The WMTS layer capabilities to create a configuration for.
style string The style to apply for this layer. May be null, in which case the first style recognized is used.
matrixSet string The matrix to use for this layer. May be null, in which case the first tileMatrixSet recognized is used.
imageFormat string The image format to use with this layer. May be null, in which case the first image format recognized is used.
Source:
Throws:
If the specified WMTS layer capabilities is null or undefined.
Type
ArgumentError
Returns:
A configuration object.
Type
Object

(protected) doRender(dc)

Subclass method called to display this layer. Subclasses should implement this method rather than the render method, which determines enable, pick and active altitude status and does not call this doRender method if the layer should not be displayed.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Overrides:
Source:

(protected) isLayerInView(dc) → {boolean}

Indicates whether this layer is within the current view. Subclasses may override this method and when called determine whether the layer contents are visible in the current view frustum. The default implementation always returns true.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Overrides:
Source:
Returns:
true If this layer is within the current view, otherwise false.
Type
boolean

refresh()

Refreshes the data associated with this layer. The behavior of this function varies with the layer type. For image layers, it causes the images to be re-retrieved from their origin.
Inherited From:
Source:

render(dc)

Displays this layer. Subclasses should generally not override this method but should instead override the doRender method. This method calls that method after verifying that the layer is enabled, the eye point is within this layer's active altitudes and the layer is in view.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Inherited From:
Source: