Dashboard

Dashboard

The main class of GeoDashboard.

Constructor

new Dashboard(config)

Source:
Parameters:
Name Type Description
config Object

Configuration object

Properties
Name Type Attributes Description
container HTMLElement

Element where the dashboard will be placed

map Object

Map configuration

Properties
Name Type Attributes Description
center Array.<Number>

The initial center for the map

zoom Number

The initial zoom level

mapParams Object <optional>

Extra params for OpenLayers Map constructor

viewParams Object <optional>

Extra params for OpenLayers View constructor

filters Array.<Filter> <optional>

Set of filters to apply to layers and widgets

Members

(readonly) filterString :String

Source:

All filter strings joined by logical operator

Type:
  • String

mapCenter :Array.<Number>

Source:

Map center coordinates

Type:
  • Array.<Number>

mapManager :MapManager

Source:

Dashboard MapManager

Type:

mapZoom :Number

Source:

Map zoom level

Type:
  • Number

widgetManager :WidgetManager

Source:

Dashboard WidgetManager

Type:

Methods

(static) uid()

Source:

Generate random string to use as unique element ID

addBaseLayer(layer)

Source:

Adds base layer to the map

Parameters:
Name Type Description
layer BaseLayer

The base layer to be added

addFilter(filter)

Source:

Adds filter

Parameters:
Name Type Description
filter Filter

The filter to be added

addOverlayLayer(layer)

Source:

Adds overlay layer to the map

Parameters:
Name Type Description
layer OverlayLayer

The overlay layer to be added

addWidget(widget)

Source:

Adds widget to the panel

Parameters:
Name Type Description
widget Widget

The widget to be added

centerMapToFeature(feature)

Source:

Centers map to definied feature

Parameters:
Name Type Description
feature Object

Feature to center

fitMapToLayer(layer)

Source:

Fits map to defined layer

Parameters:
Name Type Description
layer Layer

Layer to fit in map

refresh()

Source:

Refresh all layers and widgets

render()

Source:

Creates the dashboard content and render map and widgets.

resetFilters(filtersopt)

Source:

Resets filters

Parameters:
Name Type Attributes Description
filters Array.<Filter> <optional>

New set of filters

showFeaturePopup(layer, feature)

Source:

Displays feature popup with information

Parameters:
Name Type Description
layer Object

Layer to show

feature Object

Feature to show