How to change the color from an especific road on Google Maps?

Is there an EASY way to paint some roads with a color (without creating polygons for each road)?

I need to display some roads with a different color.

Upvotes: 2

Views: 3298

Answers (1)

jeff
jeff

Reputation: 8348

The only built-in functionality for changing roads is based on whether they're highway roads, arterial roads, or local roads. To change the color based on this, you can use a Map Style with the following JSON:

[
  {
    featureType: "road.highway",
    elementType: "geometry.fill",
    stylers: [
      { color: "#3c5980" }
    ]
  },{
    featureType: "road.arterial",
    elementType: "geometry.fill",
    stylers: [
      { color: "#4cb348" }
    ]
  },{
    featureType: "road.local",
    elementType: "geometry.fill",
    stylers: [
      { color: "#ca19bc" }
    ]
  }
]

If you're talking about individual roads, there is no easy or built-in method to do so.

Upvotes: 3

Related Questions