对不起,我的英语不好。我使用了谷歌Map的api。有没有办法让省名始终处于短模式?
类似于:province name=“acre”short name=“ac”。
tks!
我的代码:
var customStyled = [
{
featureType: "all",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "administrative.province",
elementType: "labels",
stylers: [
{
visibility: "on"
}
]
},
];
function initMap(data) {
map = new google.maps.Map(document.getElementById("map"), {
//center: new google.maps.LatLng(-13.6632305, -69.6410913),//Brasil
zoom: 4.3,
minZoom: 3,
maxZoom: 7,
streetViewControl: false,
center: BRASIL,
restriction: {
latLngBounds: BRASIL_BOUNDS,
strictBounds: false,
},
stylers: {
color: "#7c0a02",
visibility: "off",
},
});
map.data.setStyle({
fillColor: "red",
strokeWeight: 1
});
map.set('styles', customStyled);
暂无答案!
目前还没有任何答案,快来回答吧!