Я использую функцию геокодера Google GClientGeocoder.
Метод getLocations представляется функцией асинхронного обратного вызова Google.
Я бы хотел обновить запись, обозначенную "id", точками, найденными в GLatLng,
Однако я не могу понять, как добавить id в качестве параметра в мою функцию getGeoCode.
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)
}