Hi, how can I add traffic overlay to map? I installed the GMAP Addon module but could not figure out how to add traffic overlay. Thanks in advance for any suggestion.
Hi, how can I add traffic overlay to map? I installed the GMAP Addon module but could not figure out how to add traffic overlay. Thanks in advance for any suggestion.
Comments
Comment #1
OpenSourcer commentedHi Hankliu
Im not getting much help about overlay issues. hmm. Cannot understand how to use the add on modules that cleary have the overlay functionality.
Comment #2
hankliu commentedHi OpenSourcer, same here. Has anybody successfully added traffic to map?
Comment #3
astro87 commentedHi
You can add overlay to the map by adding 'overlay' sections into your macro in 'Build a GMap macro'. You can use kml files like this which using Google Earth. Instruction is in: modules\gmap_addons\gmap_overlays\README.txt
I builded macro with line 'overlay=kml:http://mapgadgets.googlepages.com/cta.kml ' for tests:
[gmap overlay=kml:http://mapgadgets.googlepages.com/cta.kml |markers=small red::41.840408844786396,-87.71209716796875 |zoom=9 |center=41.887965758804484,-87.81646728515625 |width=700px |height=500px |control=Small |type=Physical]
but something is wrong because I get warning and overlay don't display:
warning: Invalid argument supplied for foreach() in C:\...\drupal-6.16\modules\gmap_addons\gmap_overlays\gmap_overlays.module on line 46.
I tried to open 'http://mapgadgets.googlepages.com/cta.kml' file in Google Earth and it work, so I think something is bad with 'gmap_overlays' module.
I'm using:
PHP 5.3.1
Drupal 6.16
gmap-6.x-1.1-rc1 with some patches for PHP 5.3.1
Sorry for my English.
Comment #4
kpa commentedI've added traffic to the map. I know this thread is a bit old but it might save someone time in the future:
In a javascript file (traffic-overlay.js):
Then:
Comment #5
jkingsnorth commentedThis old issue is in fact fixed!