• Hello everyone, I am trying to add a google maps map to my page.

    I followed the instructions here:
    https://developers.google.com/maps/documentation/javascript/tutorial

    <!DOCTYPE html>
    <html>
      <head>
        <style type="text/css">
          html, body, #map-canvas { height: 100%; margin: 0; padding: 0;}
        </style>
        <script type="text/javascript"
          src="https://maps.googleapis.com/maps/api/js?key=API_KEY">
        </script>
        <script type="text/javascript">
          function initialize() {
            var mapOptions = {
              center: { lat: -34.397, lng: 150.644},
              zoom: 8
            };
            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"></div>
      </body>
    </html>

    I have my own API and all that but when I try and add this to a page, I do not get anything. It is just blank. Any ideas? I am struggling.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adding google maps java api to page’ is closed to new replies.