google-maps-services-python
google-maps-services-python copied to clipboard
Places: region parameter no longer needed in Nearby Search
The library documentation specifies that a region parameter can be passed in the places_nearby
method (check it out here).
Looking at the code, you can see that places_nearby
never uses the region parameter but it is specified in the comments section (check it out in line 270).
I notice this problem because I was blindly following the documentation trying to invoke the places_nearby
method. If you input a specific region (ex: region="EC"
), python throws a problem:
TypeError: places_nearby() got an unexpected keyword argument 'region'
I think the only problem is the region part in the comment section that is making it appear in the documentation and misleading newbie programmers like me to get an unexpected type error. I suggest just deleting that line and recompiling the documentation. I could submit a pull request but I was wondering if my idea is correct or if I need extra permission to do so.
Steps to reproduce
- Try to use the
googlemaps.Client.places_nearby
method by inputting a specific region.
Code example
result = gmaps_client.places_nearby(
location = (-33.86746, 151.207090),
radius = 100, # in meters
region = "EC",
keyword = "something related to the business",
language = "es-419",
type = "liquor_store",
page_token = None
)
Best wishes,
Nico