HTML5 Geolocation API如何工作? [英] How does the HTML5 Geolocation API work?

查看:134
本文介绍了HTML5 Geolocation API如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道HTML5 Geolocation API是如何工作的。我需要知道的是,获得的纬度和经度属于谁?它是ISP的位置,因为我认为没有GPS设备连接到我的电脑或笔记本电脑?如果它是从WiFi设备的SSID获得的? WiFi设备是否知道它的坐标?

I am wondering how the HTML5 Geolocation API works. What I need to know is, the obtained latitude and longitude belongs to whom? Is it the location of the ISP, as I think there is no GPS device attached to my PC or the laptop? Also if it is obtained from the SSID of the WiFi device? Does the WiFi device know it's coordinates?

推荐答案

来自W3C 地理定位API规范(强调我的):

From the W3C Geolocation API Specification (emphasis mine):


Geolocation API定义了与仅与托管实现的设备相关联的位置信息的高级接口,例如纬度和经度。 API本身与基础位置信息源无关。位置信息的常见来源包括全球定位系统(GPS)和从网络信号(如IP地址,RFID,WiFi和蓝牙MAC地址)推断出的位置,和GSM / CDMA小区ID,以及用户输入。 不保证API会返回设备的实际位置。

The Geolocation API defines a high-level interface to location information associated only with the device hosting the implementation, such as latitude and longitude. The API itself is agnostic of the underlying location information sources. Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs, as well as user input. No guarantee is given that the API returns the device's actual location.

您的浏览器将使用提供的硬件通过托管实施的设备来实现它,但是不保证一致性和准确性。

Your browser will use the hardware provided to it by "the device hosting the implementation," but neither consistency nor accuracy are guaranteed.

这篇关于HTML5 Geolocation API如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆