javascript - Google Places Autocomplete, how to deal with Unit number in the address -


i'm using google place autocomplete allow user provide address , works fine basic addresses e.g.

some st ashfield nsw 2019 

but doesn't work when provides additional info unit number e.g.:

unit 2/42, st ashfield nsw 2019 

what best way deal kind of address given unit might apartment , in different formats. crazy regex or there setting in google autocomplete missed? or provide additional field unit/appartment/everything else option?

i had same issue when saving contacts' addresses , wanting google maps show them on everyday maps. ended using was... parenthesis!

depends on country on , type, instance

king street 5, ashfield nsw 2019 

works, obviously, doesn't have unit number.

king street 5 (unit 2/42), ashfield nsw 2019 

works unit number (although there not difference far marker concerned).

please note: have no idea how addresses in australia work, google seems "rename" address type if type on google maps (i have used in countries have lived , renaming works perfectly).

hope helps!


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -