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

狂风中的少年 提交于 2019-11-27 00:43:08
Mano Marks

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

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>

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!