Advertisement
keysle

Gmaps Point

May 15th, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.47 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: 100% }
  7.         body { height: 100%; margin: 0; padding: 0 }
  8.         #map_canvas { height: 100% }
  9.       </style>
  10.       <script type="text/javascript"
  11.        src="http://maps.googleapis.com/maps/api/js?key=AIzaSyAWhjy3iZ8g6BZszj299c0yUY6ahKpSr1U&sensor=false">
  12.       </script>
  13.       <script type="text/javascript">
  14.         function initialize() {
  15.           var myOptions = {
  16.             center: new google.maps.LatLng(-34.397, 150.644),
  17.             zoom: 8,
  18.             mapTypeId: google.maps.MapTypeId.ROADMAP
  19.           };
  20.           var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
  21.            
  22.  
  23.             var centreicon = new GIcon();
  24.         centreicon.constructor
  25.         centreicon.image = "http://maps.google.com/mapfiles/kml/pal3/icon31.png ";
  26.         centreicon.shadow = "http://maps.google.com/mapfiles/kml/pal3/icon31s.png ";
  27.         centreicon.iconSize = new GSize(12, 20);
  28.         centreicon.shadowSize = new GSize(22, 20);
  29.         centreicon.iconAnchor = new GPoint(6, 20);
  30.         centreicon.infoWindowAnchor = new GPoint(5, 1);
  31.  
  32.         var marker = new GMarker(new GLatLng(-34.397, 150.644), centreicon);
  33.         map.addOverlay(marker);
  34.         }
  35.       </script>
  36.     </head>
  37.     <body onload="initialize()">
  38.       <div id="map_canvas" style="width:100%; height:100%"></div>
  39.     </body>
  40.   </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement