2009 5 May 2009 : 1000-5463 (2009) 02-0106 - 05 ( ) JOURNAL OF SOUTH CH INA NORMAL UN IVERSITY (NATURAL SC IENCE ED ITION) 2009 2 No. 2, 2009 Googl e Map s, 3 (, 510631) : Google Map s, Google Map s GIS. Google Map s, Google Map s, Google Map s Javascrip t AP I C# Google. : Google Map s; ; : K99 : A GIS, GIS 50%.. Google Map s,,,. GIS, 2 : W eb, Google Map s? Google Map s,., Google? Google Map s, Google Map s. Google Map s, Goolge Map s Javascrip t AP I C# Google Map s. 1 Google Map s Google, W eb. 2 : W GS84,,., Google Map s 0 17 18, 0., 256 256., Google Map s. 1. 1 Google Map s, HTTP : http: / /kh0. google. com /kh? n = 404&v = 8&t = t, t, " t" 1, 18. Google Map s, 0 17 18, 256 256 PNG.,, Google Map s QRTS 4, 1. : 2008-04 - 18 : (40871086) : (1983 - ),,, 2006 ; (1969 - ),,,, :, Email: huwp@ scnu. edu. cn. 3
2 : Google Map s 107 1 Fig. 1 The illustration of Quadtree coding t = sq, t sq, 2, 17 = 19-2, 2 2 = 4, t = sq 1 SQ. n, 2 (18 - n). W eb, 4 Google : (1) http: / /kh3. google. com /kh? n = 404&v = 8&t = tq, 2 ( a) ; (2) http: / /kh2. google. com /kh? n = 404&v = 8&t = tr, 2 ( b) ; (3) http: / /kh1. google. com /kh? n = 404&v = 8&t = tt, 2 ( c) ; (4) http: / /kh0. google. com /kh? n = 404&v = 8&t = ts, 2 ( d). 2 Google Fig. 2 Google image data 1. 2 90 ( ) - 90 ( ), 0 180, 0, 180., 180 ( ) 180 ( ), 0 360.,? Google Map s,,. C#. (1),. int getlatitudeform ercator( double latitude, int zoom) { double phi = Math. P I 3 latitude / 180; / / double resolution = 0. 5 3 M ath. Log ( ( 1 (phi) ) / (1 - Math. Sin (phi) ) ) ; TileY) ) ; double maxtiley = Math. Pow (2, zoom) ; + Math. Sin int result = ( int) ( ( (1 - res / Math. P I) / 2) 3 (max2 return ( result) ; } (2),. int getlongitudeform ercator( double longitude, int zoom) { double resolution = ( longitude + 180) / 360; return ( int) ( resolution 3 Math. Pow (2, zoom) ) ; } (3). string getsatellitietile ID ( int row, int col, int zoom) { string tileid = " t" ; double locatxm in = 0, locatxmax = Math. Pow ( 2, zoom) ; double locatym in = 0, locatymax = Math. Pow ( 2, zoom) ; double locatxm id, locatym id; for ( int i = 0; i < zoom; i + + ) { locatxm id = ( locatxmax + locatxm in) /2; locatym id = ( locatymax + locatym in) /2; if ( row < locatym id) { locatymax = locatym id; if ( col < locatxm id) { tileid + = " q" ; locatxmax = locatxm id; }
108 ( ) 2009 tileid + = " r" ; locatxm in = locatxm id; } } locatym in = locatym id; if ( col < locatxm id) { tileid + = " t" ; locatxmax = locatxm id; } tileid + = " s" ; locatxm in = locatxm id; } } } return tileid; } 2 Google Map s A jax Google Map s, 2, ; A jax. A jax A synchronous JavaScrip t and XML, JavaScrip t XML. A jax, W eb,,, A jax, 3. 3 A jax B /S Fig. 3 The comparison between A jax model and B /S model 3 ( ),,,, W eb ; A jax,, A jax,,. Google Map s,,. Google, Google 4, kh0, kh1, kh2 kh3. 3 Google Map s JavaScrip t AP I Google Map s, JavaScrip t AP I, W ebgis Google Map s, Google Map s. Google Map s AP I, http: / / code. google. com / ap is/ intl/ zh - CN /map s/ signup. ht2 m l AP I Key. AP I Key, Google Map s, : < scrip t src = http: / /ditu. google. com /map s? file = ap i& v = 2& amp; key = " Key" type = " text/ javascrip t" > < / scrip t > Google Map s JavaScrip t AP I,, : (1) AP I., 500, 000,. ( 2) AP I Key 15, 000. 24, AP I Key. (3) AP I. (4). Google, Google. ( 5). AP I.. ( 6) Google (7) AP I,
2 : Google Map s 109 Google Map s Javacsrip t AP I W eb2 GIS, Google Map s. 4 Google Map s Google Map s Javascrip t AP I,, Google, ;,, W ebgis. 4. 1 C #, SharpDevelop,. NET Framework,. NET. 4. 2 Google Map s 2, 1, HTTP : http: / /map s. google. com / map s? output = km l&q =, q,, KML, KML Google Earth. 2 Google Map s JavaScrip t AP I., 1, Google Map s KML,, Google Map s Javascrip t AP I 2. KML : Stream stream = null; Xm ldocument doc; H ttpw ebrequest km lreq = W ebrequest. Create ( " http: / /map s. google. com /map s? output = km l&q = " + querystring ) as H ttp2 W ebrequest; H ttpw ebresponse km lresponse = (H ttpw ebresponse) km lreq. GetResponse ( ) ; stream = response. GetResponseStream ( ) ; StreamReader sr = new StreamReader( stream) ; string km lstr = sr. ReadToEnd ( ) ; doc = new Xm ldocument( ) ; doc. LoadXm l( km lstr) ; Xm lnodel ist longitudes = doc. GetElementsByTagName ( " longitude" ) ; Xm lnodel ist latitudes = doc. GetElementsByTagName ( " latitude" ). 4. 4. 3 4 Fig. 4 The flow chart of p rogram 5, Guangzhou, 10. 5 Fig. 5 The result of app lication, Google Map s.,, 2, China,, Kunm ing,, China,, Meizhou,,. 5 Google Map s,, C # Google Map s
110 ( ) 2009,,,. Google Map s KML Google Map s JavaScrip t AP I, W ebgis,. : [ 1 ] Google Map s AP I[ EB /OL ]. http: / /code. google. com / intl/zh - CN /ap is/map s/, 2008. 1. 01. [ 2 ],. Google AP I [M ]. :, 2008: 7-36. [ 3 ],,. Google Map s [ J ],, 2006 (3) : 16-19. FU Hai - yue, ZHAO Jun, L I Man - chun. Challenges and countermeasures of globalizing geographic information services in China from the view of google map s[ J ]. Geog2 raphy and Geo - Information Science, 2006 (3) : 16-19. [ 4 ],. Goolge Map s AP I W EBGIS [ J ]., 2006 (7) : 224-226. SUN Xiao - ru, ZHAO Jun. App lying google map sap I in W ebgis[ J ]. Controls & Automation, 2006 ( 7) : 224-226. [ 5 ] LOW Y J. NET [M ]. :, 2007: 30-120. [ 6 ] DUFFY J. NET Framework 2. 0 [M ]. :, 2007: 54-145. [ 7 ],,. [ J ]. :, 2007 (4) : 51-58. WANG Yong - mei, SHU Yu - qin, HU W ei - p ing. Es2 tablishment of 3D models for the campus of South China Normal University[ J ]. Journal of South China Normal U2 niversity: Natural Science Edition, 2007 ( 4) : 51-58. [ 8 ],,. A jax W ebgis [ J ]., 2007 (1) : 3-5. XU Zhou - kui, L IU De - qin, L IN Zong - jian. On ap2 p lication of A jax in W ebgis[ J ]. Journal of Geomatics, 2007 (1) : 3-5. RESEARCH O F GOO GL E M APSπO PERAT IO N M ECHAN ISM AND APPL ICAT IO N WU Xi - bo, HU W ei - p ing 3 ( School of Geography, South China Normal University, Guangzhou 510631, China) Abstract: Google Map s p rovides a lot of digital map data and satellite image data about the whole earth in free and it is possible for users to utilize these free geographic data into their GIS app lication with the help of good design of Google Map s. The operation mechanism of Google Map s is analyzed and some methods for how to get these free geo2 graphic data from Google map s are p roposed in this article. Finally, an app lication was illustrated which can get the geography coordinates of county level adm inistrative regions in China as well as corresponding Google satellite image data based on Google Map s JavaScrip t AP I and C# p rogramm ing language. Key words: Google M ap s; operation mechanism; geographic data