Friday, February 14, 2014

Google Maps code For WEBSITE

<style>
#map-canvas {
height:450px;
width:100%;
}
</style>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script>
function initialize() {
var myLatlng = new google.maps.LatLng(28.609284,77.294875);
var mapOptions = {
zoom: 15,
center: myLatlng
}
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: 'Hello World!'
});
}

google.maps.event.addDomListener(window, 'load', initialize);

</script>

<div id="map-canvas"></div>