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

BaseTrafficIncident

abstract class BaseTrafficIncident : Visitable<TrafficIncidentVisitor!>

Base class that contains details about traffic incident with a set of getters. Subclassed in TrafficIncident.

Constructors

<init>

BaseTrafficIncident()

Base class that contains details about traffic incident with a set of getters. Subclassed in TrafficIncident.

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

Inheritors

TrafficIncident

open class TrafficIncident : BaseTrafficIncident

Contains details of a single traffic incident.

TrafficIncidentCluster

open class TrafficIncidentCluster : BaseTrafficIncident

Contains details of a cluster of incidents and a list of incidents that constitute this cluster.