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
options.key
String
default:None

A valid API Key for the requested service.


A valid API 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.

Methods

go( ): Promise

Executes a predefined asynchronous task using the current configuration.

Returns