Google maps javascript example not working -
i using example google maps website.
https://developers.google.com/maps/documentation/javascript/tutorial
i posting entire code below. blank screen - nothing seems show either on firefox or chrome. can suggest going on?
thank you, -vj
<!doctype html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map-canvas { height: 100% } </style> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=your_api_key&sensor=set_to_true_or_false"> </script> <script type="text/javascript"> function initialize() { var mapoptions = { center: new google.maps.latlng(-34.397, 150.644), zoom: 8, maptypeid: google.maps.maptypeid.roadmap }; var map = new google.maps.map(document.getelementbyid("map-canvas"), mapoptions); } google.maps.event.adddomlistener(window, 'load', initialize); </script> </head> <body> <div id="map-canvas"/> </body> </html>
ok figured out problem. saving code in html file using wordpad , saving in format unicode. when saved file using notepad , format ansi, ok. took me entire morning figure out!!!
Comments
Post a Comment