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. |
markerOptions
String default:None |
Marker options to for {{#crossLink "Maps.IncidentMarker"}}{{/crossLink}}. |
options.incidentTiles.style
String default:None |
The url pointing to a traffic incident tiles style. Either this option or 'options.incidentTiles.theme' may be provided but not both. |
options.incidentTiles.theme
ITrafficIncidentThemeOptions default:None |
The set of parameters describing a chosen predefined traffic incident tiles theme. Either this option or 'options.style' may be provided but not both. |
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. |