Hello. There is a map and on it geo-cardination The search string, when you enter some terrain there, it marks this place with a marker. I take the coordinates of this place, run them in alert(); - everything works, but in the console it shows an array. So, how can I get lat and lot from this array?
function geocodeAddress(geocoder, resultsMap) { var address = document.getElementById('address').value; geocoder.geocode({'address': address}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) { resultsMap.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: resultsMap, position: results[0].geometry.location }); //Тут показывает координыта alert(results[0].geometry.location); //А тут показывет массив console.log(results[0].geometry.location); } else { alert('Geocode was not successful for the following reason: ' + status); } }); } I would be grateful to everyone who helps!