Maps SDK for Web
Class L.TomTomTrafficFlowLayer
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.noRefresh | Disables periodic updates of traffic flow layer. | No | Boolean | None |
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. The value must be 30000 or greater. | No | Number | 180000 |
Properties
name: String
Default: "trafficFlow"
Name of traffic flow layer. It can be used to differentiate layers.