The Google Places API requests have a sensor
parameter? How does this parameter affect the results?
3 Answers
Edit: The sensor parameter is no longer required, and will now be ignored if it's used.
The parameter doesn't impact the results. It's a parameter that Google is required to collect for Google's data providers who charge differently based on whether the request uses a sensor or not.
see Google docs
-
8Really? Could you please provide some link, where this is written. I have not found this anywhere. (Also wondering why the price is different and what is cheaper:)TN.β TN.2011-12-25 21:16:20 +00:00Commented Dec 25, 2011 at 21:16
-
72It's not in the documentation. I work on the Google Maps API team.Mano Marksβ Mano Marks2012-01-03 16:15:52 +00:00Commented Jan 3, 2012 at 16:15
-
2@ManoMarks I was wondering if I should set the sensor=true always if the device has a GPS sensor it uses to get the user position or if I should only use it if that location is the actual found GPS location? I'm building an app where we show a map with users location but the user might drag the map and we do a georequest based on the new location. In this case should I start with setting sensor=true and then switch to use sensor=false?Peter Theillβ Peter Theill2012-09-19 20:58:27 +00:00Commented Sep 19, 2012 at 20:58
-
6@PeterTheill If you're using a sensor at all to detect someone's location, then use sensor=true, even if they drag away from the map. If you instantiate a map that does not use the sensor to detect the location, then set it to falseMano Marksβ Mano Marks2012-09-20 22:17:10 +00:00Commented Sep 20, 2012 at 22:17
-
1developers.google.com/maps/documentation/javascript/β¦Devzβ Devz2016-03-10 13:38:08 +00:00Commented Mar 10, 2016 at 13:38
The Google Maps docs have been updated and as of June 2014 and the &sensor parameter is no longer required for JavaScript or Web Service API calls. The parameter will now be ignored if passed along with any request.
docs - https://developers.google.com/maps/documentation/javascript/tutorial
Just to be more clear. If your script tag looks like this:
<script src='//maps.googleapis.com/maps/api/js?sensor=false'></script>
Then you should change it to the following to remove this warning:
<script src='//maps.googleapis.com/maps/api/js'></script>