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.
Response
The response is extended with getTrackingId()
method, which returns the Tracking-ID
associated with the request.
Please refer to Difference between API responses and this library's responses section.
Constructor
tt.services.incidentViewport([options], [additionalOptions])
Example
function callbackFn(response) {
console.log(response);
}
tt.services.incidentViewport({
key: <Your API key>
}).then(callbackFn);
Parameters
Name | Description |
---|---|
options
Object default:None |
|
additionalOptions
Object default:None |
Additional options to be passed to the service. |
additionalOptions.abortSignal
Object default:None |
Signal created with abortController. Use AbortController to cancel requests in progress. Example
|
options.key
String default:None |
A valid API Key for the requested service. Key is required to make use of the given service. It can be issued in the Developer Portal. |
options.protocol
"http" | "https" default:"https" |
The protocol type to be used in the calls. Represents the type of protocol used to perform a service call. |
options.trackingId
String default:uuid |
Sets value of "Tracking-ID" header. Specifies an identifier for the request. If not set by the user, UUID is generated for each call.
|