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" feat开发者_如何学运维ureType 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" }
]
}
];
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.
You can use http://googlemapscolorizr.stadtwerk.org/ to test the map. It also Calculates the saturation and lightness to display the correct Hex color.
Styling your google map has never been easier. mapstylr.com
精彩评论