94 | | var urlstr= id + " Depth:" + depth; |
95 | | var url="species.asp?id=" + id; |
96 | | var marker = new GMarker(point,{icon:icon, clickable:true,title:urlstr}); |
| 97 | var urlstr= id + " Depth:" + depth; // 提示字串="測站代號 Depth:打撈深度" |
| 98 | var url="species.asp?id=" + id; // 連結網址=http://deepsea.biodiv.tw/species.asp?id=測站代號 |
| 99 | // 產生一個 GMarker 物件 |
| 100 | // - 參考1 http://code.google.com/apis/maps/documentation/reference.html#GMarker |
| 101 | // - 參考2 http://code.google.com/apis/maps/documentation/reference.html#GMarkerOptions |
| 102 | // - GMarker(座標位置, GMarkerOptions) |
| 103 | // - GMarkerOptions={icon:自訂圖示 GIcon 物件, clickable: 可點選(true), title: 顯示提示字串} |
| 104 | var marker = new GMarker(point,{icon:icon, clickable:true, title:urlstr}); |
| 105 | // 用 GEvent.addListener 設定 GMarker 被點選時的事件處理函數 |
| 106 | // 這裡定義的是遇到 click 事件時把 URL 導向到 url 變數設定之連結網址 |