使用谷歌地点 api 检索地点/国家的兴趣点(景点/旅游景点) [英] retrieve points of interests (attractions/tourist places) of a place/country using google places api
问题描述
我想通过谷歌地点 api 检索一个地方/国家的兴趣点,说伦敦的兴趣点".我希望结果与我在 google 上搜索的结果一样 [here][1.我用过这样的东西
I want to retrieve points of interests of a place/country through google places api say 'points of interests in london'. I want the results to be same as I google search it like [here][1. I've used something like this
'https://maps.googleapis.com/maps/api/place/radarsearch/json?location='+str(lat)+','+str(long)+'&radius=500&type=tourist&rankby=prominence&key=API_KEY')
其中纬度、经度分别是那个地方/国家的纬度、经度.
where lat,long are respective latitude,longitude of that place/country.
但生成的 json 文件不会检索该地点的兴趣点,而只会输出附近的地点.
But the resulting json file does not retrieve points of interests of that place rather it just outputs nearby places.
我也试过这个
'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location='+str(lat)+','+str(long)+'&radius=500&type=tourist&&rankby=prominence&key=API_KEY'
结果相同
是否有任何选项可以不使用半径参数来做到这一点
is there any option to do it without using radius parameter
请帮帮我
推荐答案
试试这个 google Places API url.您将获得(例如:)纽约市的兴趣点/景点/旅游地点.您必须使用带有关键字兴趣点
Try this google places API url. You will get the point of interest/Attraction/Tourists places in (For Eg:) New York City. You have to use the CITY NAME with the keyword Point Of Interest
https://maps.googleapis.com/maps/api/place/textsearch/json?query=new+york+city+point+of+interest&language=en&key=API_KEY
这些 API 结果与以下谷歌搜索结果相同.
These API results are same as the results of the below google search results.
这篇关于使用谷歌地点 api 检索地点/国家的兴趣点(景点/旅游景点)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!