map-simple-async.html
author sl
Thu, 10 Apr 2014 12:45:33 +0200
changeset 3 54ac29018aaf
permissions -rw-r--r--
Rectangle overlay params:
Adding support for 'cycle' and 'zoom' param.
Fixing issue with step not being interpreted and an integer.
Updating help documentation.
     1 
     2 
     3 <!DOCTYPE html>
     4 <html>
     5   <head>
     6     <title>Asynchronous Loading</title>
     7     <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
     8     <meta charset="utf-8">
     9     <link href="/maps/documentation/javascript/examples/default.css" rel="stylesheet">
    10     <script>
    11 function initialize() {
    12   var mapOptions = {
    13     zoom: 8,
    14     center: new google.maps.LatLng(-34.397, 150.644),
    15     mapTypeId: google.maps.MapTypeId.ROADMAP
    16   };
    17 
    18   var map = new google.maps.Map(document.getElementById('map-canvas'),
    19       mapOptions);
    20 }
    21 
    22 function loadScript() {
    23   var script = document.createElement('script');
    24   script.type = 'text/javascript';
    25   script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&' +
    26       'callback=initialize';
    27   document.body.appendChild(script);
    28 }
    29 
    30 window.onload = loadScript;
    31 
    32     </script>
    33   </head>
    34   <body>
    35     <div id="map-canvas"></div>
    36   </body>
    37 </html>
    38