Class: WMTSCapabilities

ol.control. WMTSCapabilities

WMTSCapabilities


new WMTSCapabilities(options)

Parameters:
Name Type Description
options *
Properties
Name Type Argument Default Description
target string | Element <optional>

the target to set the dialog, use document.body to have fullwindow dialog

proxy string <optional>

proxy to use when requesting Getcapabilites, default none (suppose the service use CORS)

placeholder string <optional>
'service url...'

input placeholder, default 'service url...'

title string <optional>
WMTS

dialog title, default 'WMTS'

searchLabel string <optional>
'search'

Label for search button, default 'search'

loadLabel string <optional>
'load'

Label for load button, default 'load'

srs Array.<string> <optional>

an array of supported srs, default map projection code or 'EPSG:3857'

timeout number <optional>
1000

Timeout for getCapabilities request, default 1000

cors boolean <optional>
false

Use CORS, default false

optional string <optional>

a list of optional url properties (when set in the request url), separated with ','

trace boolean <optional>
false

Log layer info, default false

services * <optional>

a key/url object of services for quick access in a menu

Fires:
  • event:load
  • event:capabilities

Extends

Members


error

Error list: a key/value list of error to display in the dialog Overwrite it to handle internationalization

Inherited From:
Overrides:

labels

Form labels: a key/value list of form labels to display in the dialog Overwrite it to handle internationalization

Inherited From:
Overrides:

supportedSets

An array of supported sets (basically EPSG:3857)

Inherited From:
Overrides:

Methods


clearForm()

Clear form

Inherited From:
Overrides:

getCapabilities(url, options)

Get WMS capabilities for a server

Parameters:
Name Type Description
url string

service url

options *
Properties
Name Type Argument Default Description
map string

WMS map or get map in url?map=xxx

version string <optional>
1.3.0

WMS version (yet only 1.3.0 is implemented), default 1.3.0

timeout number <optional>
10000

timout to get the capabilities, default 10000

onload function <optional>

callback function

Inherited From:
Overrides:

getDialog()

Get the dialog

Inherited From:
Overrides:
Returns:
Type
ol.control.Dialog

getLayerFromOptions(options)

Create a new layer using options received by getOptionsFromCap method

Parameters:
Name Type Description
options *
Overrides:

getOptionsFromCap(caps, parent)

Return a WMTS options for the given capabilities

Parameters:
Name Type Description
caps *

layer capabilities (read from the capabilities)

parent *

capabilities

Overrides:
Returns:

options

Type
*

getRequestParam(options)

Get Capabilities request parameters

Parameters:
Name Type Description
options *
Overrides:

isSupportedSet(tm)

Check if the TileMatrixSet is supported

Parameters:
Name Type Description
tm Object
Returns:
Type
boolean

loadLayer(url, layername [, onload])

Load a layer using service

Parameters:
Name Type Argument Description
url string

service url

layername string
onload function <optional>

callback function (or listen to 'load' event)

Inherited From:
Overrides:

setMap(map)

Set the map instance the control is associated with and add its controls associated to this map.

Parameters:
Name Type Description
map _ol_Map_

The map instance.

Inherited From:
Overrides:

showCapabilities(caps)

Display capabilities in the dialog

Parameters:
Name Type Description
caps *

JSON capabilities

Inherited From:
Overrides:

showDialog( [url], options)

Show dialog for url

Parameters:
Name Type Argument Description
url string <optional>

service url, default ask for an url

options *

capabilities options

Properties
Name Type Description
map string

WMS map or get map in url?map=xxx

version string

WMS version (yet only 1.3.0 is implemented), default 1.3.0

timeout number

timout to get the capabilities, default 10000

Inherited From:
Overrides:

showError(error)

Display error

Parameters:
Name Type Description
error *

event

Inherited From:
Overrides:

testUrl(url)

Test url and return true if it is a valid url string

Parameters:
Name Type Description
url string
Inherited From:
Overrides:
Returns:
Type
bolean