THIS SDK ISDEPRECATED.

We rolled out a new and better SDK for you.

Traffic incident list

Give your users information about traffic incidents so they can adjust their commute according to the traffic situation.

Sample use case: You are about to drive and you want to avoid roads with traffic incidents on your way. Use the traffic incident list to have the overview of which streets might be blocked or congested due to accidents, road works, or possible rain, ice, flooding, etc.

Use the following code snippet to try this in your app.

1let bounds = TTLatLngBoundsMake(TTCoordinate.LONDON_TOP_LEFT(), TTCoordinate.LONDON_BOTTOM_RIGHT())
2let query = TTIncidentDetailsQueryBuilder.create(with: .S1, withBoundingBox: bounds, withZoom: 12, withTrafficModelID: "-1")
3 .build()
TTLatLngBounds bounds = TTLatLngBoundsMake([TTCoordinate LONDON_TOP_LEFT], [TTCoordinate LONDON_BOTTOM_RIGHT])
TTIncidentDetailsQuery *query = [[TTIncidentDetailsQueryBuilder createWithStyle:TTTrafficIncidentStyleTypeS1 withBoundingBox:bounds withZoom:12 withTrafficModelID:@"-1"] build];

An example implementation of the callback of the Response from the Traffic Incident Details service:

1func incidentDetails(_: TTTrafficIncidents, completedWith response: TTIncidentDetailsResponse) {
2 progress.hide()
3 displayResults(response.incidents)
4}
1- (void)incidentDetails:(TTTrafficIncidents *)trafficIncidents completedWithResponse:(TTIncidentDetailsResponse *)response {
2 [self.progress hide];
3 [self displayResults:response.incidents];
4}

image

Incidents list

image

Incidents list with clusters