What is the `sensor` parameter for in the Google Places API?

后端 未结 3 1399
太阳男子
太阳男子 2020-11-30 00:18

The Google Places API requests have a sensor parameter? How does this parameter affect the results?

相关标签:
3条回答
  • 2020-11-30 00:36

    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>

    0 讨论(0)
  • 2020-11-30 00:59

    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

    0 讨论(0)
  • 2020-11-30 01:00

    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

    0 讨论(0)
提交回复
热议问题