Google API - Google

Table of Contents

最近在網路上學怎麼弄 Google API

是用javascript

以下

var points = [new GPoint(121.537757, 25.009629), new GPoint(122.537757, 28.009629),

new GPoint(123.537757, 29.009629), new GPoint(124.537757, 18.009629),

new GPoint(130.537757, 17.009629)];


//]]>

for(var i = 0; i < 5; i++){
document.write(points[i] + " ");
var ttt = new GMarker(points[i]);
map.addOverlay(ttt);
}


為什麼這樣寫她只有插一個點呢??

我有把points每個值印出來

都對

但插點卻只有插到一個

不知錯在哪裡

難道沒辦法用loop一次插很多點嗎

還是有其他辦法呢??

煩請各位先進 不吝幫忙

感激不盡

--

All Comments

Daph Bay avatarDaph Bay2009-05-21
好像應該用 GLatLng 而不是 GPoint 吧