Class: Traffic

cercalia.Control.Traffic

Traffic control.
This control shows the following traffic elements:

  • cercalia.MapControls.TrafficOptions.LIVE Live traffic.
  • cercalia.MapControls.TrafficOptions.PREDICTED Predicted traffic.
  • cercalia.MapControls.TrafficOptions.CAMERAS Live traffic cams (only Spain).
  • cercalia.MapControls.TrafficOptions.PKS Highway location marker.
  • cercalia.MapControls.TrafficOptions.WORKS Road works (only Spain).

new cercalia.Control.Traffic()

Extends

Members

staticcercalia.Control.Traffic.PoisCategories{Object.<string, Array.<string>>}

staticcercalia.Control.Traffic.SctDgtLevels{string}

Properties:
Name Type Default Description
YELLOW string yellow
ORANGE string orange
RED string red
BLACK string black
ROADWORKS string accident
INCIDENCE string incidences
ACCIDENT string accident

Methods

Close popups.

Disables the traffic layer option selected by parameter
Options:
cercalia.MapControls.TrafficOptions.LIVE Live traffic
cercalia.MapControls.TrafficOptions.PREDICTED Predicted traffic
cercalia.MapControls.TrafficOptions.CAMERAS Live traffic cams (only Spain)
cercalia.MapControls.TrafficOptions.PKS Highway location marker
cercalia.MapControls.TrafficOptions.WORKS Road works (only Spain)

Name Type Description
option string

Enables the traffic layer option selected by parameter
Options:
cercalia.MapControls.TrafficOptions.LIVE Live traffic
cercalia.MapControls.TrafficOptions.PREDICTED Predicted traffic
cercalia.MapControls.TrafficOptions.CAMERAS Live traffic cams (only Spain)
cercalia.MapControls.TrafficOptions.PKS Highway location marker
cercalia.MapControls.TrafficOptions.WORKS Road works (only Spain)

Name Type Description
option string

getClass(){string} inherited

Returns:
class

getElement(){HTMLElement} inherited

Obtain the control DOM element

Returns:
DOM Element

getGeojsonStrategy_(extent, resolution)

Name Type Description
extent Array.<number>
resolution number

Returns the control name

Returns:
Control name

Hide the control

isTrafficOptionEnabled(option){boolean}

Return boolean if parameter traffic option is enabled or not. Options: cercalia.MapControls.TrafficOptions.LIVE Live traffic
cercalia.MapControls.TrafficOptions.PREDICTED Predicted traffic
cercalia.MapControls.TrafficOptions.CAMERAS Live traffic cams (only Spain)
cercalia.MapControls.TrafficOptions.PKS Highway location marker
cercalia.MapControls.TrafficOptions.WORKS Road works (only Spain)

Name Type Description
option string

setTopBar(idTopBar)

Create the button in the tools topbar

Name Type Description
idTopBar string

Div element ID where the control will be embedded

Shows the control

showAffectationPopup(feature)

Name Type Description
feature ol.Feature