title: Google Maps Max Markers
body: <p>I'm not too great with javascript. Does anyone know how I can increase the number of markers displayed on Google Maps. I'm pulling about 300 locations from a MySQL database, but it's only plotting 50 or so.</p>
  
  <p>Here's the code I'm using:</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
  //&lt;![CDATA[
  
  var iconBlue = new GIcon(); 
  iconBlue.image = 'http://labs.google.com/ridefinder/images/mm_20_blue.png';
  iconBlue.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
  iconBlue.iconSize = new GSize(12, 20);
  iconBlue.shadowSize = new GSize(22, 20);
  iconBlue.iconAnchor = new GPoint(6, 20);
  iconBlue.infoWindowAnchor = new GPoint(5, 1);
  
  var iconRed = new GIcon(); 
  iconRed.image = 'http://labs.google.com/ridefinder/images/mm_20_red.png';
  iconRed.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
  iconRed.iconSize = new GSize(12, 20);
  iconRed.shadowSize = new GSize(22, 20);
  iconRed.iconAnchor = new GPoint(6, 20);
  iconRed.infoWindowAnchor = new GPoint(5, 1);
  
  var customIcons = [];
  customIcons["city"] = iconBlue;
  
  function load() {
    if (GBrowserIsCompatible()) {
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(47.614495, -122.341861), 1);
      map.setMapType(G_SATELLITE_MAP);
  
      GDownloadUrl("map-xml.php", function(data) {
        var xml = GXml.parse(data);
        var markers = xml.documentElement.getElementsByTagName("geolocation");
        for (var i = 0; i &lt; markers.length; i++) {
          var time = markers[i].getAttribute("time");
          var date = markers[i].getAttribute("date");
          var city = markers[i].getAttribute("city");
          var type = markers[i].getAttribute("city");
          var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                                  parseFloat(markers[i].getAttribute("lng")));
          var marker = createMarker(point, time, date, city, type);
          map.addOverlay(marker);
        }
      });
    }
  }
  
  function createMarker(point, time, date, city, type) {
    var marker = new GMarker(point, customIcons[type]);
    var html = "&lt;b&gt;Time:" + time + "&lt;br /&gt;Date:" + date + "&lt;br/&gt;City:" + city +"&lt;/b&gt;";
    GEvent.addListener(marker, 'click', function() {
      marker.openInfoWindowHtml(html);
    });
    return marker;
  }
  //]]&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks</p>