I work with the google maps API and test a section that geocodes all addresses in the database that do not have coordinates, then generates a report that was successful and which failed.
If any of the places cannot be found, it should place the form at the top of the page so that the user can either change the address or specify the coordinates.
I know that a geocoder can return my code with a status code G_GEO_UNKNOWN_ADDRESS, but it never uses it. I put fake addresses in the database and got this:
The coordinates of 1337 Rawrmander Rd.
Were successfully set to:
latitude: 49.170171
longtitude: -123.136579
The coordinates of 5678 Imaginary Lane
Were successfully set to:
latitude: 49.170171
longtitude: -123.136579He simply gave the city center (and continues to do so no matter what the address), instead of calling it an unknown address.
This is what I call a geocoder:
//in a for loop
setTimeout( "geocoder.getLocations(\"" +
//address to send to google
values[i]['house'] + " " +
values[i]['street'] + " " +
values[i]['streetType'] + ", " +
"Richmond, BC, Canada\", " +
//google returns to this function asynchronously
"function(reply) { handleReply(processItem++, reply); } );"
,
callTimeout);
callTimeout += 220;
I tried to change "Richmond, BC, Canada"only to "Richmond"in the hope that he would not know which city to choose and then return an unknown address, but instead he just chose the middle of Richmond, Virginia.
Does anyone know a way to "hint" on google to give me an unknown address, and not just pick something?