sdk-traffic / com.tomtom.online.sdk.traffic.incidents.query / IncidentDetailsQueryBuilder

IncidentDetailsQueryBuilder

class IncidentDetailsQueryBuilder : IIncidentDetailsQuery

The default builder for IncidentDetailsQuery objects.

Constructors

<init>

IncidentDetailsQueryBuilder(style: IncidentStyle, boundingBox: BoundingBox, zoom: Int, trafficModelId: String)

The default builder for IncidentDetailsQuery objects.

Functions

build

fun build(): IncidentDetailsQuery

Creates new instance of IncidentDetailsQuery.

withExpandCluster

fun withExpandCluster(expandCluster: Boolean): IncidentDetailsQueryBuilder

Sets whether a list of separate incidents should be added to clusters.

withGeometryType

fun withGeometryType(geometryType: IncidentGeometryType): IncidentDetailsQueryBuilder

Sets the type of vector geometry added to incidents.

withIncludeOriginalPosition

fun withIncludeOriginalPosition(includeOriginalPosition: Boolean): IncidentDetailsQueryBuilder

Sets whether the original position of the incident should be returned along with the one shifter to the beginning of the traffic tube.

withIsoLanguage

fun withIsoLanguage(isoLanguage: String): IncidentDetailsQueryBuilder

ISO 639-1 code for the output language. See https://developer.tomtom.com/online-traffic/online-traffic-documentation-online-traffic-incidents/traffic-incident-details for a list of supported languages and their ISO codes.

withLanguage

fun withLanguage(language: IncidentResponseLanguage): IncidentDetailsQueryBuilder

Sets the language to use in the Response to a created query.

Companion Object Functions

create

fun create(style: IncidentStyle, boundingBox: BoundingBox, zoom: Int, trafficModelId: String): IncidentDetailsQueryBuilder

Builder used to create an instance of IncidentDetailsQuery, once constructed, the user cannot change the field values.