如何使用 Google Maps API GPS 传感器? [英] How do I use the Google Maps API GPS sensor?

查看:16
本文介绍了如何使用 Google Maps 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屋!

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