var iconA = new GIcon(); iconA.image = "/images/map/icons_center_1.png"; iconA.shadow = "/images/map/icons_center_2.png"; iconA.iconSize = new GSize(36, 36); iconA.shadowSize = new GSize(56, 32); iconA.iconAnchor = new GPoint(18, 36); iconA.infoWindowAnchor = new GPoint(16, 0); var customIcons = []; customIcons["A"] = iconA; function createMarker(point, name, text, type, url) { var marker = new GMarker(point, customIcons[type]); var html = "
" + name + "
" + text + "
"; GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html); }); return marker; }