5
在谷歌地圖v3中,我似乎無法讓我的infoWindow的寬度小於200px。這裏是我使用的代碼:谷歌地圖v3 InfoWindow太寬
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更窄?或者我堅持最小寬度?
看起來像這個鏈接已經死了:-( – 2010-11-22 17:52:33