我使用谷歌地图API V3的“X”和得到这个错误,而使用遗漏的类型错误:无法读取属性未定义common.js
map.fitBounds(范围);功能
,这里的错误快照是代码:
var arr = [{lat: -25.363, lng: 131.044}, {lat: 12.97, lng: 77.59}];
for (i = 0; i < arr.length; i++) {
bounds.extend(new google.maps.LatLng(arr[i]));
}
map.fitBounds(bounds); //If I comment this line in m code, the error is gone but map does not load.
是什么问题?我又该如何解决它?
显示您的全部代码 –
请参阅代码现在.. – Gora
是onload方法中的代码? –