Adi Wibawa
Adi Wibawa

Reputation: 21

Google Place Autocomplete Returns abbreviation instead full address

On our application using Google place autocomplete, there is a mismatch when the Google Place Autocomplete returns address component using abbreviation instead full terms. For example, master data suburb in our application has Mount Gambier, while the google api return Mt. Gambier.

Is there any list on what Google place autocomplete returns for suburb? or is there any rules regarding the abbreviation that may returned by the Google Place Autocomplete?

Upvotes: 2

Views: 1441

Answers (2)

Sagar Moharil
Sagar Moharil

Reputation: 1

I know its too late to answer this, but the answer is you should specify long_name for suburb instead of short_name and google will provide you the same.

Upvotes: 0

Verma
Verma

Reputation: 8459

You would want to do a Places Details request from Google Places API.

Places Details return both short name and long name. The long name should give return you Mount Gambier instead of Mt. Gambier.

Upvotes: 1

Related Questions