cliveportman/code

Add Google Map to a page

Use the position variable to centre the map.

<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script>
    var position = new google.maps.LatLng(52.62712, 1.22575);
    var myOptions = {
        zoom: 14,
        center: position,
        disableDefaultUI: true,
        zoomControl: true,
        zoomControlOptions: {
            style: google.maps.ZoomControlStyle.LARGE,
            position: google.maps.ControlPosition.RIGHT_CENTER
        },			
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(
        document.getElementById("map"),
        myOptions);
</script>