使用Google Maps API V3,是否可以仅显示州界限而不显示其他内容?
我尝试过使用google.maps.MapTypeStyleFeatureType并关闭所有功能,但我仍然比我想要的更多。
即使使用mapType = Road,您仍会看到地形信息。
如何才能获得一个没有其他内容的简单边界地图?
答案 0 :(得分:1)
尝试使用此样式对象,希望它正是您正在寻找的。有许多站点允许您使用GUI自定义样式。 Try this one
[
{
"featureType": "water",
"stylers": [{ "visibility": "off" }]
},{
"featureType": "landscape",
"stylers": [{ "visibility": "off" }]
},{
"featureType": "poi",
"stylers": [{ "visibility": "off" }]
},{
"featureType": "transit",
"stylers": [{ "visibility": "off" }]
},{
"featureType": "road",
"stylers": [{ "visibility": "off" }]
},{
"featureType": "administrative",
"stylers": [{ "visibility": "off" }]
},{
"featureType": "administrative.country",
"stylers": [{ "visibility": "on" }]
},{
"featureType": "administrative.country",
"elementType": "labels.text",
"stylers": [{ "visibility": "off" }]
},{
"featureType": "administrative.province",
"stylers": [{ "visibility": "on" }]
},{
"featureType": "administrative.province",
"elementType": "labels.text",
"stylers": [{ "visibility": "off" }]
}
]