title: Changing the Google Maps Marker HTML after a function is ran
body: <p>So I'm trying to figure out a way to change the HTML of Google Maps V3 markers after they have been pulled from the database but before they are pushed up to the array.  </p>
  
  <p>When getFishing() is called, I'd like to run convertRate(rate) so that if the rate variable is equal to two or more, it shows a picture which is within the HTML of the Markers themselves.  I've tried putting it in the bindInfoWindow4() and I've tried several places within the getFishing() function with no success.  Has anyone done this before?  Is it possible after the markers have been pushed up to the fishArray?</p>
  
  <pre><code>     function getFishing() {
          fishingUrl("XML_Fishing.php", function (data) {
              var xml = data.responseXML;
              var markers = xml.documentElement.getElementsByTagName("marker");
              for (var i = 0; i &lt; markers.length; i++) {
                  var id = markers[i].getAttribute("id");
                  var title = markers[i].getAttribute("title");
                  var rate = markers[i].getAttribute("rate");
                  var Fishhtml = "&lt;img id='1star' src='images/1star.png' style='visibility:hidden'&gt;";
                  var icon = FishingIcon;
                  var Fishmark = new google.maps.Marker({
                      map: map,
                      position: point,
                      icon: icon.icon
                  });
                  fishArray.push(Fishmark);
                  bindInfoWindow4(Fishmark, map, Fishinfo, Fishhtml);
  
              }
          });
      }
      function convertRate(rate) {
          if (rate &gt;= 2) {
              document.getElementById("1star").style.visibility = 'visible';
          }
      }
  
      function bindInfoWindow4(marker, map, infoWindow, html) {
          google.maps.event.addListener(marker, 'click', function () {
              infoWindow.setContent(html);
              infoWindow.open(map, marker);
          });
      }
  </code></pre>