Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to apply Google Maps API v3 continent/land color style

I'm trying to style my google map so it blends in nicely in my webtheme. Here is the style I'm currently using. anyone knows how to make all land displaying in a specific hex color? I did try this with "administrative.country" featureType without any luck.

var myStyle = [
   {
     featureType: "administrative",
     elementType: "labels",
     stylers: [
       { visibility: "off" }
     ]
   },{
     featureType: " administrative.country",
     elementType: "geometry",
     stylers: [
       { hue:"#6E6E6E"}
     ]
   },{
     featureType: "poi",
     elementType: "labels",
     stylers: [
       { visibility: "off" }
     ]
   },{
     featureType: "water",
     elementType: "labels",
     stylers: [
       { visibility: "off" }
     ]
   },{
     featureType: "road",
     elementType: "labels",
     stylers: [
       { visibility: "off" }
     ]
   }
 ];
like image 856
kasper Taeymans Avatar asked Dec 09 '22 06:12

kasper Taeymans


1 Answers

Was able to mess around with the style wizard here to determine you want to use the landscape feature like this:

[ 
  { 
    featureType: "landscape", 
    elementType: "geometry", 
    stylers: [ 
      { hue: "#ff2200" }, 
      { saturation: 85 }, 
      { lightness: -42 } 
    ] 
  } 
]

Sample using that style.

like image 158
bronsoja Avatar answered Mar 15 '23 21:03

bronsoja