I am working on a migration project from google maps V2 to V3 and can't get the following working.
<!DOCTYPE html>
<html>
<head>
<script
src="http://maps.googleapis.com/maps/api/js?key=myApiKey&sensor=false">
</script>
<script>
function initialize()
{
var map=new google.maps.Map(document.getElementById("googleMap"));
map.setCenter(new google.maps.LatLng(51.508742,-0.120850),5);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="googleMap" style="width:500px;height:380px;"></div>
</body>
</html>
Actually I don't want to use the options parameter in the new google.maps.Map
function. I want to center the map using map.center function.