Changeset 70 for oceandb/jQuery_Prototype/script
- Timestamp:
- Mar 5, 2009, 4:09:03 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oceandb/jQuery_Prototype/script/oceandb.js
r68 r70 43 43 } 44 44 // 根據 type_id 逐一加入 owner_org 45 $("#map-menu-" + item.type_id).append("<li><input type='checkbox' id='map-menu-"46 + item.type_id + "-" + count +"'>"45 $("#map-menu-" + item.type_id).append("<li><input type='checkbox' " 46 + "id='map-menu-" + item.type_id + "-" + count +"'>" 47 47 + item.owner_org + "</input></li>"); 48 48 … … 60 60 $.each(json,function(i,item){ 61 61 if(checked) { 62 map.addOverlay(new GMarker(new GLatLng(item.loc1_lat, item.loc1_lon))); 62 var latlon = new GLatLng(item.loc1_lat, item.loc1_lon); 63 var marker = new GMarker(latlon); 64 GEvent.addListener(marker, 'click', function() { 65 map.openInfoWindowHtml(latlon, "參考連結:<a href='" 66 + item.website + "' target='_NEW'>" + item.website + "</a>" 67 + "<iframe width='640' height='300' src='" 68 + item.website + "'/>"); 69 }); 70 map.addOverlay(marker); 63 71 } else { 64 72 map.clearOverlays(); 73 map.closeInfoWindow(); 65 74 } 66 75 });
Note: See TracChangeset
for help on using the changeset viewer.