Maps Web SDK
Class L.TomTomTrafficLayer
Extends | L.TileLayer |
Category | Map |
Tile layer for Leaflet that shows styled traffic tubes using online traffic data from TomTom.
Constructor
L.TomTomTrafficLayer([options])
Parameters
Name | Description | Required | Type/Values | Default |
---|---|---|---|---|
options | It accepts all the options that Leaflet's TileLayer allows. The additional options, which are TomTom specific, are described below. | No | Object | None |
options.key | API key that can be obtained from TomTom's developer portal. This is a key for the traffic services. | No | String | None |
options.style | The traffic layer style to use | No | "s1" | "s2" | "s3" | "night" | "night" |
options.opacity | The traffic incidents layer's opacity set by default to 80%.
A floating point value between 0 and 1 have to be used, where 1 means no transparency.
|
No | Number | 0.8 |