我如何使用Google Maps API GPS传感器? [英] How do I use the Google Maps API GPS sensor?
问题描述
我所能找到的就是如何指定传感器参数:
http://code.google.com/apis/maps/documentation/v3/#SpecifyingSensor
但它没有说明如何实际使用它。不是整个点能够通过设备GPS获得用户当前的纬度/经度坐标,还是我误解了?
该传感器参数仅用于向Google表明您正在使用GPS传感器来确定用户的位置。
除非使用 W3C Geolocation API 在支持它的浏览器中,从您的GPS设备到用户浏览器获取经度和纬度仍然是您的责任。
All I've been able to find is how to specify the sensor parameter:
http://code.google.com/apis/maps/documentation/v3/#SpecifyingSensor
But nowhere does it say how to actually USE it. Isn't the whole point to be able to get the user's current lat/long coordinates through the device GPS, or am I mistaken?
That sensor parameter is only there to indicate to Google that you are using a GPS sensor to determine the user's location.
Unless using the W3C Geolocation API in browsers that support it, it remains your responsibility to get the latitude and longitude from your GPS device to the user's browser.
这篇关于我如何使用Google Maps API GPS传感器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!