在 Google Maps v3 中,我似乎无法将我的 infoWindow 设置为小于 200 像素的宽度。这是我正在使用的代码:
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 15,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var myMap = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var gmarker = new google.maps.Marker({position: latLng,title:'Example'} );
var infoWindow = new google.maps.InfoWindow();
infoWindow.setOptions({maxWidth: 110});
window_content = '<div style="width:110px;height:110px;">Test</div>';
infoWindow.setContent(window_content);
infoWindow.open(myMap, gmarker);
有没有办法让 infoWindow 更窄?还是我坚持最小宽度?