sdk-traffic / com.tomtom.online.sdk.traffic.incidents.response / TrafficIncident

TrafficIncident

open class TrafficIncident : BaseTrafficIncident

Contains details of a single traffic incident.

Constructors

<init>

TrafficIncident()

Contains details of a single traffic incident.

Functions

accept

open fun accept(visitor: TrafficIncidentVisitor!): Unit

addAffectedRoadNumber

open fun addAffectedRoadNumber(affectedRoadNumber: String!): Unit

addCoordinatesToGeometry

open fun addCoordinatesToGeometry(coordinates: LatLng!): Unit

getAffectedRoadNumbers

open fun getAffectedRoadNumbers(): ImmutableList<String!>!

Gets the road number(s) affected by the incident.

getCause

open fun getCause(): String!

Gets the cause of the incident, where available, in the language requested.

getDelay

open fun getDelay(): Optional<Int!>!

Gets the delay caused by the incident in seconds (except in road closures).

getDescription

open fun getDescription(): String!

Gets the description of the incident in the language requested.

getFrom

open fun getFrom(): String!

Gets the name of the intersection or location where the traffic due to the incident starts.

getGeometry

open fun getGeometry(): ImmutableList<LatLng!>!

A collection of coordinates representing the geometry of the incident. Not available for clusters and incidents that do not have a shape/length.

getOriginalPosition

open fun getOriginalPosition(): Optional<LatLng!>!

Gets the point representing the actual position of the incident. Only present if requested.

getTo

open fun getTo(): String!

Gets the name of the intersection or location where the traffic due to the incident ends.

setDelay

open fun setDelay(delay: Int): Unit

setOriginalPosition

open fun setOriginalPosition(originalPosition: LatLng!): Unit

Inherited Functions

getAdjustedPosition

open fun getAdjustedPosition(): LatLng!

Returns the point where an icon of the cluster or raw incident should be drawn. This is affected by traffic style, zoom level, and road type.

getIconCategory

open fun getIconCategory(): IncidentIconCategory!

Returns the icon category associated with this incident.

getId

open fun getId(): String!

Returns the ID of the traffic incident.

getLengthMeters

open fun getLengthMeters(): Int

Returns the length of the incident in meters.

getMagnitude

open fun getMagnitude(): IncidentMagnitude!

Returns the magnitude of delay associated with this incident.

setIconCategory

open fun setIconCategory(iconCategory: Int): Unit

setMagnitude

open fun setMagnitude(magnitude: Int): Unit