Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

139
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda