Embedded google maps doesn't show in HTML page -


i'm playing around google map apis following google maps tutorial https://developers.google.com/maps/tutorials/fundamentals/adding-a-google-map following code map doesn't show in html code example.

any suggestions?

regards

<html>   <head>     <style>       #map_canvas {       width: 500px;       height: 400px;                   }     </style>     <script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>     <script>         function initialize() {         var map_canvas = document.getelementbyid('map_canvas');         var map_options = {         center: new google.maps.latlng(44.5403, -78.5463),         zoom: 8,         maptypeid: google.maps.maptypeid.roadmap                           }            var map = new google.maps.map(map_canvas, map_options)                               }         google.maps.event.adddomlistener(window, ‘load’, initialize);     </script>   </head>   <body>     <div id="map_canvas"></div>   </body> </html> 

this line:

google.maps.event.adddomlistener(window, ‘load’, initialize); 

contains invalid characters. should work:

google.maps.event.adddomlistener(window, 'load', initialize); 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -