开发者

Does getCurrentPosition() use GPS navigation?

If I use navigator.geolocation.getCurrentPosition() in any web page and visit it using web browser of any mobile device wi开发者_运维技巧th GPS, will it use GPS navigation?

And how it will determine location if device has no GPS?


The Geolocation API is agnostic of the underlying location information sources and therefore it is up to the browser (and device) to determine how the geolocation data is determined.


See here for more details on how Firefox gets the geo location information from Google, http://code.google.com/p/gears/wiki/GeolocationAPI

Short answer is: they keep a database with the location of all wifi hotspots (most likely collected by the same cars that take streetview footage) and uses that information to provide location data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜