socm_
socm_

Reputation: 787

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?

Upvotes: 7

Views: 2123

Answers (2)

Ross Topol
Ross Topol

Reputation: 31

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

Upvotes: 1

amit gupta
amit gupta

Reputation: 1330

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

Upvotes: 1

Related Questions