Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the color of the traffic layer in Google Maps?

Is there a way to change the standard traffic colors of the Traffic Layer of a Google Map?

like image 305
socm_ Avatar asked Jul 09 '14 07:07

socm_


2 Answers

See Styled Maps in the documentation.

For example the following example reduces the saturation on all features and disables labels on roads.

  var styles = [
  {
    stylers: [
      { hue: "#00ffe6" },
      { saturation: -20 }
    ]
  },{
    featureType: "road",
    elementType: "geometry",
    stylers: [
      { lightness: 100 },
      { visibility: "simplified" }
    ]
  },{
    featureType: "road",
    elementType: "labels",
    stylers: [
      { visibility: "off" }
    ]
  }
];

map.setOptions({styles: styles});

I have create one example for you : see this JSFiddle

like image 188
amit gupta Avatar answered Nov 15 '22 09:11

amit gupta


To my knowledge you are not currently able to edit the styles of the traffic layer.

like image 24
Ross Topol Avatar answered Nov 15 '22 10:11

Ross Topol