How do I use the Google Maps API GPS sensor?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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? 回答1: 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