title: Remove HeatmapLayer from google maps
body: <p>I'm using the HeatmapLayer api <a href="https://developers.google.com/maps/documentation/javascript/layers#JSHeatMaps" rel="noreferrer">https://developers.google.com/maps/documentation/javascript/layers#JSHeatMaps</a></p>
  
  <p>I generate the heatmap like this:</p>
  
  <pre><code>heatmap = new google.maps.visualization.HeatmapLayer({
      data: heatmapData,
      radius: 50
  });
  heatmap.setMap(google_map);
  </code></pre>
  
  <p>When i want to display another heat map using the same function as above (i'm using ajax and i have new markers to display, so i need to change the heatmap too) the heat map layer stays on the map and in this case i have 2 overlapping heatmaps on my map. How can i remove the current heatmaplayer first?</p>
  
  <p>Here is my demo code, if you click on the link below the map, the heatmap is added, of you click on it again, it should remove it, but its just duplicated over and over again:</p>
  
  <p><a href="http://jsfiddle.net/LpL3P/" rel="noreferrer">http://jsfiddle.net/LpL3P/</a></p>