<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog Behind GFW &#187; Javascript</title>
	<atom:link href="http://www.behindgfw.com/archives/tag/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://www.behindgfw.com/archives</link>
	<description>在墙后面写博客...</description>
	<lastBuildDate>Wed, 08 Dec 2010 17:10:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>浏览器中的GOOGLE地球</title>
		<link>http://www.behindgfw.com/archives/2008/06/google-earth-in-browser.html</link>
		<comments>http://www.behindgfw.com/archives/2008/06/google-earth-in-browser.html#comments</comments>
		<pubDate>Wed, 04 Jun 2008 13:25:20 +0000</pubDate>
		<dc:creator>behindGFW</dc:creator>
				<category><![CDATA[WebDev]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.behindgfw.com/archives/?p=210</guid>
		<description><![CDATA[Google刚刚公布了一项新的浏览器插件，让用户可以直接从浏览器中启动Google Earth，就像以前的Google Maps一样。开发人员通过API书写简单的javascript脚本，就可以将Google Earth整合进他们的网页。不过显然现在还没有人安装过此插件，因此进入包含该javascript脚本的页面时，将提示安装插件，这是一种常见和可以接受的做法。目前支持： # IE 6.0 + # IE 7.0+ # Firefox的2.x或2.0x （ Firefox的3.0支持即将推出） # Netscape 7.1以上版本 # Mozilla 1.4及以上版本 # Flock 1.0以上版本 可以在这里访问官方的例程. 速度令人沮丧，不过刷新网页后速度显然提高不少。 相信不久后会有人写出绝妙超酷的应用。 如果你是通过RSS阅读本文，Javascript脚本将不能运行，可以点击这里看原文，图示区域为我国最长的跨海大桥 &#8211; 杭州湾大桥。 function init() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(30.5604, 121.050), 17); map.addMapType(G_SATELLITE_3D_MAP); map.addControl(new GHierarchicalMapTypeControl()); // Uncomment the following line to start [...]]]></description>
			<content:encoded><![CDATA[<p>Google刚刚公布了一项新的<a href="http://google-latlong.blogspot.com/2008/05/google-earth-meet-browser.html">浏览器插件</a>，让用户可以直接从浏览器中启动Google Earth，就像以前的Google Maps一样。开发人员通过<a href="http://code.google.com/apis/earth/documentation/index.html">API</a>书写简单的javascript脚本，就可以将Google Earth整合进他们的网页。不过显然现在还没有人安装过此插件，因此进入包含该javascript脚本的页面时，将提示安装插件，这是一种常见和可以接受的做法。目前支持：<br />
#   IE 6.0 +<br />
# IE 7.0+<br />
# Firefox的2.x或2.0x （ Firefox的3.0支持即将推出）<br />
# Netscape 7.1以上版本<br />
# Mozilla 1.4及以上版本<br />
# Flock 1.0以上版本</p>
<p>可以在这里访问官方的<a href="http://code.google.com/apis/earth/documentation/examples.html">例程</a>.<br />
速度令人沮丧，不过刷新网页后速度显然提高不少。<br />
相信不久后会有人写出绝妙超酷的应用。</p>
<p>如果你是通过RSS阅读本文，Javascript脚本将不能运行，可以点击<a href="http://www.behindgfw.com/archives/2008/06/google-earth-in-browser.html">这里</a>看原文，图示区域为我国最长的跨海大桥 &#8211; 杭州湾大桥。<br />
  <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA43IALmfadaZgVb1L-IEizRR9P8Vhqqz9E_dSajpohoFx1hyAThSfmRCtUpJMQGqDCZR_CjFr3zicrg">
  </script></p>
<div id="map" style="width: 450px; height: 350px;"></div>
<p>  <script type="text/javascript">
  function init() {
  if (GBrowserIsCompatible()) {
      var map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(30.5604, 121.050), 17);
      map.addMapType(G_SATELLITE_3D_MAP);
      map.addControl(new GHierarchicalMapTypeControl());
     // Uncomment the following line to start the map with 3D enabled.
     // map.setMapType(G_SATELLITE_3D_MAP);
	  map.setMapType(G_SATELLITE_MAP);
     // Obtain a pointer to the Google Earth instance attached to
     // your map.
     //map.getEarthInstance(getEarthInstanceCB);	
     //var ge;
     //function getEarthInstanceCB(object) {
     //ge = object;
     // You can now manipulate ge using the full Google Earth API.
     // }  
  }
  };
   /* for Mozilla */
   if (document.addEventListener) {
       document.addEventListener("DOMContentLoaded", init, null);
   }
   /* for Internet Explorer */
   /*@cc_on @*/
   /*@if (@_win32)
   init
   /*@end @*/
   /* for other browsers */
   window.onload = init;
</script></p>
<h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href="http://www.behindgfw.com/archives/2007/04/google-ajax-feed-api-cross-site-ajax.html" title="Google AJAX Feed API 与 Cross Site AJAX">Google AJAX Feed API 与 Cross Site AJAX</a></li><li><a href="http://www.behindgfw.com/archives/2009/06/china-blocked-google.html" title="没有Gmail我们可以用邮局寄信">没有Gmail我们可以用邮局寄信</a></li><li><a href="http://www.behindgfw.com/archives/2009/04/gmail-sender-time-zone.html" title="显示Gmail发信人时区">显示Gmail发信人时区</a></li><li><a href="http://www.behindgfw.com/archives/2009/01/let-google-apps-support-cn-domains.html" title="让Google Apps支持.cn中国域名">让Google Apps支持.cn中国域名</a></li><li><a href="http://www.behindgfw.com/archives/2008/12/where-does-oil-come-from.html" title="美国的石油从哪里来">美国的石油从哪里来</a></li></ul><hr />
© 2009 <a href="http://www.behindgfw.com/archives">BehindGFW</a> |
<a href="http://feed.BehindGFW.com/">订阅</a> |
<a href="http://www.behindgfw.com/archives/2008/06/google-earth-in-browser.html">本文链接</a> |
<a href="http://www.behindgfw.com/archives/2008/06/google-earth-in-browser.html#comments">评论</a> |
<a href="http://del.icio.us/post?url=http://www.behindgfw.com/archives/2008/06/google-earth-in-browser.html&title=浏览器中的GOOGLE地球">添加到del.icio.us</a>]]></content:encoded>
			<wfw:commentRss>http://www.behindgfw.com/archives/2008/06/google-earth-in-browser.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps上的台风预报</title>
		<link>http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html</link>
		<comments>http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html#comments</comments>
		<pubDate>Tue, 09 Oct 2007 02:23:06 +0000</pubDate>
		<dc:creator>zdpress</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Googlemaps]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html</guid>
		<description><![CDATA[近日“罗莎”肆虐，6日15时、23时在台湾北部两次登陆，7日15时再次在浙闽交界处登陆，在温州、台州境内肆虐近26小时后减弱为热带风暴于8日17时进入东海。这次的台风路径非常奇怪，在台湾绕了一个圈，在大陆走了一个“几”字形且陆上速度极慢并带来强降雨。 meteo-gis.cn是一个建立在Google Maps上的台风实时预报网站，可以查看当前台风中心位置、移动方向、风圈大小、预测台风路径等，还可以查看历史台风数据。目前该网站只支持IE不支持Firefox。 参考链接： 浙江省台风路径实时发布系统 实时卫星云图 e070377e 相关文章轻松在你blog上显示Google Maps地图Body.onload 关于页面加载完毕的问题Gmap猪流感地图美国的石油从哪里来 © 2009 BehindGFW &#124; 订阅 &#124; 本文链接 &#124; 评论 &#124; 添加到del.icio.us]]></description>
			<content:encoded><![CDATA[<p>近日“<a href="http://news.google.com/news?hl=zh-CN&amp;ned=cn&amp;ie=UTF-8&amp;ncl=1117624104">罗莎</a>”肆虐，6日15时、23时在台湾北部两次登陆，7日15时再次在浙闽交界处登陆，在温州、台州境内肆虐近26小时后减弱为热带风暴于8日17时进入东海。这次的台风路径非常奇怪，在台湾绕了一个圈，在大陆走了一个“几”字形且陆上速度极慢并带来强降雨。</p>
<p><a href="http://www.meteo-gis.cn/">meteo-gis.cn</a>是一个建立在Google Maps上的台风实时预报网站，可以查看当前台风中心位置、移动方向、风圈大小、预测台风路径等，还可以查看历史台风数据。目前该网站只支持IE不支持Firefox。</p>
<p><img src="http://bp3.blogger.com/_D6_Qd4w7mz0/RwrlMn-NtLI/AAAAAAAACQs/xEc8xOMDSHw/s400/typhoon.JPG" style="cursor: pointer" id="BLOGGER_PHOTO_ID_5119155931511108786" alt="台风预报" border="0" /></p>
<p><strong>参考链接：</strong></p>
<p><a href="http://slt.zj.gov.cn/typhoneweb/">浙江省台风路径实时发布系统</a></p>
<p><a href="http://www.zjwater.gov.cn/wxyt/">实时卫星云图</a></p>
<p><span style="color: #ffffff">e070377e</span></p>
<h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href="http://www.behindgfw.com/archives/2006/08/bloggoogle-maps.html" title="轻松在你blog上显示Google Maps地图">轻松在你blog上显示Google Maps地图</a></li><li><a href="http://www.behindgfw.com/archives/2006/04/bodyonload.html" title="Body.onload 关于页面加载完毕的问题">Body.onload 关于页面加载完毕的问题</a></li><li><a href="http://www.behindgfw.com/archives/2006/04/gmap.html" title="Gmap">Gmap</a></li><li><a href="http://www.behindgfw.com/archives/2009/04/mapping-the-swine-flu.html" title="猪流感地图">猪流感地图</a></li><li><a href="http://www.behindgfw.com/archives/2008/12/where-does-oil-come-from.html" title="美国的石油从哪里来">美国的石油从哪里来</a></li></ul><hr />
© 2009 <a href="http://www.behindgfw.com/archives">BehindGFW</a> |
<a href="http://feed.BehindGFW.com/">订阅</a> |
<a href="http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html">本文链接</a> |
<a href="http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html#comments">评论</a> |
<a href="http://del.icio.us/post?url=http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html&title=Google Maps上的台风预报">添加到del.icio.us</a>]]></content:encoded>
			<wfw:commentRss>http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google AJAX Feed API 与 Cross Site AJAX</title>
		<link>http://www.behindgfw.com/archives/2007/04/google-ajax-feed-api-cross-site-ajax.html</link>
		<comments>http://www.behindgfw.com/archives/2007/04/google-ajax-feed-api-cross-site-ajax.html#comments</comments>
		<pubDate>Thu, 19 Apr 2007 14:51:00 +0000</pubDate>
		<dc:creator>zdpress</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://behindgfw.com/archives/2007/04/google-ajax-feed-api-%e4%b8%8e-cross-site-ajax.html</guid>
		<description><![CDATA[Google刚刚发布了Google AJAX Feed API ，文档和范例在这里。 【背景】流行的AJAX程序都大量使用了JavaScript和XMLHttpRequest，而XMLHttpRequest遵循同源策略，即通常所说的跨域问题。什么是同源策略：一般情形下，为安全起见，浏览器不允许你在客户端通过XMLHttpRequest访问别的域，默认你只能存取同域名、同一端口、同一协议下的资源。这给我们造成了麻烦，很明显，在不少情形下，获取别的网站的信息/服务是非常有用的。 【解决方案】通常解决方法有三种： 在同一域的服务器端建立一个代理，浏览器向该代理网址发送请求，然后该代理向其他域的网址发请求，在获取回复后，或作处理或按原样发回到浏览器。 使用按需(On-Demand) Javascript 脚本。在页面内动态生成新的，将其src属性指向别的网站的网址，这个网址返回的内容必须是合法的Javascript脚本，常用的是JSON消息。 使用IFRAME。在页面内嵌或动态生成指向别的网站的IFRAME，然后这2个网页间可以通过改变对方的anchor hash fragment来传输消息。 都是比较麻烦的。 后来，yahoo提供了Yahoo Pipes，一个可视化界面的feed聚合服务程序，业界评价挺高，当然还有其他几个mashups程序可供选择。但是Google AJAX Feed API可能是最适合developer使用的了。 【Google AJAX Feed API】 现在你只要书写几行JavaScript程序，不再需要建立复杂的服务器端代理，Google代劳了所有mashups开发。 【延伸阅读】关于 Cross Site AJAX： 1. Security Considerations: Dynamic HTML http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/sec_dhtml.asp 2. About Cross-Frame Scripting and Security http://msdn.microsoft.com/library/default.asp?url=/workshop/author/om/xframe_scripting_security.asp 3. Cross-Domain Proxy http://ajaxpatterns.org/Cross-Domain_Proxy 4. Cross Domain XMLHttpRequest using an IFrame Proxy http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book75 [...]]]></description>
			<content:encoded><![CDATA[<p>Google刚刚<a href="http://googleajaxsearchapi.blogspot.com/2007/04/announcing-google-ajax-feed-api.html">发布</a>了Google AJAX Feed API ，文档和范例在<a href="http://code.google.com/apis/ajaxfeeds/documentation/">这里</a>。</p>
<p>【背景】流行的AJAX程序都大量使用了JavaScript和XMLHttpRequest，而XMLHttpRequest遵循<a href="http://en.wikipedia.org/wiki/Same_origin_policy">同源策略</a>，即通常所说的跨域问题。什么是同源策略：一般情形下，为安全起见，浏览器不允许你在客户端通过XMLHttpRequest访问别的域，默认你只能存取同域名、同一端口、同一协议下的资源。这给我们造成了麻烦，很明显，在不少情形下，获取别的网站的信息/服务是非常有用的。</p>
<p>【解决方案】通常<a href="http://blog.joycode.com/saucer/archive/2006/10/03/84572.aspx">解决方法</a>有三种：</p>
<ol>
<li>在同一域的服务器端建立一个代理，浏览器向该代理网址发送请求<wbr></wbr>，然后该代理向其他域的网址发请求，在获取回复后<wbr></wbr>，或作处理或按原样发回到浏览器。</li>
<li>使用按需(On-Demand) Javascript 脚本。在页面内动态生成新的<script></script>，将其src属性指向<wbr></wbr>别的网站的网址，这个网址返回的内容必须是合法的Javascri<wbr></wbr>pt脚本，常用的是JSON消息。</li>
<li>使用IFRAME。在页面内嵌或动态生成指向别的网站的IFRAM<wbr></wbr>E，然后这2个网页间可以通过改变对方的anchor hash fragment来传输消息。</li>
</ol>
<p>都是比较麻烦的。<br />
后来，yahoo提供了<a href="http://pipes.yahoo.com/">Yahoo Pipes</a>，一个可视化界面的feed聚合服务程序，业界评价挺高，当然还有<a href="http://www.techcrunch.com/2007/03/02/5-ways-to-mix-rip-and-mash-your-data/">其他几个</a>mashups程序可供选择。但是Google AJAX Feed API可能是最适合developer使用的了。</p>
<p>【Google AJAX Feed API】 现在你只要书写几行JavaScript程序，不再需要建立复杂的服务器端代理，Google代劳了所有mashups开发。</p>
<p>【延伸阅读】关于 Cross Site AJAX：</p>
<p>1. Security Considerations: Dynamic HTML<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/sec_dhtml.asp" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">http://msdn.microsoft.com<wbr></wbr>/library/default.asp?url=<wbr></wbr>/workshop/author/dhtml/sec<wbr></wbr>_dhtml.asp </a></p>
<p>2. About Cross-Frame Scripting and Security<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/workshop/author/om/xframe_scripting_security.asp" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">    http://msdn.microsoft.com<wbr></wbr>/library/default.asp?url=<wbr></wbr>/workshop/author/om/xframe<wbr></wbr>_scripting_security.asp </a></p>
<p>3. Cross-Domain Proxy<br />
<a href="http://ajaxpatterns.org/Cross-Domain_Proxy" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">http://ajaxpatterns.org/Cross<wbr></wbr>-Domain_Proxy</a></p>
<p>4. Cross Domain XMLHttpRequest using an IFrame Proxy<br />
<a href="http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book75" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">http://manual.dojotoolkit.org<wbr></wbr>/WikiHome/DojoDotBook/Book75 </a></p>
<p>5. Back Button Support for Atlas UpdatePanels<br />
<a href="http://www.nikhilk.net/BackButtonSupport.aspx" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">http://www.nikhilk.net/BackButt<wbr></wbr>onSupport.aspx </a></p>
<p>6. Cross-document messaging hack<br />
<a href="http://blog.monstuff.com/archives/000304.html" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">http://blog.monstuff.com<wbr></wbr>/archives/000304.html</a></p>
<p>7. Calling web services hosted outside of your application with “Atlas”<br />
<a href="http://blogs.msdn.com/federaldev/archive/2006/07/31/684229.aspx" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">http://blogs.msdn.com/federalde<wbr></wbr>v/archive/2006/07/31/684229<wbr></wbr>.aspx</a></p>
<p><a href="http://www.federaldeveloper.com/Shared%20Documents/Presentations%20by%20Marc%20Schweigert/CallAtlasWebServiceInDifferentProject.zip" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">    http://www.federaldeveloper<wbr></wbr>.com/Shared%20Documents<wbr></wbr>/Presentations%20by%20Marc<wbr></wbr>%20Schweigert/CallAtlasWebServi<wbr></wbr>ceInDifferentProject.zip </a></p>
<p>8. AJAX Tip: Passing Messages Between iframes<br />
<a href="http://www.25hoursaday.com/weblog/PermaLink.aspx?guid=3b03cf9d-b589-4838-806e-64efcc0a1a15" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">    http://www.25hoursaday.com<wbr></wbr>/weblog/PermaLink.aspx?guid<wbr></wbr>=3b03cf9d-b589-4838-806e<wbr></wbr>-64efcc0a1a15</a></p>
<h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href="http://www.behindgfw.com/archives/2008/06/google-earth-in-browser.html" title="浏览器中的GOOGLE地球">浏览器中的GOOGLE地球</a></li><li><a href="http://www.behindgfw.com/archives/2009/06/china-blocked-google.html" title="没有Gmail我们可以用邮局寄信">没有Gmail我们可以用邮局寄信</a></li><li><a href="http://www.behindgfw.com/archives/2009/04/gmail-sender-time-zone.html" title="显示Gmail发信人时区">显示Gmail发信人时区</a></li><li><a href="http://www.behindgfw.com/archives/2009/01/let-google-apps-support-cn-domains.html" title="让Google Apps支持.cn中国域名">让Google Apps支持.cn中国域名</a></li><li><a href="http://www.behindgfw.com/archives/2008/12/where-does-oil-come-from.html" title="美国的石油从哪里来">美国的石油从哪里来</a></li></ul><hr />
© 2009 <a href="http://www.behindgfw.com/archives">BehindGFW</a> |
<a href="http://feed.BehindGFW.com/">订阅</a> |
<a href="http://www.behindgfw.com/archives/2007/04/google-ajax-feed-api-cross-site-ajax.html">本文链接</a> |
<a href="http://www.behindgfw.com/archives/2007/04/google-ajax-feed-api-cross-site-ajax.html#comments">评论</a> |
<a href="http://del.icio.us/post?url=http://www.behindgfw.com/archives/2007/04/google-ajax-feed-api-cross-site-ajax.html&title=Google AJAX Feed API 与 Cross Site AJAX">添加到del.icio.us</a>]]></content:encoded>
			<wfw:commentRss>http://www.behindgfw.com/archives/2007/04/google-ajax-feed-api-cross-site-ajax.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>轻松在你blog上显示Google Maps地图</title>
		<link>http://www.behindgfw.com/archives/2006/08/bloggoogle-maps.html</link>
		<comments>http://www.behindgfw.com/archives/2006/08/bloggoogle-maps.html#comments</comments>
		<pubDate>Wed, 09 Aug 2006 12:12:00 +0000</pubDate>
		<dc:creator>zdpress</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[Googlemaps]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://behindgfw.com/archives/2006/08/%e8%bd%bb%e6%9d%be%e5%9c%a8%e4%bd%a0blog%e4%b8%8a%e6%98%be%e7%a4%bagoogle-maps%e5%9c%b0%e5%9b%be.html</guid>
		<description><![CDATA[想轻松地使用Google Maps API还真不是一件简单的事情，对大多数人来说还是具有一定难度的。正如Google Maps API文档里说的那样，Google Maps API是为熟悉JavaScript的人准备的。不过现在wikimapia.org提供了一个可以简单搞定Google Maps API的方法：在wikimapia上定位并缩放到合适比例，选择显示区域大小，拷贝wikimapia提供给你的html代码，加入你的网页，ok。 其实道理也很简单，wikimapia直接调用了Google Maps的图象，使其在框架里显示并指定框架显示大小。 缺点：只有显示Google Maps地图的单一功能，不能使用添加标记、文字等等其他高级功能。 你可以简单地试验下：在桌面上新建test.txt文本文档，拷贝下面的代码，保存，修改文件名为test.htm，打开。 &#60;iframe src=http://wikimapia.org/s/#y=29898782&#038;x=121935410&#038;z=17&#038;l=6&#038;m=a width=415 height=365 frameborder=0&#62;&#60;/iframe&#62; 相关文章Google Maps上的台风预报Body.onload 关于页面加载完毕的问题Gmap猪流感地图美国的石油从哪里来 © 2009 BehindGFW &#124; 订阅 &#124; 本文链接 &#124; 评论 &#124; 添加到del.icio.us]]></description>
			<content:encoded><![CDATA[<p>想轻松地使用Google Maps API还真不是一件<a href="http://blog.donews.com/hack/posts/850145.aspx" target="_blank">简单</a>的事情，对大多数人来说还是具有一定难度的。正如Google Maps API文档里说的那样，Google Maps API是为熟悉JavaScript的人准备的。不过现在<a href="http://wikimapia.org" target="_blank">wikimapia.org</a>提供了一个可以简单搞定Google Maps API的方法：在wikimapia上定位并缩放到合适比例，选择显示区域大小，拷贝wikimapia提供给你的html代码，加入你的网页，ok。<br />
其实道理也很简单，wikimapia直接调用了Google Maps的图象，使其在框架里显示并指定框架显示大小。<br />
缺点：只有显示Google Maps地图的单一功能，不能使用添加标记、文字等等其他高级功能。<br />
你可以简单地试验下：在桌面上新建test.txt文本文档，拷贝下面的代码，保存，修改文件名为test.htm，打开。</p>
<blockquote dir="ltr" style="margin-right: 0px"><p>&lt;iframe src=http://wikimapia.org/s/#<span class="addblbut1" id="urlchangew">y=29898782&#038;x=121935410&#038;z=17&#038;l=6&#038;m=a width=415 height=365</span> frameborder=0&gt;&lt;/iframe&gt;</p>
</blockquote>
<h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href="http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html" title="Google Maps上的台风预报">Google Maps上的台风预报</a></li><li><a href="http://www.behindgfw.com/archives/2006/04/bodyonload.html" title="Body.onload 关于页面加载完毕的问题">Body.onload 关于页面加载完毕的问题</a></li><li><a href="http://www.behindgfw.com/archives/2006/04/gmap.html" title="Gmap">Gmap</a></li><li><a href="http://www.behindgfw.com/archives/2009/04/mapping-the-swine-flu.html" title="猪流感地图">猪流感地图</a></li><li><a href="http://www.behindgfw.com/archives/2008/12/where-does-oil-come-from.html" title="美国的石油从哪里来">美国的石油从哪里来</a></li></ul><hr />
© 2009 <a href="http://www.behindgfw.com/archives">BehindGFW</a> |
<a href="http://feed.BehindGFW.com/">订阅</a> |
<a href="http://www.behindgfw.com/archives/2006/08/bloggoogle-maps.html">本文链接</a> |
<a href="http://www.behindgfw.com/archives/2006/08/bloggoogle-maps.html#comments">评论</a> |
<a href="http://del.icio.us/post?url=http://www.behindgfw.com/archives/2006/08/bloggoogle-maps.html&title=轻松在你blog上显示Google Maps地图">添加到del.icio.us</a>]]></content:encoded>
			<wfw:commentRss>http://www.behindgfw.com/archives/2006/08/bloggoogle-maps.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Body.onload 关于页面加载完毕的问题</title>
		<link>http://www.behindgfw.com/archives/2006/04/bodyonload.html</link>
		<comments>http://www.behindgfw.com/archives/2006/04/bodyonload.html#comments</comments>
		<pubDate>Fri, 28 Apr 2006 15:46:00 +0000</pubDate>
		<dc:creator>zdpress</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[Googlemaps]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://behindgfw.com/archives/2006/04/bodyonload-%e5%85%b3%e4%ba%8e%e9%a1%b5%e9%9d%a2%e5%8a%a0%e8%bd%bd%e5%ae%8c%e6%af%95%e7%9a%84%e9%97%ae%e9%a2%98.html</guid>
		<description><![CDATA[由于上午的Gmap没有调试成功，一直比较郁闷。 1、下午的时候收到K_Reverter的邮件他告诉我可以用window.onload=func的方法来代替Body.onload使用。 2、上网找了点资料，在360doc看到了一个老外关于window.onload的代码，也拿过来用下。 修改代码如下： &#60;script type=”text/javascript” src=”http://maps.google.com/maps?file=api&#038;v=2&#038;key=ABQIAAAA43IALmfadaZgVb1L-IEizRRKyzQqj4F9myd02mWX0DutlkqY_BQi03TATJA59RMvJYUa4fN7lK7X5g”&#62; &#60;/script&#62; &#60;div id=”map” style=”width: 600px; height: 400px;”&#62;&#60;/div&#62; &#60;script type=”text/javascript”&#62; function init() { if (GBrowserIsCompatible()) { var map=new GMap(document.getElementById(“map”)); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setMapType(G_HYBRID_TYPE); map.centerAndZoom(new GPoint(121.5581,29.8394), 8); // Create a base icon for all of our markers that specifies the // shadow, icon dimensions, etc. var baseIcon = new [...]]]></description>
			<content:encoded><![CDATA[<p>由于上午的Gmap没有调试成功，一直比较郁闷。<br />
1、下午的时候收到K_Reverter的邮件他告诉我可以用window.onload=func的方法来代替Body.onload使用。<br />
2、上网找了点资料，在<a href="http://www.360doc.com/showWeb/0/0/15725.aspx" target="_blank">360doc</a>看到了一个<a href="http://dean.edwards.name/weblog/2005/09/busted/" target="_blank">老外</a>关于window.onload的代码，也拿过来用下。<br />
修改代码如下：</p>
<blockquote style="margin-right: 0px" dir="ltr"><p>&lt;script type=”text/javascript” src=”http://maps.google.com/maps?file=api&#038;v=2&#038;key=ABQIAAAA43IALmfadaZgVb1L-IEizRRKyzQqj4F9myd02mWX0DutlkqY_BQi03TATJA59RMvJYUa4fN7lK7X5g”&gt;<br />
&lt;/script&gt;</p>
<p>&lt;div id=”map” style=”width: 600px; height: 400px;”&gt;&lt;/div&gt;</p>
<p>&lt;script type=”text/javascript”&gt;<br />
function init() {<br />
if (GBrowserIsCompatible()) {<br />
var map=new GMap(document.getElementById(“map”));<br />
map.addControl(new GSmallMapControl());<br />
map.addControl(new GMapTypeControl());<br />
map.setMapType(G_HYBRID_TYPE);<br />
map.centerAndZoom(new GPoint(121.5581,29.8394), 8);<br />
// Create a base icon for all of our markers that specifies the<br />
// shadow, icon dimensions, etc.<br />
var baseIcon = new GIcon();<br />
baseIcon.shadow = “http://www.google.com/mapfiles/shadow50.png”;<br />
baseIcon.iconSize = new GSize(20, 34);<br />
baseIcon.shadowSize = new GSize(37, 34);<br />
baseIcon.iconAnchor = new GPoint(9, 34);<br />
baseIcon.infoWindowAnchor = new GPoint(9, 2);<br />
baseIcon.infoShadowAnchor = new GPoint(18, 25);</p>
<p>// Create a lettered icon for this point using our icon class<br />
var letter = String.fromCharCode(“A”.charCodeAt(0) + 25);<br />
var icon = new GIcon(baseIcon);<br />
icon.image = “http://www.google.com/mapfiles/marker” + letter + “.png”;<br />
var ningbo = new GMarker(new GPoint(121.5581,29.83941),icon);<br />
GEvent.addListener(ningbo, “click”, function(){<br />
ningbo.openInfoWindowHtml(“过几天出去溜达下！”);  });<br />
map.addOverlay(ningbo);</p>
<p>// Create a lettered icon for this point using our icon class<br />
var letter = String.fromCharCode(“A”.charCodeAt(0) + 24);<br />
var icon = new GIcon(baseIcon);<br />
icon.image = “http://www.google.com/mapfiles/marker” + letter + “.png”;<br />
var zhoushan = new GMarker(new GPoint(122.1018,30.0207),icon);<br />
GEvent.addListener(zhoushan, “click”, function(){<br />
zhoushan.openInfoWindowHtml(“你说什么啊？我听不见呀！”);<br />
});<br />
map.addOverlay(zhoushan);<br />
}<br />
};</p>
<p>/* for Mozilla */<br />
if (document.addEventListener) {<br />
document.addEventListener(“DOMContentLoaded”, init, null);<br />
}</p>
<p>/* for Internet Explorer */<br />
/*@cc_on @*/<br />
/*@if (@_win32)<br />
init<br />
/*@end @*/</p>
<p>/* for other browsers */<br />
window.onload = init;<br />
&lt;/script&gt;</p>
</blockquote>
<p><span style="font-weight: bold">update：</span><br />
1、加载比较慢，请耐心等待片刻，页面里有太多的脚本了，嘿嘿。看来玩Gmap还得有个自己的空间才是！<br />
2、在2个GMarker之间点击的时候先打开的openInfoWindow不能自由关闭，看来还要继续除虫。</p>
<h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href="http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html" title="Google Maps上的台风预报">Google Maps上的台风预报</a></li><li><a href="http://www.behindgfw.com/archives/2006/08/bloggoogle-maps.html" title="轻松在你blog上显示Google Maps地图">轻松在你blog上显示Google Maps地图</a></li><li><a href="http://www.behindgfw.com/archives/2006/04/gmap.html" title="Gmap">Gmap</a></li><li><a href="http://www.behindgfw.com/archives/2009/04/mapping-the-swine-flu.html" title="猪流感地图">猪流感地图</a></li><li><a href="http://www.behindgfw.com/archives/2008/12/where-does-oil-come-from.html" title="美国的石油从哪里来">美国的石油从哪里来</a></li></ul><hr />
© 2009 <a href="http://www.behindgfw.com/archives">BehindGFW</a> |
<a href="http://feed.BehindGFW.com/">订阅</a> |
<a href="http://www.behindgfw.com/archives/2006/04/bodyonload.html">本文链接</a> |
<a href="http://www.behindgfw.com/archives/2006/04/bodyonload.html#comments">评论</a> |
<a href="http://del.icio.us/post?url=http://www.behindgfw.com/archives/2006/04/bodyonload.html&title=Body.onload 关于页面加载完毕的问题">添加到del.icio.us</a>]]></content:encoded>
			<wfw:commentRss>http://www.behindgfw.com/archives/2006/04/bodyonload.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gmap</title>
		<link>http://www.behindgfw.com/archives/2006/04/gmap.html</link>
		<comments>http://www.behindgfw.com/archives/2006/04/gmap.html#comments</comments>
		<pubDate>Fri, 28 Apr 2006 03:22:00 +0000</pubDate>
		<dc:creator>zdpress</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[Googlemaps]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://behindgfw.com/archives/2006/04/gmap.html</guid>
		<description><![CDATA[用Gmap api做了张地图，可是发现一个问题，在firefox下显示正常，在ie下浏览器会重置，调试了半天，也没搞定，先发了再说。代码如下：代码开始 &#60;script type=”text/javascript” src=”http://maps.google.com/maps?file=api&#38;v=2&#38;key=ABQIAAAA43IALmfadaZgVb1L-IEizRT2DsZWTaQwEcLbsDtQz1jnLAblVRRx2_bEwFhsxfHsq9k-5A0PT7xjxw”&#62; &#60;/script&#62; &#60;div id=”map” style=”width: 600px; height: 400px;”&#62;&#60;/div&#62; &#60;script type=”text/javascript”&#62; //&#60;![CDATA[if (GBrowserIsCompatible()) { var map=new GMap(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setMapType(G_HYBRID_TYPE); map.centerAndZoom(new GPoint(121.5581,29.8394), 8); // Create a base icon for all of our markers that specifies the // shadow, icon dimensions, etc. var baseIcon = new GIcon(); baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png"; baseIcon.iconSize [...]]]></description>
			<content:encoded><![CDATA[<p>用Gmap api做了张地图，可是发现一个问题，在firefox下显示正常，在ie下浏览器会重置，调试了半天，也没搞定，先发了再说。代码如下：<br/>代码开始</p>
<blockquote dir="ltr" style="margin-right: 0px;"><p><br/>  &lt;script type=”text/javascript” src=”http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA43IALmfadaZgVb1L-IEizRT2DsZWTaQwEcLbsDtQz1jnLAblVRRx2_bEwFhsxfHsq9k-5A0PT7xjxw”&gt;<br/>  &lt;/script&gt;<br/><br/>  &lt;div id=”map” style=”width: 600px; height: 400px;”&gt;&lt;/div&gt;<br/><br/>  &lt;script type=”text/javascript”&gt;<br/>  //&lt;![CDATA[<br/>if (GBrowserIsCompatible()) {<br/><br/>  var map=new GMap(document.getElementById("map"));<br/>  map.addControl(new GSmallMapControl());<br/>  map.addControl(new GMapTypeControl());<br/>  map.setMapType(G_HYBRID_TYPE);<br/>  map.centerAndZoom(new GPoint(121.5581,29.8394), 8);<br/><br/>  // Create a base icon for all of our markers that specifies the<br/>  // shadow, icon dimensions, etc.<br/>  var baseIcon = new GIcon();<br/>  baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";<br/>  baseIcon.iconSize = new GSize(20, 34);<br/>  baseIcon.shadowSize = new GSize(37, 34);<br/>  baseIcon.iconAnchor = new GPoint(9, 34);<br/>  baseIcon.infoWindowAnchor = new GPoint(9, 2);<br/>  baseIcon.infoShadowAnchor = new GPoint(18, 25);<br/><br/>  // Create a lettered icon for this point using our icon class<br/>  var letter = String.fromCharCode("A".charCodeAt(0) + 25);<br/>  var icon0 = new GIcon(baseIcon);<br/>  icon0.image = "http://www.google.com/mapfiles/marker" + letter + ".png";<br/><br/>  var ningbo = new GMarker(new GPoint(121.5581,29.83941),icon0);<br/>  GEvent.addListener(ningbo, "click", function(){<br/>    ningbo.openInfoWindowHtml("美女啊，我爱你啦！");<br/>  });<br/>  map.addOverlay(ningbo);<br/><br/>  // Create a lettered icon for this point using our icon class<br/>  var letter = String.fromCharCode("A".charCodeAt(0) + 24);<br/>  var icon = new GIcon(baseIcon);<br/>  icon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";<br/>  <br/>  var zhoushan = new GMarker(new GPoint(122.1018,30.0207),icon);<br/>  GEvent.addListener(zhoushan, "click", function(){<br/>    zhoushan.openInfoWindowHtml("你说什么啊？我饭吃过啦！");<br/>  });<br/>  map.addOverlay(zhoushan);<br/><br/><br/>}<br/>  //]]&gt;<br/>&lt;/script&gt;<br/><br/><br/></p>
</blockquote>
<p>代码结束<br/><br/>    google的api文挡里面的实例使用了<br/><br type="_moz"/></p>
<blockquote style="margin-right: 0px;" dir="ltr">
<pre class="code">  &lt;body onload="load()" onunload="GUnload()"&gt;<br/>    &lt;div id="map" style="width: 500px; height: 300px"&gt;&lt;/div&gt;<br/>  &lt;/body&gt;</pre>
</p>
</blockquote>
<p>我估计错误就出现在这个地方，donews的模板我好象设置不了body onload。<br /><br/><br/><br type="_moz"/></p>
<h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href="http://www.behindgfw.com/archives/2007/10/typhoon-forecast-on-google-maps.html" title="Google Maps上的台风预报">Google Maps上的台风预报</a></li><li><a href="http://www.behindgfw.com/archives/2006/08/bloggoogle-maps.html" title="轻松在你blog上显示Google Maps地图">轻松在你blog上显示Google Maps地图</a></li><li><a href="http://www.behindgfw.com/archives/2006/04/bodyonload.html" title="Body.onload 关于页面加载完毕的问题">Body.onload 关于页面加载完毕的问题</a></li><li><a href="http://www.behindgfw.com/archives/2009/04/mapping-the-swine-flu.html" title="猪流感地图">猪流感地图</a></li><li><a href="http://www.behindgfw.com/archives/2008/12/where-does-oil-come-from.html" title="美国的石油从哪里来">美国的石油从哪里来</a></li></ul><hr />
© 2009 <a href="http://www.behindgfw.com/archives">BehindGFW</a> |
<a href="http://feed.BehindGFW.com/">订阅</a> |
<a href="http://www.behindgfw.com/archives/2006/04/gmap.html">本文链接</a> |
<a href="http://www.behindgfw.com/archives/2006/04/gmap.html#comments">评论</a> |
<a href="http://del.icio.us/post?url=http://www.behindgfw.com/archives/2006/04/gmap.html&title=Gmap">添加到del.icio.us</a>]]></content:encoded>
			<wfw:commentRss>http://www.behindgfw.com/archives/2006/04/gmap.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

