Sorry, you need to enable JavaScript to visit this website.

Traffic incident list

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.

_

let bounds = TTLatLngBoundsMake(TTCoordinate.LONDON_TOP_LEFT(), TTCoordinate.LONDON_BOTTOM_RIGHT())
let query = TTIncidentDetailsQueryBuilder.create(with: .S1, withBoundingBox: bounds, withZoom: 12, withTrafficModelID: "-1")
    .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:

_

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

 

image

Incidents list

image

Incidents list with clusters