Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
strictBounds in Google place not filter results

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

Update

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:

  • The main difference lies in the results that appear in the pick list. SearchBox supplies an extended list of predictions, which can include places (as defined by the Places API) plus suggested search terms. For example, if the user enters 'pizza in new', the pick list may include the phrase 'pizza in New York, NY' as well as the names of various pizza outlets.
  • SearchBox offers fewer options than Autocomplete for restricting the search. In the former, you can bias the search towards a given LatLngBounds. In the latter, you can restrict the search to a particular country and particular place types, as well as setting the bounds. For more information, see below.
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!