Maps SDK for Web
tt.services.incidentViewport
Provides the current traffic model ID which is the traffic model number for the viewport needed for the Traffic API - Incidents Layer, and the IncidentDetails calls.
It is updated every minute, and is valid for two minutes before it times out.
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.
Constructor
tt.services.incidentViewport([options])
Example
function callbackFn(response) {
console.log(response);
}
tt.services.incidentViewport({
key: <Your API key>
})
.go()
.then(callbackFn);
Parameters
Name | Description |
---|---|
options
Object default:None |
Methods
go( ): Promise
Executes a predefined asynchronous task using the current configuration.
Returns