new cercalia.WMS(name, urls, params, options)
Name | Type | Description |
---|---|---|
name |
string |
Name of WMS layer to paint |
urls |
string | Array.<string> |
URL o URLs (array) from WMS service |
params |
Object |
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)
|
options |
Object |
Hash table with extra options to configure the WMS layer |
Methods
-
destroy()
-
Removes the object with all its attributes
-
getClass(){string}
-
Returns:
ClassName fromcercalia.WMS
object.
-
getLayer(){ol.layer.Tile}
-
Returns:
WMS Source. OL3 Object ol.layer.Tile
-
getMap(){cercalia.Map|null}
-
Returns:
map Map, in case of WMS layer is painted in a map. If not, returns null
-
getName(){string}
-
Returns:
WMS layer name
-
getParams(){Object}
-
Returns:
params Returns WMS 'params'
-
getSource(){ol.source.TileWMS}
-
Returns:
WMS Source. OL3 Object ol.source.TileWMS
-
setMap(map, position)
-
We assign a map to the object. If it's already exist, is deleted in the existing map and WMS layer is painted on the map passed as parameter. If parameter is "null", it's removed from the map.
Name Type Description map
cercalia.Map | null Map.
position
number ZIndex position from layers.
-
updateParams(params)
-
Updates the parameters
Name Type Description params
Object