Class: WMS

cercalia.WMS


new cercalia.WMS(name, urls, params, options)

src/cercalia/wms.js, line 26
Name Type Description
name string

Name of WMS layer to paint

urls string | Array.<string>

URL o URLs (array) from WMS service

params

Object with key / value pairs with the required parameters to launch a GETMAP query to WMS server. If not specified some have associated default value: (name options in capital letters) SERVICE: 'WMS', VERSION: '1.1.1' REQUEST: 'GetMap', STYLES: '', EXCEPTIONS: 'application/vnd.ogc.se_inimage' FORMAT: 'image/jpeg' The following are mandatory: SRS, LAYERS

options

Extra options to configure the WMS layer

Name Type Description
gutter number | undefined

The size in pixels of the gutter around image tiles to ignore. By setting this property to a non-zero value, images will be requested that are wider and taller than the tile size by a value of 2 x gutter. Defaults to zero. Using a non-zero value allows artifacts of rendering at tile edges to be ignored. If you control the WMS service it is recommended to address "artifacts at tile edges" issues by properly configuring the WMS service. For example, MapServer has a tile_map_edge_buffer configuration parameter for this. See http://mapserver.org/output/tile_mode.html.

tileLoadFunction function | undefined

Called function after load tiles.

resolutions Array.<number> | undefined

Only when opt├Čon singleTile is enabled. Specify resolutions in array.

visible boolean | undefined

Visibility. Default is true (visible).

opacity number | undefined

Opacity (0, 1). Default is 1.

singleTile number | undefined

Single tile WMS. Default is false. If false map requests tile sizing is 256x256.

Extends

Methods

destroy()

src/cercalia/wms.js, line 243

Removes the object with all its attributes

getClass(){string} inherited

src/cercalia/object.js, line 41
Returns:
Get Class name of object

getId(){string} inherited

src/cercalia/object.js, line 33
Returns:
Unique Id.

getLayer(){ol.layer.Tile|ol.layer.Image}

src/cercalia/wms.js, line 266
Returns:
WMS Source. OL3 Object ol.layer.Tile

getMap(){cercalia.Map|null}

src/cercalia/wms.js, line 219
Returns:
map Map, in case of WMS layer is painted in a map. If not, returns null

getName(){string}

src/cercalia/wms.js, line 227
Returns:
WMS layer name

getParams(){Object}

src/cercalia/wms.js, line 235
Returns:
params Returns WMS 'params'

getSource(){ol.source.TileWMS|ol.source.Image|null}

src/cercalia/wms.js, line 258
Returns:
WMS Source. ol.source.TileWMS

getWMSOptions(){olx.source.TileWMSOptions|olx.source.ImageWMSOptions|null}

src/cercalia/wms.js, line 202
Returns:
TileWMSOptions.

updateParams(params)

src/cercalia/wms.js, line 211

Updates the parameters

Name Type Description
params Object

WMS Parameters.