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 Description
center Array.<Number>

The initial center for the map

zoom Number

The initial zoom level

header Object <optional>

Header configuration

Properties
Name Type Description
title String

Text to show in header

logo String

URL of image to show in header

footer Object <optional>

Footer configuration

Properties
Name Type Description
text String

Text to show in footer

filters Array.<Filter> <optional>

Set of filters to apply to layers and widgets

Members

(readonly) filterString :String

Source:

All filter strings joined by 'AND'

Type:
  • String

mapManager :MapManager

Source:

Dashboard MapManager

Type:

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

centerMap(center)

Source:

Centers map to definied coordinates

Parameters:
Name Type Description
center Array.<Number>

Center coordinates

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

zoomMap(zoom)

Source:

Zooms out map to the defined level

Parameters:
Name Type Description
zoom Number

Zoom level