I am using Google GClientGeocoder geocoder function. Method getLocations seems to be a a Google asynchronous callback function.
I would like to update the record identified with "id" with points found in GLatLng, However I can't figure out how to add id as a parameter to my getGeoCode function.
function fnGetEncoding(address,id)
{
// Create new geocoding object
geocoder = new GClientGeocoder();
// Retrieve location information, pass it to getGeoCode()
geocoder.getLocations(address, getGeoCode);
}
function getGeoCode(response)
{
// Retrieve the object
place = response.Placemark[0];
// Retrieve the latitude and longitude
point = new GLatLng(place.Point.coordinates[1],
place.Point.coordinates[0]);
$('#id_listing').append(response.name + point + '<br>');
// I would like to update the record identified with "id" with points found GLatLng
// fnWriteGeocodesToFile(response.name, id , point)
}