惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
罗磊的独立博客
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Last Week in AI
Last Week in AI
美团技术团队
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
月光博客
月光博客
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
W
WeLiveSecurity
H
Heimdal Security Blog
Vercel News
Vercel News
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Help Net Security
Help Net Security
博客园_首页
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
I
Intezer
K
Kaspersky official blog
M
MIT News - Artificial intelligence
J
Java Code Geeks
G
GRAHAM CLULEY
P
Palo Alto Networks Blog

博客园 - Calendar

windows平台下用C#访问HBase Hbase常用命令 CuteEditor测试 Windows 7使用问题 小问题之动态调用另一个程序集里的方法 GM的Hybrid MapPoint批量导入Pushpin的方法 - Calendar - 博客园 通过两个点的经纬度计算距离 地震了 下载试用IE 7.0 Beta 3.0 google maps可以支持地理信息查询了(附上功能介绍) - Calendar - 博客园 prototype理解 - Calendar - 博客园 google卫星地图的url计算 linux下运行的eclipse的说明 用socket连接pop3服务器遇到的小问题 google maps又更新了 我是如何取得Reflector的真实程序的 对J2ME的想法 MiniQQ与LumaQQ
google maps的脚本值得看看 - Calendar - 博客园
Calendar · 2006-04-27 · via 博客园 - Calendar

google maps里最重要的对象应该算是GMapsApplication了,它的定义用到了javascript面向对象设计方法。

var a=z.prototype;
W("GMapsApplication",z);
P(z,"getMap",a.N);

function W(a,b){window[a]=b}
function P(a,b,c){a.prototype[b]=c}
z.prototype.N=function(){return this.a}

W函数把对象放在window属性里,可以为一个对象定义一个名称;
P函数则通过ptototype给对象增加方法别名。

有了这些,就可以用
var a = new GMapsApplication(e("map"));
像实例化一个javascript内置对象一样来实例化GMapsApplication了。
用起来还真方便。感觉把c#编程和脚本编程给拉近了一大截。
自己也写了个测试用例:

<script>
window[
"Hello"= aa;
function aa()
{
    
this.x = 5;
    
this.y = 6;
    
this.test = function(a)
    
{
        alert(a 
+ "," + this.x + "," + this.y);
    }

}


var xx = new Hello();
xx.test(
"bb");
</script>