Maps Web SDK
Class L.TomTomTrafficFlowLayer
Extends | L.TileLayer |
Category | Map |
This is an extension to Leaflet allowing to display TomTom traffic flow layer. It is based on the raster L.TileLayer implementation. The possible options are described below.
Constructor
L.TomTomTrafficFlowLayer([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.style | The traffic flow style to be displayed.
It should be set to one of the following values:
|
No | "absolute" | "relative" | "relative-delay" | "absolute" |
options.opacity | The traffic flow layer's opacity, set by default to 70%.
A floating point value between 0 and 1 have to be used, where 1 means no transparency.
|
No | Number | 0.7 |
options.refresh | The traffic flow information changes and needs to be updated periodically.
By default, it is refreshed every 3 minutes. This parameter's value represents the time in milliseconds between
each update interval. In order to disable this behavior, set it to false or 0 .
|
No | Number | 180000 |