好的,经过更多的实验,这就是我解决的问题....在第一种样式中将所有颜色设置为灰色(或您希望平面图采用的任何颜色),然后在以下样式中重新着色您想要的所有颜色。这导致平面图显示为单个颜色块。
var styles = [
{
featureType: "all",
stylers: [
{ color: "#505050" }
]
},
{
featureType: "road",
elementType: "geometry",
stylers: [
{ visibility: "simplified" },
{ color: '#505050' }
]
},
{
featureType: "all",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "administrative",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "transit",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "poi",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "landscape",
stylers: [
{ color: '#FF0000' }
]
},
{
featureType: "landscape.man_made",
stylers: [
{ color: '#393939' }
]
},
{
featureType: "landscape.natural",
stylers: [
{ color: '#393939' }
]
},
{
featureType: "water",
stylers: [
{ color: '#252525' }
]
}
];