close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_fs.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Sep 22, 2008, 11:37:23 PM (18 years ago)
- Author:
-
jazz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v10
|
v11
|
|
| 7 | 7 | * 根據[http://googlemapsapi.blogspot.com/2007/03/kml-and-georss-support-added-to-google.html Google Map API 官方部落格的範例],要將 KML 加入 Google Map 圖層只要簡單的兩行,因此我們把國榮提供的 KML 檔案全部 Load 到圖層上,請看[http://trac.nchc.org.tw/googlemap3.html 第四個成果]。 |
| 8 | 8 | {{{ |
| 9 | | #!java |
| | 9 | #!js |
| 10 | 10 | var gx = new GGeoXml("http://trac.nchc.org.tw/OR1-0866.kml"); |
| 11 | 11 | map.addOverlay(gx); |
| … |
… |
|
| 53 | 53 | * 從這一個範例,我們可以學習到 JavaScript 的多型繼承該怎麼作!! |
| 54 | 54 | {{{ |
| 55 | | #!java |
| | 55 | #!js |
| 56 | 56 | // 首先宣告一個函數 TextualZoomControl() 這個應該就是類別的建構子(Constructor) |
| 57 | 57 | function TextualZoomControl() { |
| … |
… |
|
| 131 | 131 | * 解析 [http://alderaan.arc.nasa.gov/maps/mars/ Polar Mars Example] 原始碼 |
| 132 | 132 | {{{ |
| 133 | | #!java |
| | 133 | #!js |
| 134 | 134 | |
| 135 | 135 | <script src="http://alderaan.arc.nasa.gov/maps/nasamaps.js" type="text/javascript"></script> |
| … |
… |
|
| 174 | 174 | * 繼續解析 [http://alderaan.arc.nasa.gov/maps/nasamaps.js nasamaps.js] |
| 175 | 175 | {{{ |
| 176 | | #!java |
| | 176 | #!js |
| 177 | 177 | |
| 178 | 178 | .. 略 .. |
| … |
… |
|
| 185 | 185 | var layer = new GTileLayer(null, 0, levels); |
| 186 | 186 | // GTileLayer.isPng() 是抽象函數(Abstract), 必須重新定義 |
| | 187 | |
| 187 | 188 | // - 原型為 isPng() 回傳 Boolean |
| 188 | 189 | layer.isPng = function() { return false }; |
| … |
… |
|
| 215 | 216 | * 從這一個範例,我們可以學習到 JavaScript 的多型繼承該怎麼作!! |
| 216 | 217 | {{{ |
| 217 | | #!java |
| | 218 | #!js |
| 218 | 219 | // 首先定義自訂投影座標函數 PolarStereographicProjection 有兩個參數 zoomelevels 跟 type |
| 219 | 220 | // 其中 zoomlevels 跟 GMercatorProjection 一樣,代表分幾種比例尺 |