Changeset 122 for oceandb/jQuery_Prototype/script/oceandb.js
- Timestamp:
- Dec 8, 2009, 4:34:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oceandb/jQuery_Prototype/script/oceandb.js
r114 r122 1 1 var map; // Google Map2 物件 2 2 var ge; // Google Earth Plugin 物件 3 var icon; 3 var icon; // Google Map2 icon creator 4 4 var tm; // Google Map2 Timeline 5 5 … … 104 104 // 設定地圖高度 105 105 var map_height=document.documentElement.clientHeight - 68; 106 106 107 $('#mapcontainer').css( { height: map_height } ); 107 108 $('#main').css( { height: map_height } ); … … 123 124 // 註冊 window 物件的 onResize Event 124 125 // 參考: http://docs.jquery.com/Events 125 $(window).resize(function() {126 $(window).resize(function() { 126 127 // 當改變瀏覽器大小時,重新設定地圖高度 127 128 var map_height=document.documentElement.clientHeight - 68; … … 135 136 mapId: "map", // Id of map div element (required) 136 137 timelineId: "timeline", // Id of timeline div element (required) 137 datasets: [ 138 datasets: [ 138 139 { 139 id: "artists", 140 title: "Artists", 141 theme: TimeMapDataset.orangeTheme({eventIconPath: "./image"}), 142 // note that the lines below are now the preferred syntax 143 type: "basic", 140 title: "海研三號 OR3-1412", 141 theme: "red", 142 type: "kml", // KML 144 143 options: { 145 items: [ 146 { 147 "start" : "1981", 148 "end" : "2009-01-11", 149 "point" : { 150 "lat" : 23.8123, 151 "lon" : 121.123 152 }, 153 "title" : "中央氣象局", 154 "options" : { 155 // set the full HTML for the info window 156 "infoHtml": "<div class='custominfostyle'><b>中央氣象局.</div>" 157 } 158 }, 159 { 160 "start" : "1991", 161 "end" : "2010", 162 "point" : { 163 "lat" : 22.5234, 164 "lon" : 120.534 165 }, 166 "title" : "海洋科技研究中心", 167 "options" : { 168 // load HTML from another file via AJAX 169 // Note that this may break in IE if you're running it with 170 // a local file, due to cross-site scripting restrictions 171 "infoUrl": "http://www.nchc.org.tw", 172 "theme": TimeMapDataset.redTheme({eventIconPath: "./image"}) 173 } 174 }, 175 { 176 "start" : "2001", 177 "end" : "2020", 178 "point" : { 179 "lat" : 24.8345, 180 "lon" : 122.845 181 }, 182 "title" : "經濟部水利署", 183 "options" : { 184 // use the default title/description info window 185 "description": "Renaissance Man", 186 "theme": TimeMapDataset.yellowTheme({eventIconPath: "image/"}) 187 } 188 } 189 ] 144 url: "data/kml/OR3-1412.kml" // Load KML file 145 } 146 } 147 /* 148 { 149 title: "海研三號 OR3-1412", 150 theme: "green", 151 type: "progressive", 152 options: { 153 // Data to be loaded in JSON from a remote URL 154 type: "json", // JSON 155 // url with start/end placeholders 156 // url: "http://s2home.nchc.org.tw/oid/data/test.json", 157 // TestCase 158 // url: "http://www.nickrabinowitz.com/projects/timemap/progsvc.php?start=[start]&end=[end]&callback=", 159 start: "1989-01-01", 160 // lower cutoff date for data 161 dataMinDate: "2009-12-31", 162 // four months in milliseconds 163 interval: 10368000000, 164 // function to turn date into string appropriate for service 165 formatDate: function(d) { 166 return TimeMap.util.formatDate(d, 1); 190 167 } 191 } 192 ], 193 bandIntervals: [ 168 } 169 } 170 */ 171 ], 172 bandInfo: [ //上軸時間間隔與大小設定 173 { 174 width: "70%", 175 intervalUnit: Timeline.DateTime.MONTH, 176 intervalPixels: 210 177 }, 178 { //下軸時間間隔與大小設定 179 width: "30%", intervalUnit: Timeline.DateTime.YEAR, 180 intervalPixels: 150, 181 showEventText: false, 182 trackHeight: 0.2, 183 trackGap: 0.2 184 } 185 ], 186 /* 187 bandIntervals: [ 194 188 Timeline.DateTime.DECADE, 195 189 Timeline.DateTime.CENTURY 196 ]197 }); 198 // manipulate the timemap further here if you like190 191 ] */ 192 }); 199 193 200 194 if (GBrowserIsCompatible()) {
Note: See TracChangeset
for help on using the changeset viewer.