python-google-places icon indicating copy to clipboard operation
python-google-places copied to clipboard

types list is deprecated by Google Place API for a long now.

Open SBillion opened this issue 7 years ago • 1 comments

Don't make types required when using rankby='distance' if type is present. Use all builtin to check multiple variable to None Modify documentaiton on nearbysearch method.

SBillion avatar Jan 26 '18 10:01 SBillion

There is a bug with this modification. Try this

lat_lng = {'lat': 45.522217, 'lng': 9.214968}
query_result = google_places.nearby_search(
        lat_lng=lat_lng, radius=30, rankby='distance', types=[types.TYPE_RESTAURANT])

this returns only restaurants, while if we use

`lat_lng = {'lat': 45.522217, 'lng': 9.214968}
query_result = google_places.nearby_search(
        lat_lng=lat_lng, radius=30, rankby='distance', **type**=[types.TYPE_RESTAURANT])`

it returns also a clothing store.

danielsp3000 avatar Apr 07 '18 23:04 danielsp3000