Maps SDK for Web

tt.TrafficIncidentTier

This tier provides both traffic incidents details and tiles information.

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

Methods

constructor(options, [position=3])

Parameters
Name Description
options
Object
default:None
Traffic incidents options.
options.key
String
default:None
Traffic incident api key. This key is shared between traffic incident details and tiles services.
options.incidentDetails
Boolean | Object
default:None
Traffic incident details - pass true to display incident details or an object with options.
style
String
default:None
Style of traffic incidents details (may change their position). Supported values are: s1, s2 and s3.
markerOptions
String
default:None
Marker options to for {{#crossLink "Maps.IncidentMarker"}}{{/crossLink}}.
options.incidentTiles.style
String
default:'tomtom://vector/1/s1'
The traffic incident tiles style. It can be one of following types:
  • Schema, you can use of following values:
    1. tomtom://vector/1/s1
    2. tomtom://vector/1/s2
    3. tomtom://vector/1/s3
    4. tomtom://raster/1/s1
    5. tomtom://raster/1/s2
    6. tomtom://raster/1/s3
  • URL to the JSON object conforming to the schema described in this compatible specification.
  • JSON object conforming to the mentioned specification.
options.refresh
Number
default:30000
The interval in milliseconds between subsequent refreshes of traffic incident information. Any value lower than 30000 will be treated as 30000. This interval affects both traffic incident details and tiles services.
position
Number
default:3
The tier's position in a map style.