zhangyaochun 发表于 2013-1-29 13:39:39

Geolocation API初探

HTML5 中引入了定位相关的Geolocation,下面简单探究一下:
 
在织梦上看到了一张图,很清楚地介绍了我们一般获取位置信息的方式,并做了简单对比:
 

http://dl.iteye.com/upload/attachment/0076/0627/935ae247-308f-3b5a-a54b-861081d91d53.jpg
 
作为新的标准下的api,我们要了解的还是这样的套路:
 
1、如何判断浏览器支持:
 
 
!!navigator.geolocation; 2、浏览器支持列表:
 

[*]IE9+
[*]FF3.5+
[*]Safari5.0+
[*]Chrome5.0+
[*]Opera 10.6+
[*]iPhone/iPad 3.0+
[*]Android2.0+
 
扩展阅读:
 
http://www.dedecms.com/knowledge/web-based/html/2012/1022/15817.html
 
http://www.html5china.com/HTML5features/Geolocation/#
 
页: [1]
查看完整版本: Geolocation API初探