title: Google Markers setVisible true/false show/hide
body: <p>Ok, so I have a google Map store locator. Input a post code, it returns stores in a radius. Got all these pretty info windows, marker icons, and can even do directions...</p>
  
  <p>In a nutshell, I need to be able to HIDE (which I can do) all the markers before I calculate directions (because the directions api seems to automatically add its own markers which I have no idea how to override).</p>
  
  <p>At the moment I'm using the following to HIDE the markers. <strong>This works 100%.</strong> It sets the visible value of the marker to false in the DOM tab of firebug and the marker icons disappear.</p>
  
  <pre><code>  function clearMarkers() {
  
      for (var i = 0; i &lt; markers.length; i++) {
        markers[i].setVisible(false);
      }
    }
  </code></pre>
  
  <p>Now, my issue is I cannot SHOW OR unhide the markers. This is my current function. I can still click on my listing of stores and it pops up the markers infoWindow, BUT the marker just doesn't appear once its been hidden. <strong>Can anyone help me in unhiding the marker ICON in this restoreMarkers function?</strong> </p>
  
  <pre><code>  function restoreMarkers() {
      for (var i = 0; i &lt; markers.length; i++) {
        markers[i].setVisible(true);
      }
      markers.setMap(map);
    }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/benno_007/QQKHa/1/" rel="nofollow">Here's all my code on jsFiddle if you need it</a></p>