AddressPickerAutocompleteForFlow icon indicating copy to clipboard operation
AddressPickerAutocompleteForFlow copied to clipboard

City not populating when selecting address

Open bromanowski opened this issue 4 years ago • 2 comments
trafficstars

When you search and select "9 Marcel Road Clifton Park, NY 12065" The city does not populate

bromanowski avatar Sep 21 '21 20:09 bromanowski

Also having this issue - Sporadically works, but not always (UK Addresses)

rileySFDEV avatar Sep 24 '21 10:09 rileySFDEV

Edit: Apologies I originally picked up the wrong 9 Marcel Road address ...

I think the reason this might be happening is because it's looking for locality or sublocatlity_level_1 being returning in the API response

The API returns the following for this address, which doesn't return any locality value at all but only administrative_areas

In the component, it handles for where locality is null by looking for an address Type of neighbourhood. Possibly this is an outdated API reference and therefore doesn't work. Update could be made to consider administrative_area_level_3 where locality is blank

{ "long_name": "Clifton Park", "short_name": "Clifton Park", "types": [ "administrative_area_level_3", "political" ] },

{ "long_name": "Hillsborough County", "short_name": "Hillsborough County", "types": [ "administrative_area_level_2", "political" ] },

{ "long_name": "New York", "short_name": "NY", "types": [ "administrative_area_level_1", "political" ] },

hwong103 avatar Sep 05 '22 23:09 hwong103