Question

  1. https://maps.googleapis.com/maps/api/geocode/json?components=postal_code:01133&sensor=false Expected - return results for country=US, "formatted_address" : "Springfield.."
    Actual - returns results for country=LT, "formatted_address" : "Vilnius 01133, Lithuania"

  2. https://maps.googleapis.com/maps/api/geocode/json?components=postal_code:07477&sensor=false Expected - return results for country=US, "formatted_address" : "Wayne, New Jersey.."
    Actual - NO_RESULTS

What needs to be done to query by US postal code and get US address components in response?

Was it helpful?

Solution

  1. I would expect Vilnius AND Sao Paulo because both have 01133 (Postal Codes are NOT unique)
  2. Yeah, that's a Google Problem, because 07470 is the "main" postal code for Wayne, NJ

Check out Postal Codes here:

http://www.geopostcodes.com/index.php

ad 1. Similar Postal Codes for a Springfield I've found (Springfield, MA): 01101, 01103-01105, 01107-01109, 01119, 01128, 01129, 01151 - not 01133

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top