0
好的,我在加載地圖時遇到了這個問題,這部分將顯示「google」爲undefined
。谷歌地圖加載錯誤「谷歌」undefined
var polyline = [
new Google.map.LatLng(3.032617, 101.376),
new Google.map.LatLng(3.03255, 101.3759),
new Google.map.LatLng(3.032467, 101.3758),
new Google.map.LatLng(3.031867, 101.3753),
new Google.map.LatLng(3.0318, 101.3753)
];
var polylineopts = {
path: polyline,
map: map,
strokecolor: 'blue',
strokeopacity: 1.6,
strokeweight: 3,
geodesic: true
};
var poly = new google.maps.Polyline(polylineopts);
是U包括在頭部即谷歌地圖的js'' –
在這段代碼中沒有任何理由google'would not'undefined'。你爲什麼認爲它不應該? –
你有意使用'var poly = new Google.maps.Polyline(polylineopts);'(大寫)? –