Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

137
Vistas
Google Places Autocomplete API - Abbreviate Cardinal Direction on input

I'm using Google Places Autocomplete for looking up addresses, and I want users to be able to type abbreviations for the cardinal directions in their street addresses.

For example, my users have to type "north" out completely (eg 123 "north" willow lane), instead of just "n" (eg 123 "n" willow lane). Users try to type "n" "s" "e" "w" most of the time, and think our autocomplete is broken because the autocomplete is expecting the full typed-out cardinal direction.

Is there a setting in the places API that toggles this configuration? Substring matching?

https://developers.google.com/maps/documentation/places/web-service/autocomplete#PlaceAutocompleteMatchedSubstring


Here is my current code:

I'm using Javascript.

Importing the autocomplete:

  async mounted() {
    const maps = await this.$GMaps()
    this.autocompleteService = new maps.places.AutocompleteService()
  },

Using autocomplete to get predictions:

this.autocompleteService.getPlacePredictions({ input: searchAddress }, (predictions) => {
        this.addressPredictions = predictions
      })

(I'm using Nuxt / Vue)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This had nothing to do with google autocomplete. Console.logging showed results were returned with abbreviated cardinal directions.

Instead, this was a problem with Vuetify's v-autocomplete filtering out the desired suggestions. V-autocomplete can be configured with the "no-filter" prop to show these results

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda