Google Places API not returning any results for India

给你一囗甜甜゛ 提交于 2019-12-19 11:51:26

问题


https://maps.googleapis.com/maps/api/place/search/json?location=28.635704,77.224982&radius=50000&types=restaurant&language=en&name=&sensor=false&key=[key]

I have been trying to find Google Places API 3 to get the list of restaurants in Delhi, but so far I have not got any luck. Has anyone tried that before. It shows good results with coordinates in US but nothing in Delhi?


回答1:


I guess the problem is the categorization applied by the owners of the places. When I search for "restaurant delhi" on google-maps I get a lot of restaurants, but none of them is categorized as "restaurant", it's lodging, restaurants-indian,Restaurants - Non - Vegetarian or something else, but never restaurant .

Instead of requesting the types restaurant search for the name restaurant , you'll get a bunch of results.

When you take a look at these results, you'll see, the types of the most results is set to "establishment" , not "restaurant"



来源:https://stackoverflow.com/questions/9477512/google-places-api-not-returning-any-results-for-india

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