好像在頁面加載了谷歌地圖的信息框的位置是錯誤的,或者至少錯了,當你有你的地圖高度設定在低於400/380px 例如 http://jsfiddle.net/TbDzG/18/谷歌地圖API v3的信息窗口
var startLocation = new google.maps.LatLng(36.151685,-115.152438);
function initialize() {
var mapOptions = {
center: startLocation,
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map-canvas"),
mapOptions);
var marker = new google.maps.Marker({
position: startLocation,
map: map,
draggable:true,
animation: google.maps.Animation.DROP,
title:"Hello World!"
});
var infowindow = new google.maps.InfoWindow();
infowindow.setContent('some content here');
infowindow.open(map, marker);
}
google.maps.event.addDomListener(window, 'load', initialize);
沒有人知道如何把它移動到正確的位置和中心的信息框而不是中心的標記?
謝謝了! – Benn