geocoding accuracy issues

31 views
Skip to first unread message

sheldon

unread,
Oct 15, 2010, 12:21:56 PM10/15/10
to Google Maps JavaScript API v3
I have some google gecode example code I'm using to geocode via PHP/
SQL and I'm having some issues with accuracy. approx. 75% is
accurate, others are way off. For instance if I geocode
1236 C St
Sacramento, CA 95814

I get a marker placed clear up in Alaska!

I've also notice a few discrepancies between the example code I'm
using and google's own documentation and I wonder if this could be the
reason. The documentation states that geocode requests must be in the
following form:

http://maps.googleapis.com/maps/api/geocode/output?parameters

While the example software uses:

define("MAPS_HOST", "maps.google.com");
.
.
.
$base_url = "http://" . MAPS_HOST . "/maps/geo?output=xml" . "&key=" .
KEY;

Which should I in fact use, and if this isn't the cause of my accuracy
issues, what can I do to help correct it?



sheldon

unread,
Oct 15, 2010, 2:15:15 PM10/15/10
to Google Maps JavaScript API v3
Other than the request discrepancy, I think I realize my problem and
it's not a maps API issue, it's a script issue I believe. The geocode
sample takes the "address" field from the SQL db and my address field
is only the number and street name. I need combine "address",
"state", "zip" all into one variable I guess?

sheldon

unread,
Oct 15, 2010, 2:33:56 PM10/15/10
to Google Maps JavaScript API v3
Got it. Sorry for this thread:

$fulladd = $address . " " . $city . " " . $state . " " . $zip;
Reply all
Reply to author
Forward
0 new messages