не могу решить с lastId, т.к. сейчас записи берутся не по порядку, а рандомно
function geocodeAddress(address) {
geocoder.geocode( { 'address': address}, function(results, status) {
if (status === "OK") {
let lat = results[0].geometry.location.lat();
let lng = results[0].geometry.location.lng();
return [lat, lng];
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
ler res = geocodeAddress("Москва");
console.log(res);