javascript google maps remove icon
<p>I am attempting to remove the custom icons from the google map and reset the map to the default zoom and lat lng. </p>

<p>here is my function:</p>

<pre><code>function clearLocations() {
 infoWindow.close();
 for (var i = 0; i &lt; markers.length; i++) {
   markers[i].setMap(null);
 }
 markers.length = 0; 
 sidebar.innerHTML = "";
 map.setCenter(new google.maps.LatLng(36.1611, -116.4775), 6);
}
</code></pre>

<p>the map will reset to the default latlng, zoom level stays the same, and the sidebar htmk us removed. however the icons stay on the map. not undestanding why this is ocurring. 
many thanks,
--matt</p>

<p>EDIT -- my apologies for not including the markers</p>

<pre><code>function createMarker(latlng, name, address, city, state, zipcode, telephone, images, url) { 
  var html = "&lt;div&gt;stuff here&lt;/div&gt;";
  var marker = new google.maps.Marker({
    icon: icon, 
    map: map, 
    position: latlng 
  });

  google.maps.event.addListener(marker, 'click', function() {
    infoWindow.setContent(html);
    infoWindow.open(map, marker);
  });
  return marker;
}
</code></pre>
