title: How to Draw a Rectangle on Google Map using Google Map API
body: <p>i am new to stackoveflow, can any one help me to how to draw a rectangle using google api v3, i went through some examples on google i got the below code,</p>
  
  <pre><code>function initialize() {
  
    var coachella = new google.maps.LatLng(33.6803003, -116.173894);
    var rectangle;
  
    var myOptions = {
      zoom: 11,
      center: coachella,
      mapTypeId: google.maps.MapTypeId.TERRAIN
    };
  
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);
  
    rectangle = new google.maps.Rectangle();
  
    google.maps.event.addListener(map, 'zoom_changed', function() {
  
      // Get the current bounds, which reflect the bounds before the zoom.
      var rectOptions = {
        strokeColor: "#FF0000",
        strokeOpacity: 0.8,
        strokeWeight: 2,
        fillColor: "#FF0000",
        fillOpacity: 0.35,
        map: map,
        bounds: map.getBounds()
      };
      rectangle.setOptions(rectOptions);
    });
  }
  </code></pre>
  
  <p>But, it functions on zoom event(zoom chanages),i want simple with out event,please help me</p>