我试图只显示英国的主要道路或M路。
[
{
"featureType": "water",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "road.arterial",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "road.local",
"stylers": [
{ "visibility": "off" }
]
}
]
使用上述选项仍会显示所有A
道路,换言之,道路数量过多:
我只想显示M(蓝色)道路。
答案 0 :(得分:3)
这将隐藏A大道,但显示M大道:
[{"featureType":"road.highway.controlled_access",
"elementType":"all",
"stylers":[{"visibility":"off"}]},
{"featureType":"road.highway",
"elementType":"all",
"stylers":[{"visibility":"on"}]}]
我建议你查看这个(或任何其他谷歌地图样式编辑器) http://www.mapstylr.com/map-style-editor/
您将能够找到可自定义的所有内容。