You have to use the Geocoder to get the Latitude and Longitude of a place.
You could do something like this:
var geocoder;
var map;
function initialize()
{
geocoder = new google.maps.Geocoder();
var mapProp = {
center: new google.maps.LatLng(51.508742,-0.120850),
zoom:7,
disableDefaultUI:true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
geocoder.geocode({ 'address': 'London' }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
// To add a marker:
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
google.maps.event.addDomListener(window, 'load', initialize);
All information can be found on https://developers.google.com/maps/documentation/javascript/geocoding