Live Traffic Overlay

Sep 9, 2009 at 11:42 AM

How can we add the Live traffic overlay to the Google Maps?

This is very good feature to the cutomer for checking the Live traffic conditions.

Please suggest...


Sep 9, 2009 at 11:46 AM

the real question is: where to get data about live traffic?

Sep 9, 2009 at 1:03 PM

Google provides the Live Traffic data. When you bowse cities in USA, you can see Live traffic by clicking on the button Live Traffic just beside the Map in the

The java script method is

// The GTrafficOverlay is unique in that only one object of that type // should be added to a map. Adding multiple traffic overlays produces// no added benefit.

var map;var trafficInfo;
function initialize()
 {  map = new GMap2(document.getElementById("map_canvas"));   
map.setCenter(new GLatLng(49.496675,-102.65625), 3);   
var trafficOptions = {incidents:true};  
trafficInfo = new GTrafficOverlay(trafficOptions); 
And one more good feature is weather display
Sep 9, 2009 at 1:07 PM

..and yes, how you we can use API out of browser?

Sep 9, 2009 at 1:13 PM

good question, i have no clue how to use......

It could be great if API works with google maps in windows application.

Sep 9, 2009 at 4:39 PM

definitely, maybe google needs help in that area

Sep 16, 2009 at 5:58 AM

Did you find any information about the Live traffic?

Sep 16, 2009 at 1:10 PM


Sep 17, 2009 at 1:34 AM

I have never bothered to study what google does (buggars constantly change their url's) but Bing maps does this :

static Uri buildUrl(int tileX, int tileY, int zoomLevel, MapTypes mapStyle)
   string quadKey = tileToQuadKey(tileX, tileY, zoomLevel);

   string fileExtension = "";
   string terrain = "";
   string versionNumber = "244";
   string market = "&mkt=en-us";
   char mapStyleCharacter = 'x';

   switch (mapStyle)
    case MapTypes.HybridSateliteLabels:
     fileExtension = ".jpeg";
     mapStyleCharacter = 'h';
    case MapTypes.Map:
     fileExtension = ".png";
     mapStyleCharacter = 'r';
    case MapTypes.Terrain:
     fileExtension = ".png";
     mapStyleCharacter = 'r';
     terrain = "&shading=hill";
    case MapTypes.Satellite:
     fileExtension = ".jpeg";
     mapStyleCharacter = 'a';
    case MapTypes.Traffic:
     fileExtension = ".png";
     mapStyleCharacter = 't';

   if (mapStyle != MapTypes.Traffic)
    return new Uri(String.Concat(new object[] { "http://", mapStyleCharacter, quadKey[quadKey.Length - 1], "", mapStyleCharacter, quadKey, fileExtension, "?g=", versionNumber, market, terrain }));
   return new Uri(String.Concat(new object[] { "http://", mapStyleCharacter, tileX & 1, "", mapStyleCharacter, quadKey, fileExtension }));