Maps SDK for Web

tt.TrafficFlowTilesTier

This tier provides Traffic Flow information.

var map = tt.map({
 //your map configuration
});
map.on('load', function() {
    map.addTier(new tt.TrafficFlowTilesTier({
        key: <api key>//your traffic flow api key goes here
        //or provide more detailed configuration
    }))
});

Methods

constructor(options)

Parameters
Name Description
options
Object
default:None
Traffic flow configuration options
options.key
String
default:None
Traffic flow api key
options.style
String
default:'tomtom://vector/1/relative'
The map style. It can be one of following types:
  • Schema, you can use of following values:
    1. tomtom://vector/1/relative
    2. tomtom://vector/1/absolute
    3. tomtom://vector/1/relative-delay
    4. tomtom://raster/1/relative
    5. tomtom://raster/1/absolute
    6. tomtom://raster/1/relative-delay
  • URL to the JSON object conforming to the schema described in the Map Style Specification.
  • JSON object conforming to the mentioned specification.
options.refresh
Number
default:30000
The interval in milliseconds between subsequent refreshes of traffic flow information. Any value lower than 30000 will be treated as 30000