Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
- <style type="text/css">
- html { height: 700px }
- body { height: 700px; margin: 0; padding: 0 }
- </style>
- <script type="text/javascript"
- src="http://maps.googleapis.com/maps/api/js?key=--------------&sensor=false">
- </script>
- <script type="text/javascript">
- var map;
- var marker;
- function initialize() {
- var myOptions = {
- center: new google.maps.LatLng(52.907135, -1.093140),
- zoom: 14,
- mapTypeId: google.maps.MapTypeId.ROADMAP
- };
- map = new google.maps.Map(document.getElementById("content_main"),
- myOptions);
- });
- }
- //button function
- function userLoc() {
- // Creating a marker
- marker = new google.maps.Marker({position: google.maps.LatLng(52.907135, -1.093140),
- map: map
- });
- }
- </script>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" type="text/css" href="style.css" />
- <title>Test Project</title>
- </head>
- <body onload="initialize()">
- <div id="container">
- <div id="header">
- <h1>Bob<span class="off">Test</span></h1>
- <h2>MapTest</h2>
- </div>
- <div id="menu">
- <ul>
- <li class="menuitem"><a href="#">Home</a></li>
- <li class="menuitem"><a href="#">About</a></li>
- <li class="menuitem"><a href="#">Contact</a></li>
- </ul>
- </div>
- <div id="leftmenu">
- <div id="leftmenu_top"></div>
- <div id="leftmenu_main">
- <h3>Links</h3>
- <ul>
- <li><a href="index.php">Some Tab 1</a></li>
- <li><a href="mappage.php">Some Tab 2</a></li>
- <li><a href="mappage1.php">Some Tab 3</a></li>
- </ul>
- </div>
- <div id="leftmenu_bottom"></div>
- </div>
- <div id="content">
- <div id="content_top"></div>
- <div id="content_main" style="width:660px; height:700px">
- </div>
- <button onclick="userLoc()">Users Location</button>
- <!--function initMap()
- {
- // do map object creation and initialization here
- // ...
- // add a click event handler to the map object
- GEvent.addListener(map, "click", function(overlay, latLng)
- {
- // display the lat/lng in your form's lat/lng fields
- document.getElementById("latFld").value = latLng.lat();
- document.getElementById("lngFld").value = latLng.lng();
- });
- }-->
- <div id="content_bottom"></div>
- <div id="footer"><h3>Footer Placeholder</h3></div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement