Constructor
new Layer(config, cache, id)
Set all properties for the layer based on the options object.
Parameters:
Name | Type | Description |
---|---|---|
config |
object | |
cache |
object | |
id |
string |
- Source:
Methods
addMessage(message)
Add a message to the layer
Parameters:
Name | Type | Description |
---|---|---|
message |
object |
- Source:
addPopupEvent()
add an event for the buttons in the popup
- Source:
applyFilter()
Apply the defined filter. Uses generic
filter syntax and transforms it internally
- Source:
disable()
Unset the active state of the layer
- Source:
dispose()
Dispose the Layer
- Source:
enable(type)
enables the map layer for the
specific map implementation
Parameters:
Name | Type | Description |
---|---|---|
type |
string |
- Source:
getAttributeNames() → {Array.<string>}
- Source:
Returns:
array of attribute names
- Type
- Array.<string>
getBounds() → {object}
Get the bounding box as an object
- Source:
Returns:
{ min: {x, y}, max: {x, y}, crs: "CRS:84" }
- Type
- object
getColorScale()
Get the active colorscale for the layer
- Source:
getLayerProxy(type) → {object}
returns the map layer proxy for the
specific map implementation
Parameters:
Name | Type | Description |
---|---|---|
type |
string |
- Source:
Returns:
map layer for framework
- Type
- object
getLegendGraphic()
Returns the Legend Graphic for this layer.
May depend on current color scale.
- Source:
Returns:
html
-tag (null or undefined if there is no legend graphic)
getMessages() → {Array.<object>}
Get all active messages
- Source:
Returns:
messages
- Type
- Array.<object>
getOpacity() → {number}
Get the transparency value
- Source:
Returns:
number between 0 and 1
- Type
- number
getPopupEvents()
get the events that can be triggered by buttons in a popup
- Source:
getStyle()
Get the active style of the layer.
- Source:
(async) getUniqueValues(attributeField) → {Array.<string>}
Parameters:
Name | Type | Description |
---|---|---|
attributeField |
string |
- Source:
Returns:
array of unique values
- Type
- Array.<string>
printMetadata()
Print the Metadata from this layer as html.
- Source:
reload()
Reload the Layer on the map
- Source:
removeMessage(message)
Remove a message from the layer
Parameters:
Name | Type | Description |
---|---|---|
message |
object |
- Source:
setColorScale(colorScale)
Set the colorscale for the layer
Parameters:
Name | Type | Description |
---|---|---|
colorScale |
- Source:
setFilter(config)
Set Filter without applying it
Parameters:
Name | Type | Description |
---|---|---|
config |
object | generic filter config |
- Source:
setOpacity(opacity)
Set the transparency between 0 and 1
Parameters:
Name | Type | Description |
---|---|---|
opacity |
number | style name |
- Source:
setProjection(crs)
Switch the projection for the visualization
of the layer. CRS hast to be included in availableCRS.
Parameters:
Name | Type | Description |
---|---|---|
crs |
string | target crs code |
- Source:
setStyle(styleName) → {boolean}
Set the style of the layer.
Parameters:
Name | Type | Description |
---|---|---|
styleName |
string | style name |
- Source:
Returns:
returns true if successful
- Type
- boolean