Skip to content

Instantly share code, notes, and snippets.

@opnchaudhary
Created July 5, 2013 04:32
Show Gist options
  • Select an option

  • Save opnchaudhary/5931636 to your computer and use it in GitHub Desktop.

Select an option

Save opnchaudhary/5931636 to your computer and use it in GitHub Desktop.
Integrate Google maps 3 in website
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Maps</title>
<style>
#map_canvas {
width: 500px;
height: 400px;
}
</style>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
function initialize() {
var map_canvas = document.getElementById('map_canvas');
var map_options = {
center: new google.maps.LatLng(27.7, 85.33333330000005),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(map_canvas, map_options)
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map_canvas"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment