I'm using Google Maps Place and I can't restrict where I want to search.
It is limiting the search according to the viewpoint (according to the zoom of the map, what the map shows it looks for)
I made this code.
https://jsfiddle.net/dorathoto/xbgn9Lyt/69
I tried to put the bounds with a circle and with a polygon, both fail
I would like if possible with Polygon. because it would be exactly the city.
I didn't understand the difference either and I tested it with both: SearchBox and Autocomplete
To test:
Places with error and that appears: Campinas - SP, Brazil //city 100km away Shopping Alegria // also outside the region
I found the answer to the difference between autocomplete and searchbox but the restriction is not correct, I verify that for city name it finds outside, establishment name not.
SearchBox adds a text input field to your web page, in much the same way as Autocomplete. The differences are as follows: