title: Odd filtering behavior of Google Map markers
body: <p><strong>Updated Example:</strong></p>
  <blockquote>
  <p><a href="http://jsfiddle.net/7Cwbn/62/" rel="nofollow noreferrer">http://jsfiddle.net/7Cwbn/62/</a></p>
  </blockquote>
  <p><em>You can click on the markers</em></p>
  <p><em>Hold <strong>Ctrl</strong> to select multiple options</em></p>
  <h1>UPDATE:</h1>
  <p>I've fiddled with the script some more and replaced <code>jQuery.inArray()</code> with <code>array_diff()</code> function as a test statement inside the <code>if</code>s.</p>
  <p>Also I've change the <code>if</code> logic a bit. I tried the new code with filtering <strong>just</strong> the houses and it seems to work, <strong>but</strong> when I enable the same filtering code for condos too - filtering gets messed up a little.</p>
  <p><em>For example</em>: If I select everything from <strong>Features</strong> - nothing shows up on the map. But some markers should have showed up since I have at least two of them that have all of the three available features.</p>
  <pre><code>$(markers.houses).each(function(index, elem) {
          if ((array_diff(selectedFeatures, elem.features).length === 0) &amp;&amp; (array_diff(selectedNearby, elem.nearby).length === 0)) {
              if (!markers.houseMarkers[index].visible) {
                  markers.houseMarkers[index].setVisible(true);
              }
          }
      });
  $(markers.condos).each(function(index, elem) {
          if ((array_diff(selectedFeatures, elem.features).length === 0) &amp;&amp; (array_diff(selectedNearby, elem.nearby).length === 0)) {
              if (!markers.condoMarkers[index].visible) {
                  markers.condoMarkers[index].setVisible(true);
              }
          }
      });
  </code></pre>
  <blockquote>
  <p><strong>FIG 1.1</strong> - <em>Slice of filtering code for houses and condos</em></p>
  </blockquote>