我正在寻找拉图液化天然气某个地点附近的所有地方。但是,我在搜索lat_nglng而不是位置时出错(location='location')。我有一个googleplacesapiweb服务和googlemaps地理编码API的密钥。根据https://github.com/slimkrazy/python-google-places这应该足够了。在
这是我的代码和错误消息:
YOUR_API_KEY = 'API_KEY'
google_places = GooglePlaces(YOUR_API_KEY)
query_result = google_places.nearby_search(
lat_lng='52.0737017, 5.0944107999999915',
radius=100,
types=[types.TYPE_RESTAURANT] or [types.TYPE_CAFE])
for place in query_result.places:
place.get_details()
print '%s %s %s' % (place.name, place.geo_location, place.types)
错误消息:
^{pr2}$有谁知道怎么解决这个问题吗?在
在您提供的github中,reference部分声明lat_ng参数的类型是dict:
请执行以下操作:
要查看查询结果,只需执行以下操作:
^{pr2}$相关问题 更多 >
编程相关推荐