Using the geocoder to effectively find a full address

864 views
Skip to first unread message

bladey

unread,
Nov 2, 2010, 8:17:56 PM11/2/10
to google-map...@googlegroups.com
Hello,

I'm currently using the geocoder to match address strings and to populate fields in my interface.

For example if I type:

PO BOX 907, Springwood 4127 QLD, Australia

The geocoder will come back with data in an array with various types. Australia will come back under
["country", "political"] and as such I will populate my country field with this information.

I'll continue to parse the other results so i'll get most of my fields filled out with the correct information including address, suburb, postcode/zipcode state and so forth.

This works great for most addresses, but for some there are issues. Take the above example again:

PO BOX 907, Springwood 4127 QLD, Australia

Everything is matched except for:
PO BOX 907

When the geocoder comes back, it contains no trace of this information as it has stripped it out while locating the address.

The problem is, if I rely on the geocoding service to populate fields in my interface to clean addresses and find latitude/longitudes for me. How should I deal with the information it doesn't parse when it's important information?

At the moment I can only see one solution, and that would be to compare the original and parsed results and attempt to insert the missing information along with the new parsed result.

For example note that it didn't come back with PO Box 907 and insert it at the front somehow.

Other situations where it's a problem is when a location is part of a shopping centre, in a suite in a building and so on.

Does anyone have any suggestions on how the geocoding service could be more effectively used?

Thanks for your assistance.

Chris Broadfoot

unread,
Nov 3, 2010, 4:04:25 AM11/3/10
to google-map...@googlegroups.com
The geocoder only geocodes street addresses. PO Boxes are not street addresses; and as such, the address components in the result will not include the PO Box.

Cheers
Chris

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply all
Reply to author
Forward
0 new messages