Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selecting forests when styling google maps?

Tags:

google-maps

I recently found the google maps-styling(https://developers.google.com/maps/documentation/javascript/styling)

I've been trying to figure out how to hide the forests. (like the green stuff in norway)

And change the color of all land-areas.

using       featureType: "landscape",
        stylers: [
          { visibility: "off" }
        ]
like image 340
Himmators Avatar asked Feb 14 '26 02:02

Himmators


2 Answers

Use this wizard ( http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html ) to customize the styling of your map. Then grab the JSON you created and assign it to your styling variable var styles. Then you can set the style variable in the map options.

The JSON that targets your question should be:

[
  {
    featureType: "landscape.natural",
    stylers: [
      { visibility: "off" }
    ]
  },{
    featureType: "poi.park",
    stylers: [
      { visibility: "off" }
    ]
  }
]

You can use the wizard to change the colors of the land types as well (changing the Hue field).

like image 196
Suvi Vignarajah Avatar answered Feb 16 '26 17:02

Suvi Vignarajah


Apperntly google conciders "forests" a point of interest:

{
 featureType: "poi",
 stylers: [
  { visibility: "off" }
 ]
}
like image 43
Himmators Avatar answered Feb 16 '26 19:02

Himmators



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!