title: Google Maps. Markers array passing to function
body: <p>I'm using Google Maps API v3.
  My code takes objects (name, lat, lng, and type) from MySql database and markers their on map.
  That works for me fine.
  But I want to make different markers depending on them type.
  So here is my markers options:</p>
  
  <pre><code>var iconBaznycios = new google.maps.MarkerImage('http://labs.google.com/ridefinder/images/mm_20_blue.png');
  
  var iconMuziejai = new google.maps.MarkerImage('http://labs.google.com/ridefinder/images/mm_20_red.png');
  
  var customIcons = [];
  customIcons["Baznycios"] = iconBaznycios;
  customIcons["Muziejai"] = iconMuziejai;
  </code></pre>
  
  <p>And here is my function i want to pass my markers array:</p>
  
  <pre><code>function addMarker(lat, lng, info, type) {
  
    var pt = new google.maps.LatLng(lat, lng);
    bounds.extend(pt);
    var marker = new google.maps.Marker({
               position: pt,
               icon: customIcons[type],
               map: map,
  
    });
  </code></pre>
  
  <p>and maybe there is something to do with this line in php script:</p>
  
  <pre><code>echo ("addMarker($lat, $lng,'&lt;b&gt;$name&lt;/b&gt;&lt;br/&gt; $type');\n");
  </code></pre>
  
  <p>any ideas how to make it work my way?</p>