Advertisement
Guest User

HTML MAP CODE

a guest
May 1st, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.72 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  5.     <style type="text/css">
  6.         html { height: 700px }
  7.         body { height: 700px; margin: 0; padding: 0 }
  8.     </style>
  9.     <script type="text/javascript"
  10.         src="http://maps.googleapis.com/maps/api/js?key=--------------&sensor=false">
  11.     </script>
  12.     <script type="text/javascript">
  13.     var map;
  14.     var marker;
  15.         function initialize() {
  16.             var myOptions = {
  17.                 center: new google.maps.LatLng(52.907135, -1.093140),
  18.                 zoom: 14,
  19.                 mapTypeId: google.maps.MapTypeId.ROADMAP
  20.             };
  21.             map = new google.maps.Map(document.getElementById("content_main"),
  22.             myOptions);
  23.             });
  24.         }
  25.         //button function
  26.         function userLoc() {
  27.             // Creating a marker
  28.             marker = new google.maps.Marker({position: google.maps.LatLng(52.907135, -1.093140),
  29.                 map: map
  30.             });
  31.         }
  32.     </script>
  33. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  34. <link rel="stylesheet" type="text/css" href="style.css" />
  35. <title>Test Project</title>
  36. </head>
  37.  
  38. <body onload="initialize()">
  39.  
  40. <div id="container">
  41.         <div id="header">
  42.             <h1>Bob<span class="off">Test</span></h1>
  43.             <h2>MapTest</h2>
  44.         </div>  
  45.        
  46.         <div id="menu">
  47.             <ul>
  48.                 <li class="menuitem"><a href="#">Home</a></li>
  49.                 <li class="menuitem"><a href="#">About</a></li>
  50.                 <li class="menuitem"><a href="#">Contact</a></li>
  51.             </ul>
  52.         </div>
  53.        
  54.         <div id="leftmenu">
  55.  
  56.             <div id="leftmenu_top"></div>
  57.  
  58.             <div id="leftmenu_main">    
  59.                
  60.                 <h3>Links</h3>
  61.                        
  62.                 <ul>
  63.                 <li><a href="index.php">Some Tab 1</a></li>
  64.                 <li><a href="mappage.php">Some Tab 2</a></li>
  65.                 <li><a href="mappage1.php">Some Tab 3</a></li>
  66.                 </ul>
  67.             </div>
  68.  
  69.             <div id="leftmenu_bottom"></div>
  70.         </div>
  71.        
  72.         <div id="content">
  73.  
  74.             <div id="content_top"></div>
  75.  
  76.             <div id="content_main" style="width:660px; height:700px">
  77.                
  78.             </div>
  79.             <button onclick="userLoc()">Users Location</button>
  80.             <!--function initMap()
  81. {
  82.    // do map object creation and initialization here
  83.    // ...
  84.  
  85.    // add a click event handler to the map object
  86.    GEvent.addListener(map, "click", function(overlay, latLng)
  87.    {
  88.        // display the lat/lng in your form's lat/lng fields
  89.        document.getElementById("latFld").value = latLng.lat();
  90.        document.getElementById("lngFld").value = latLng.lng();
  91.    });
  92. }-->
  93.             <div id="content_bottom"></div>
  94.            
  95.             <div id="footer"><h3>Footer Placeholder</h3></div>
  96.         </div>
  97.    </div>
  98. </body>
  99. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement