size : new YMaps.Point(28,29),
offset: new YMaps.Point(-8,-27)
}
});
map.addOverlay(createObject("Placemark", new YMaps.GeoPoint(30.266432,59.905439), "constructor#pmlbmPlacemark", "комплекс \"Портал\""));
map.addOverlay(createObject("Placemark", new YMaps.GeoPoint(30.263471,59.903024), "constructor#pmgnmPlacemark", "парк Екатерингоф"));
function createObject (type, point, style, description) {
var allowObjects = ["Placemark", "Polyline", "Polygon"],
index = YMaps.jQuery.inArray( type, allowObjects),
constructor = allowObjects[(index == -1) ? 0 : index];
description = description || "";
var object = new YMaps[constructor](point, {style: style, hasBalloon : !!description});
object.description = description;
return object;
}
});