var geo = new google.maps.Geocoder; geo.geocode({'address':address},function(results, status){ if (status == google.maps.GeocoderStatus.OK) { var myLatLng = results[0].geometry.location; // Add some code to work with myLatLng } else { alert("Geocode was not successful for the following reason: " + status); } });