【问题标题】:how to search for places nearby google api python如何搜索附近的地方 google api python
【发布时间】:2019-10-31 19:51:05
【问题描述】:

目前,当我在 google api 中搜索某个点附近的商家时,我会指定一个商家类型,如 https://developers.google.com/places/supported_types

我用:

gmaps.places_nearby(lat, long, type='specific business type', radius)

如何搜索附近返回所有业务类型的所有地点?我尝试过Google Places Nearby Searchgoogle map api nearby place searchFind Places Nearby in Google Maps using Google Places API,但似乎都没有帮助。

我试过了:

gmaps.nearbySearch(location, radius)

但得到一个错误:

'Client' object has no attribute 'nearbySearch'

【问题讨论】:

    标签: python api google-maps


    【解决方案1】:

    我发现方法是不指定类型,然后通过生成的json提取类型

    gmaps.places_nearby(lat, long, radius)
    
    types = ('|'.join(types))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-20
      • 1970-01-01
      • 2016-07-09
      • 2016-03-05
      • 2020-08-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多