Simple Static MAP without KEY

by Faisal Khan Janjua

HTML

<div id="gmap"></div>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>

CSS

html, body {
     margin: 0;
     padding: 0;
     height: 100%;
    width: 100%;
 }
#canvas{
  height:250px;
  width:100%;
}

JavaScript

function initialize() {

  var mapOptions = {
    zoom: 5,
    center: new google.maps.LatLng(-34.000009, -56.197645),
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var mapCanvas = document.getElementById('gmap');
  mapCanvas.id = "canvas";
  document.body.appendChild(mapCanvas);
  var map = new google.maps.Map(mapCanvas, mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);