Filter Google Map Markers
<p>I have passed different information into my custom Google Map as below;</p>

<pre><code>marker = new google.maps.Marker({
    position: new google.maps.LatLng(locations[i][1], locations[i][2]),
    map: map,
    icon:image,
    title: locations[i][0],
    price: locations[i][3],
    occupancy: locations[i][4],
});
</code></pre>

<p>I am trying to filter the markers when a button is clicked;</p>

<pre><code>$(document).on('click', '#price-filter', function(){
    $.each(map.markers, function(i, marker) {
        if(marker.price &lt;= '80.00')
            marker.visible = false;
        else
            marker.visible = true;
    });
});
</code></pre>

<p>This is not running, I have tried the on click within the <code>function initMap() {}</code> and outside of it but it doesn't work. Any ideas?</p>

<p><em>EDIT</em> Please find the JSFiddle located <a href="https://jsfiddle.net/g19avj3e/" rel="nofollow">https://jsfiddle.net/g19avj3e/</a></p>