我以前没有使用过 Python,但我听说这将是一种用于此过程的好语言。我有一个 Lat/Long 坐标列表,我需要将其转换为公司名称。我可以在哪里找到有关如何完成此过程的文档?有什么想法吗?
例子:
文档:LatLong.txt(有一个按列分隔的纬度/经度列表) 我需要针对最大半径为 30 的 Places API 运行该列表,并返回该半径内的所有企业(BusinessName、Addy、Phone 等)。
from googleplaces import googleplaces
YOUR_API_KEY = 'aa262fad30e663fca7c7a2be9354fe9984f0b5f2'
google_places = googleplaces(YOUR_API_KEY)
query_result = google_places.nearby_search(lat_lng=41.802893, -89.649930,radius=20000)
for place in query_result.places:
print (place.name)
print (place.geo_location)
print (place.reference)
place.get_details()
print (place.local_phone_number)
print (place.international_phone_number)
print (place.webite)
print (place.url)
我在玩什么..
请您参考如下方法:
Google 有一些非常好的入门文档:
https://developers.google.com/places/training/basic-place-search
这个答案也可能有帮助:https://stackoverflow.com/a/21924452/1393496
您应该编辑您的问题并包含更多详细信息,您尝试了什么?什么起作用了?什么不起作用?
