Maps SDK for Web
tt.services.incidentDetails
Provides current traffic incidents in a given region, on a given zoom level with a given style using the TomTom Traffic API - Traffic Incidents Details
The current road situation is updated every minute. Please use the IncidentViewport service in conjunction with your request to get traffic incidents aligned with other services.
Parameters need to be passed to the constructor. The method go performs the actual call.
The SDK provides a Promise polyfill for browsers (IE<9) without native ECMAScript 6 support.
The final response from this service is a GeoJSON object.
Constructor
tt.services.incidentDetails([options])
Example
function callbackFn(response) {
console.log(response);
}
tt.services.incidentDetails({
key: '<Your API key>',
boundingBox: '0,0,1,1',
style: 's1',
zoomLevel: 12
})
.go()
.then(callbackFn);
Parameters
Name | Description |
---|---|
options
Object default:None |
Methods
go( ): Promise
Executes a predefined asynchronous task using the current configuration.
Returns