Class: GeoJSONLayer

vef.map.layer.GeoJSONLayer(config, cache, id)

GeoJSON Layer Implementation

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
Author:
Source:

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)
Source:

getBounds() → {object}

Get the bounding box as an object
Source:
Returns:
{ min: {x, y}, max: {x, y}, crs: "CRS:84" }
Type
object

getFeatureInfo() → {Promise}

Get Info of the last clicked features
Source:
Returns:
feature info
Type
Promise

setColor(feature, color)

Set color of a feature
Parameters:
Name Type Description
feature object
color string
Source:

setLabel(feature, label)

Set label of a feature
Parameters:
Name Type Description
feature object
label string
Source:

setOpacity(opacity)

Set the transparency between 0 and 1
Parameters:
Name Type Description
opacity number
Source: