I'm using the google.maps.Geocoder class to resolve Australian addresses entered into a free form input field:
Problem is that the returned formatted_address fields not always contains the postcode.
Pass "Parramatta" into google.maps.GeocoderRequest.address -> receive formatted_address "Parramatta NSW, Australia" Pass "Strathfield" into google.maps.GeocoderRequest.address -> receive formatted_address "Strathfield NSW 2135, Australia"
Looks to me like this is a fault in Google's database, but I'm not sure.
Is there a way to resolve addresses that always gives you the postcode?
If you reverse geocode the location returned for Parramatta, it does contain a post code:
{
"long_name": "2150",
"short_name": "2150",
"types": [
"postal_code"
]
}
That is correct according to Wikipedia