Skip to content
MagicMirror module showing a map with traffic congestion data from TomTom APIs
JavaScript CSS
Branch: master
Clone or download
Latest commit 80245ca Sep 3, 2019

README.md

MMM-TomTomTraffic

This is a module for the MagicMirror².

This module shows a map with traffic density from TomTom's traffic API.

Example screenshot

Using the module

To use this module, add the following configuration block to the modules array in the config/config.js file:

var config = {
    modules: [
      {
        module: "MMM-TomTomTraffic",
        position: "bottom_left",
        size: "500px";
        config: {
          location: [50.8320000, 4.3818633],
          zoomLevel: 14,
          tomtom: {
            apiToken: "TOM TOM API TOKEN",
            thickness: 4,
          },
          mapbox: {
            apiToken: "MAPBOX API TOKEN",
            mapId: "mapbox/light-v10"
          }
        }
      }
    ]
}

Configuration options

Option Description
location Required Array of Lon, Lat of the center of the map.
zoomLevel Required Zoom level of the map.
tomtom.apiToken Required Tom Tom API token.
tomtom.thickness Optional Thickness factor for the traffic lines.
mapbox.apiToken Optional Mapbox API token. If not provided, no background data will be shown.
mapbox.mapId Optional Mapbox map id. This is of the form "user/styleId". Mapbox provides a couple of default styles. You can also make your own style in MapBox studio. By default, we use MapBox Light v10.
You can’t perform that action at this time.