28 cze 2010

Funkcja do obsługi listy ikon

var tab_i=[];

function   var iconM = newIcon(markerC);

(c) {

f(tab_i[c]==undefined) {
   var icon = new GIcon();
   icon.image = "<a href="http://maps.google.com/mapfiles/kml/pal2/icon%22+c+%22.png" class="mce_ws_kod">http://maps.google.com/mapfiles/kml/pal2/icon"+c+".png</a>";
   icon.shadow = "<a href="http://maps.google.com/mapfiles/kml/pal2/icon%22+c+%22s.png" class="mce_ws_kod">http://maps.google.com/mapfiles/kml/pal2/icon"+c+"s.png</a>;
   icon.iconSize = new GSize(32, 32);
   icon.shadowSize = new GSize(56, 32);
   icon.iconAnchor = new GPoint(16, 16);
   icon.infoWindowAnchor = new GPoint(16, 16);
   tab_i[c]=icon;
  } else {
   icon=tab_i[c];
  }
  return icon;
 }

var iconM = newIcon('1');
var iconM = newIcon('2');
var iconM = newIcon('1');