title: why setMap(null) is not working google maps api v3?
body: <p>I am using google maps api 3.9 .In app user can add marker or delete marker.when user click on map an Infowindow will be displayed.in which user can enter  name,lat,long and click the save image as follows:</p>
  
  <pre class="lang-js prettyprint-override"><code>google.maps.event.addListener(map, 'click', function(event) {
  
    point = new google.maps.Marker({
      position: event.latLng
      , map: map
      , icon: 'resource/image/mapIcons/point.png'
      , id: id
      , type:"point"
    });
  
    type = point.type;
    newPoint = true;
    existingPoint = false;
    markerObj = this;
  
    inputInfowindow.setContent("&lt;table style='width:92%;' id='inputTable'&gt;" +
                               "&lt;tr&gt; &lt;td&gt;point&lt;/td&gt; &lt;/tr&gt;" +
                               "&lt;tr&gt; &lt;td&gt;&lt;input class='infoInput' type='text' id='name' placeholder='name'/&gt; &lt;/td&gt; &lt;/tr&gt;" +
                               "&lt;tr&gt; &lt;td&gt;&lt;input class='infoInput'type='text' id='lat' placeholder='latitude'/&gt;&lt;/td&gt; &lt;/tr&gt;" +
                               "&lt;tr&gt; &lt;td&gt;&lt;input class='infoInput'type='text' id='lon' placeholder='longitude'/&gt;&lt;/td&gt; &lt;/tr&gt;" +
                               "&lt;tr&gt;&lt;td&gt;&lt;input type='image' src='resource/image/mapIcons/save.png' onclick='save()' class='saveImage' alt='save'/&gt; &lt;/td&gt;&lt;/tr&gt;");
  
    event1 = event.latLng;
    currentMarker = point;
    inputInfowindow.open(map,point);
  
  });
  </code></pre>
  
  <p>marker saved in DB.
  when user cliclks on delete button follwing method ll be called:</p>
  
  <pre class="lang-js prettyprint-override"><code>function deleteMarker(id,rev) {
    var marker  = markerObj;
    markerObj = undefined;
    var x = confirm("are you sure to delete marker?");
    if(x){
      deleteLocations(id,rev);//removes marker details from DB
      if(marker){
        console.log(marker);
        marker.setMap(null);
      }
    }
  }
  </code></pre>
  
  <p>but at marker.setMap(null); marker is removed from map still its on map.I checked with console.log(marker); marker object coming properly,no errors on console.i went through lot of googling but no result.Please help about this.</p>