Hi MagicMirror builders!
I programmed, or better said configured, a module that gets the traffic data from TomTom. The result is my module called MMM-TomTomTrafficIncidents. Please feel free to comment. This module displays traffic load and information where you don’t need a Google/MS account or leave Credit Card information. The traffic can be displayed absolute like other services commonly do. Or on a relative basis. Meaning if traffic has a speed limit of 50 km/h it will be marked green when people are driving 40-50. It will be red when it congested. Do you want to know where to drive fast? Use the absolute option. Very nifty option from TomTom.
Example in Beervana where I placed a marker on a brewery :
Absolute (slow and fast traffic):
Relative traffic (slower than normal):
Relative delay (showing only the differences with normal flow)
I’ve chosen to keep the code simple to make it clear that it is a wrap around the TomTom’s Maps SKD for Web. No things like new object().setThing().color().
The settings you can make:
- Location, size, and zoom level
- Type of traffic: absolute, relative of relative delay.
- Showing traffic reports and incidents
- Showing a marker (and size)
- Refresh rate
- Get the scripts and css local or from TomTom’s website.
I am very happy that TomTom offers the WebAPI. It is barely programming at all. I would recommend to make your own module with their MapSDK for the Web. The best part is that there is no credit card needed! A username with email address is enough. If you run out of data, you’ll get an error back. For personal use, it is very hard to reach this limit. Assuming hat you don’t refresh every 5 minutes of a very large area.
If you want to use your own map and only use the GEO information from TomTom, I would recommend to look at their other APIs on [https://developer.tomtom.com/#](TomTom Developer Portal)