TTIncidentDetailsQueryBuilder
@interface TTIncidentDetailsQueryBuilder : NSObject
TTIncidentDetailsQueryBuilder
-
Builder of TTIncidentDetailsQueryBuilder object
Declaration
Objective-C
+ (TTIncidentDetailsQueryBuilder *_Nonnull) createWithStyle:(TTTrafficIncidentStyleType)style withBoundingBox:(id)boudingBox withZoom:(NSUInteger)zoom withTrafficModelID:(NSString *_Nonnull)trafficModelID;
Swift
class func create(with style: TTTrafficIncidentStyleType, withBoundingBox boudingBox: Any!, withZoom zoom: UInt, withTrafficModelID trafficModelID: String) -> TTIncidentDetailsQueryBuilder
Parameters
style
The style that will be used to render the traffic tile in the Maps API. This will have an effect on the coordinates of traffic incidents in the reply.
boudingBox
The corners of the area to report on, expressed in the projection specified. These are two latitude-longitude pairs describing corners of the bounding box. First pair for lower left corner and second for upper right. All values should be separated by commas.
zoom
Zoom level. This will affect traffic incident coordinates and determine which incidents are included in clusters rather than reported separately.
trafficModelID
Number referencing traffic model. This can be obtained from the Viewport API. It is updated every minute, and is valid for two minutes before it times out. If the wrong Traffic Model ID is specified, the correct one will be returned by the interface. A value of -1 will always invoke the most recent traffic model
Return Value
TTIncidentDetailsQueryBuilder object
-
Part of builder TTIncidentDetailsQueryBuilder object.
Declaration
Objective-C
- (TTIncidentDetailsQueryBuilder *_Nonnull)withLanguage:(NSString *)language;
Swift
func withLanguage(_ language: String!) -> TTIncidentDetailsQueryBuilder
Parameters
language
ISO 639-1 code for the output language. Affects the
(cause) and (description) fields in the response. Supported languages are ar, ca, cs, da, de, el, en, en-GB, en-US, es, et, fi, fr, he, hu, id, in*, it, iw*, lt, lv, nb, nl, no, pl, pt, ro, ru, sk, sv, th, tr, zh. (* - deprecated) more details: https://developer.tomtom.com/online-traffic/online-traffic-documentation-online-traffic-incidents/traffic-incident-details When invalid language code is provided response is returned in English. When incident cause or description does not have translation, English description is returned. Return Value
TTIncidentDetailsQueryBuilder object
-
Part of builder TTIncidentDetailsQueryBuilder object.
Declaration
Objective-C
- (TTIncidentDetailsQueryBuilder *_Nonnull)withGeometries: (TTTrafficGeometriesType)geometries;
Swift
func withGeometries(_ geometries: TTTrafficGeometriesType) -> TTIncidentDetailsQueryBuilder
Parameters
geometries
The type of vector geometry added to incidents (returned in the
element of the response) original places incidents precisely on the road shifted moves the incident slightly (depending on zoom level) to indicate specific road lanes If this parameter is not used, the response will not contain a element. Return Value
TTIncidentDetailsQueryBuilder object
-
Part of builder TTIncidentDetailsQueryBuilder object.
Declaration
Objective-C
- (TTIncidentDetailsQueryBuilder *_Nonnull)withExpandCluster: (Boolean)expandCluster;
Swift
func withExpandCluster(_ expandCluster: Bool) -> TTIncidentDetailsQueryBuilder
Parameters
expandCluster
List all traffic incidents in a cluster separately.
Return Value
TTIncidentDetailsQueryBuilder object
-
Part of builder TTIncidentDetailsQueryBuilder object.
Declaration
Objective-C
- (TTIncidentDetailsQueryBuilder *_Nonnull)withOriginalPosition: (Boolean)originalPosition;
Swift
func withOriginalPosition(_ originalPosition: Bool) -> TTIncidentDetailsQueryBuilder
Parameters
originalPosition
Return the original position of the incident as well as the one shifted to the beginning of the traffic tube.
Return Value
TTIncidentDetailsQueryBuilder object
-
Specifies HTTP headers for the Request.
Declaration
Objective-C
- (TTIncidentDetailsQueryBuilder *_Nonnull)withHTTPHeaders:(id)headers;
Swift
func withHTTPHeaders(_ headers: Any!) -> TTIncidentDetailsQueryBuilder
Parameters
headers
HTTP headers for the Request
Return Value
TTIncidentDetailsQueryBuilder
-
Build method.
Declaration
Objective-C
- (TTIncidentDetailsQuery *_Nonnull)build;
Swift
func build() -> TTIncidentDetailsQuery
Return Value
TTIncidentDetailsQuery object.