Constructor
new GeoJSONLayer(config, cache, id)
Set all properties for the layer based on the options object.
Parameters:
Name | Type | Description |
---|---|---|
config |
object | |
cache |
object | |
id |
string |
Methods
exportGeometry(mode)
Trigger a file download containing the geometry as a geojson file
Parameters:
Name | Type | Description |
---|---|---|
mode |
string | supported values: "string", "object", "download" (default) |
getBounds() → {object}
Get the bounding box as an object
Returns:
{ min: {x, y}, max: {x, y}, crs: "CRS:84" }
- Type
- object
getFeatureInfo() → {Promise}
Get Info of the last clicked features
Returns:
feature info
- Type
- Promise
setColor(feature, color)
Set color of a feature
Parameters:
Name | Type | Description |
---|---|---|
feature |
object | |
color |
string |
setLabel(feature, label)
Set label of a feature
Parameters:
Name | Type | Description |
---|---|---|
feature |
object | |
label |
string |
setOpacity(opacity)
Set the transparency between 0 and 1
Parameters:
Name | Type | Description |
---|---|---|
opacity |
number |