How do I use the Google Maps API GPS sensor?

renegadeofunk picture renegadeofunk · Jan 3, 2010 · Viewed 30.8k times · Source

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?

Answer

Daniel Vassallo picture Daniel Vassallo · Jan 3, 2010

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.