Reputation: 11
I am successfully creating a Google Map with my street address input (origin and destination) However, when I use the same exact test with the Google Address API the JSON response shows numerous addresses and none of them appear to be valid. For example, I am using an address in Colorado and it is returning the directions for the same street address in a city in California. This is not consistent as some addresses work fine... so, I believe the issue is my url structure but I can find no Google Address API examples that include street addresses. All of their examples only cite city and state. So it is difficult to see how the parameters are supposed to look without seeing a specific street address example. Can someone supply a post or an example or a link that will help me? Thank you!
Upvotes: 1
Views: 1533
Reputation: 23749
Google Maps is an address approximation service. To illustrate, go into street view at nearly any location, and the top-left corner should display "Address is approximate." Google and other such services don't verify the existence or deliverability of an address.
From what you've described, it's quite possible that your URL is assembled correctly (though, you haven't posted it, so unless you do that we can't be certain), and Google is just doing what it does best: making a best guess with what it's given.
If you're looking for only valid addresses, you'll need to hook into a CASS-Certified service.
I work for SmartyStreets; we provide an API called LiveAddress that returns only valid addresses. There are a few out there so we encourage you to do your own research, but you won't find any others that are free to use (with full functionality, indefinitely).
If you need correct directions, I would recommend running the start and destination address through an API like LiveAddress, then submit those results to Google. At that point you'll be sure you're in the right state. :)
Hopefully that helps; let me know if you have any other questions about addresses.
Upvotes: 1