Route traffic calculation based on Bing maps

I found some interesting code snippets, which allows you to check the estimated travel time to your work, or any other route.
netcscaler.expert’s blog entry

The only problem is, that bing maps is limited to 125000 Requests a year.
Therefore i want to switch to google maps api.

By the way, if you plan to use it, you can define the cronjob without a shell script,
directly in the rules section:

rule "Cron 10 Minutes"
when
	Time cron "0 */10 * * * ?"
then
	executeCommandLine("php /configurations/scripts/route.php")
end

Sounds very nice, ill implement this too.

@3DJupp but when you use google api it doesn’t use in time traffic information, does it?

Google only seems to offer it on it’s business API.

Depending on where you live, there is another alternative:
TomTom’s api (it’s payed, but if you have a free developer key you can test it, which is probably enough for home usage)
http://developer.tomtom.com/io-docs

This site does not exist anymore.
Would you please share your php stuff?

I extracted the Script quickly from my OH setup.
Please fill in the waypoints and an API Key

https://pastebin.com/k6k87ZJw

Great.
Thanks for sharing!

1 Like