MapManager

MapManager

This class takes care of everything related with the Map.

Constructor

new MapManager(configopt)

Source:
Parameters:
Name Type Attributes Description
config Object <optional>

Configuration object

Properties
Name Type Attributes Description
center Array.<Number> <optional>

The initial center for the map

zoom Number <optional>

The initial zoom level

Members

(readonly) filters :String

Source:

Dashboard filters array wrapper

Type:
  • String

(readonly) filterString :String

Source:

Dashboard filter string wrapper

Type:
  • String

Methods

addBaseLayer(layer)

Source:

Adds a BaseLayer to the map.

Parameters:
Name Type Description
layer BaseLayer

The layer to add

addOverlayLayer(layer)

Source:

Adds an OverlayLayer to the map.

Parameters:
Name Type Description
layer OverlayLayer

The layer to add

center(center, zoomopt)

Source:

Centers map to definied coordinates and zoom level

Parameters:
Name Type Attributes Description
center Array.<Number>

Center coordinates

zoom Number <optional>

Zoom level

featurePopup(event)

Source:

Popup handler.

Parameters:
Name Type Description
event Event

The event object triggered by user interaction

fit(extent)

Source:

Fits map to definied extent

Parameters:
Name Type Description
extent Array.<Number>

Array of numbers representing an extent: [minx, miny, maxx, maxy]

fitToLayer(layer)

Source:

Fits map to defined layer

Parameters:
Name Type Description
layer Layer

Layer to fit in map

getLayerById(id) → {Layer}

Source:

Searches and returns a specifc layer

Parameters:
Name Type Description
id String

The layer ID to find

Returns:
Type
Layer

refresh()

Source:

Refreshes all OverLayer layers

render(container)

Source:

Renders the map and all its components into the specefied container.

Parameters:
Name Type Description
container HTMLElement

The element where the map will be rendered

zoom(zoom)

Source:

Zooms map to the defined level

Parameters:
Name Type Default Description
zoom Number 1

Zoom level