map-simple-refresh.html
author sl
Wed, 09 Apr 2014 13:41:29 +0200
changeset 1 a1483545da35
permissions -rw-r--r--
Rectangle overlay params:
Fixing duplicate first rectangle entry due to our guery strings parsing.
Adding 'a' URL parameter to control rectangle fill opacity.
Adding support to pass in color as hexa using %23 URL encoding.
     1 
     2 
     3 <!DOCTYPE html>
     4 <html>
     5   <head>
     6     <title>Simple Map</title>
     7     <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
     8     <meta charset="utf-8">
     9     <style>
    10       html, body, #map-canvas {
    11         margin: 0;
    12         padding: 0;
    13         height: 100%;
    14       }
    15     </style>
    16     <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    17     <script>
    18 // Enable the visual refresh
    19 google.maps.visualRefresh = true;
    20 
    21 var map;
    22 function initialize() {
    23   var mapOptions = {
    24     zoom: 8,
    25     center: new google.maps.LatLng(-34.397, 150.644),
    26     mapTypeId: google.maps.MapTypeId.ROADMAP
    27   };
    28   map = new google.maps.Map(document.getElementById('map-canvas'),
    29       mapOptions);
    30 }
    31 
    32 google.maps.event.addDomListener(window, 'load', initialize);
    33 
    34     </script>
    35   </head>
    36   <body>
    37     <div id="map-canvas"></div>
    38   </body>
    39 </html>
    40