Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use the Google Maps API GPS sensor?

Tags:

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?

like image 732
renegadeofunk Avatar asked Jan 03 '10 04:01

renegadeofunk


People also ask

How does a GPS API work?

The Geolocation API returns a location and accuracy radius based on information about cell towers and WiFi nodes that the mobile client can detect. This document describes the protocol used to send this data to the server and to return a response to the client. Communication is done over HTTPS using POST.

Which sensor is used for Google Maps?

For accurate navigation, Maps requests access to the GPS sensor, which it uses to locate you and adjust your route accordingly.


1 Answers

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.

like image 145
Daniel Vassallo Avatar answered Sep 18 '22 06:09

Daniel Vassallo