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).

Extends

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
Returns:
class

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

Create the button in the tools topbar

Name Type Description
idTopBar string

Div element ID where the control will be embedded

Shows the control

Name Type Description
feature ol.Feature