jamboljack

Sample Google API

Jun 22nd, 2014
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.84 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Sample Map Google API</title>
  6. <style>
  7. #map_canvas {
  8.     width: 500px;
  9.     height: 400px;
  10. }
  11. </style>
  12. <script src="https://maps.googleapis.com/maps/api/js"></script>
  13. <script>
  14.   function initialize() {
  15.     var map_canvas = document.getElementById('map_canvas');
  16.         var mapOptions = {
  17.           center: new google.maps.LatLng(44.5403, -78.5463),
  18.           zoom: 8,
  19.           mapTypeId: google.maps.MapTypeId.ROADMAP
  20.         }  
  21.     var map = new google.maps.Map(map_canvas);
  22.     }
  23.     google.maps.event.addDomListener(window, 'load', initialize);
  24. </script>
  25. </head>
  26.  
  27. <body>
  28.     <div id="map_canvas"></div>
  29. </body>
  30. </html>
Add Comment
Please, Sign In to add comment