[問題] 關於錯誤訊息 不知道怎麼修改
我使用 googlemaps API 去亂數產生5個點
不過當我加入 點選事件的時候
卻顯示錯誤>>> http://0rz.tw/vUzbq
以下是 亂數的code
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();
var other_point = [];
var other_latlng = [];
for (var i = 0; i < 5; i++) {
other_point[i] = new GLatLng(southWest.lat() + latSpan *
Math.random(),
southWest.lng() + lngSpan *
Math.random());
other_latlng[i] = new GMarker(other_point[i], g_markerOptions);
map.addOverlay(other_latlng[i]);
GEvent.addListener(other_latlng[i], "click",
function(){other_latlng[i].openInfoWindowHtml("other_info");});
}
麻煩有相關經驗的人幫一下忙 ~ 3Q
--
看著遠方香草天空想妳的笑容
走在熱鬧的午後街道品嚐著寂寞
∮CoMix
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.173.77.67
推
06/05 00:12, , 1F
06/05 00:12, 1F
→
06/05 00:13, , 2F
06/05 00:13, 2F
→
06/05 00:13, , 3F
06/05 00:13, 3F