Google search place api, places not found

徘徊边缘 提交于 2020-01-16 11:27:31

问题


Somes places are not found from google api, It used to return results before the last update but it does not anymore.

examples :

Pizza hut - france

Domino's pizza - france

In & out burger - los angeles

etc..

https://maps.googleapis.com/maps/api/place/search/json?sensor=false&location=34.029900,-118.255463&radius=5000&key=API_KEY&name=In-N-Out%20Burger

https://maps.googleapis.com/maps/api/place/search/json?sensor=false&location=48.847194,2.408152&radius=5000&key=API_KEY&name=Pizza%20Hut

https://maps.googleapis.com/maps/api/place/search/json?sensor=false&location=48.847194,2.408152&radius=5000&key=API_KEY&name=Domino's%20Pizza

Do you know why ?


回答1:


Had the same issue but solved it this way:

For spaces: have to enclose the whole name in double quotes: %22name%20with%20spaces%22 For quotes: have to encode them as a space: Domino%20s

I tried it with your pizza hut example and got results back with my key



来源:https://stackoverflow.com/questions/14377166/google-search-place-api-places-not-found

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