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

121
Views
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 answers
Answer question

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 Report
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!