我发现了如何自定义我的googlemap enter link description here - 但我没找到的是 - >你知道例如选项ROADMAP。这里是地图,在这个拖把上有很多颜色,如绿色,黄色等。有可能使这张地图成为黑白或灰度吗?感谢
答案 0 :(得分:2)
这里用google地图API的谷歌地图设置样式的示例:),希望对此有所帮助 网址:https://developers.google.com/maps/documentation/javascript/styling
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});