title: Change visibility of markers on a google map taking into account respective attributes
body: <p>I have a google map on my website that receives all the marker information through makethemap.php
  Its working all fine and the map is correctly generated. However, I don't know how to change the visibility of the marker taking into consideration the price variable. </p>
  
  <p>Lets say, when the user clicks on the given (below) radio-button I want all markers with a price variable lower than 1200 to disappear. </p>
  
  <pre><code> function load() {
    var map = new google.maps.Map(document.getElementById("map"), {
      center: new google.maps.LatLng(-34.600, -58.400),
      zoom: 13,
      mapTypeId: 'roadmap',
      scrollwheel: false,
    });
    var infoWindow = new google.maps.InfoWindow;
  
  
    downloadUrl("makethemap.php", function(data) {
      var xml = data.responseXML;
      var markers = xml.documentElement.getElementsByTagName("marker");
      for (var i = 0; i &lt; markers.length; i++) {
        var idofobject = markers[i].getAttribute("id");
        var price = markers[i].getAttribute("price")
        var point = new google.maps.LatLng(
            parseFloat(markers[i].getAttribute("lat")),
            parseFloat(markers[i].getAttribute("lng")));
  
        var html = 'each marker has an individual infotext'
        marker= new google.maps.Marker({
          map: map,
          position: point,
  
        });
        bindInfoWindow(marker, map, infoWindow, html);
      }
    });
  }
  
  function bindInfoWindow(marker, map, infoWindow, html) {
    google.maps.event.addListener(marker, 'click', function() {
      infoWindow.open(map, marker);
      infoWindow.setContent(html);
            });
  }
  
  
  
  
  
  function downloadUrl(url, callback) {
    var request = window.ActiveXObject ?
        new ActiveXObject('Microsoft.XMLHTTP') :
        new XMLHttpRequest;
  
    request.onreadystatechange = function() {
      if (request.readyState == 4) {
        request.onreadystatechange = doNothing;
        callback(request, request.status);
      }
    };
  
    request.open('GET', url, true);
    request.send(null);
  }
  
  function doNothing() {}
  
  
  &lt;input type="radio" name="1200" value="male"&gt;Places above $1200&lt;br&gt;
  </code></pre>
  
  <p>I was able to do it before I loaded the map over php. 
  Any help greatly appreciated. This is bothering me for quite some time now! </p>