Class: IWTraffic

IWTraffic

A class to easily add traffic events and traffic flow to a map.

new IWTraffic(map)

Creates a new instance of IWTraffic.
Parameters:
Name Type Description
map IWMap the map to show the traffic events and flow on.

Methods


hideTrafficEvents()

Removes traffic event markers from the map.
Returns:
Type
void

hideTrafficFlow()

Removes traffic flow from the map.
Returns:
Type
void

isEventsLayerVisible()

Returns true if the map shows traffic flows, false otherwise.
Returns:
Type
boolean

isFlowLayerVisible()

Returns true if the map shows traffic flow, false otherwise.
Returns:
Type
boolean

setTrafficEventsFilter(filter)

Sets a function to filter which traffic events are shown on the map. By default all events are shown.
Parameters:
Name Type Description
filter function the filter function which maps a feature to true or false
Returns:
Type
void

showTrafficEvents()

Displays traffic event markers on the map. The traffic data is determined by the current maptype.
Returns:
Type
void

showTrafficFlow()

Displays traffic flow on the map. The traffic data is determined by the current maptype.
Returns:
Type
void