Posted by ron_s on June 9, 2008 at 11:54am
| Project: | Google Client Geocoder |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
If I enter "75201" for Dallas, Texas or "0180 Oslo" for Oslo, Norway, it does resolve to the right lat/long. Also the accuracy level is appropriately set as "Post code (zip code) level". However it doesn't fill in the postal code field, and I get an error saying it is required. (Actually it says "field is required." ... the value you are setting for !name around line 318 in gcg.module isn't getting set).
Then, if I enter an address such as "1 Main St, Chico, CA", with *no* postal code the javascript sets the postal code to "95928". So your javascript is recognizing that 75201 and 0180 are postal codes, but not setting the postal code field in the JS.
Comments
#1
Well I investigated this a bit further and I found the problem. Seems as though there were two issues. First, looks like Google Maps changed their XML for Postal Codes.
Also, countries like the United States which do not have a SubAdministrativeArea do not have this part in the XML string, while countries like Norway do. There needs to be an IF conditional in place to handle this.
I have created a patch for testing, it is attached.
#2
Well, I spoke too quickly. The above patch was not transferring locality, admin area and subadmin area, which seems like it needed to be done too. Try this one instead.