我正在使用下面的代码在 div 中显示谷歌地图。当页面加载时,地图似乎会在稳定之前反弹。有没有办法阻止这种行为?页面在这里。
function initialize() {
myform.search.focus();
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(41.850033, -87.6500523);
var mapOptions = {
zoom: 2,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
}