Hi everybody,
I already posted this on the
Meteotemplate forum but I thought I would also put it here as some users may not have acces to the official forum (they should register though. Lots of good stuff there).
I live in a town where traffic can get nasty a certain time in the week. The visitors of my website
www.elspinars.es often visit it in the morning as a one shop stop to get their daily dosis of meteo, but also requested to have some kind of info about the traffic.
That how I came with the trafficAlert block, which is available for download here :
www.elspinars.es/dev/dev.phpConcept is very basic : you define some routes, the block check the time it takes to drive that route and if the time is above certain thresold, it displays an alert, with the possibility to display the current traffic on a map :
I tried to make the setup as user-friendly as possible (but may have failed in the attempt).
After entering an optional block heading, the first step is to add an alert :
Then you define your route name and use the map to define your route.
On the map, a left-click define the center and a right click define the starting and ending point.
The page will update the route and the normal time it takes to drive it. You can then use these values to define your thresolds in the alerts.
You can alernatively enter the values manually and click on the Refresh Map button to see how it looks like.
Then you define your alerts :
For each alert level (Green, Orange, Red), you define the thresold and the message.
You can use tags like %T in your message to display the actual time it takes to drive the route according to Google Maps Directions.
You can also personalize the icon and animate it.
Finally, you can disable an alert level.
When done, click on save, don't forget to add your block on your homepage and you're done.
This is an early version of the block, I would appreciate if you could let me know if you find it useful, if you tried it and if you have any idea on how to improve it.
Next steps will be to allow the users to create their own routes (after registration) and to add notifications in a mobile app on which I am working (also available on my
dev page)
You can either comment on this forum post or leave me a message on my
contact page Cheers,
Pol-Brieuc