我在 api 1.0 中有这种样式
var s = new YMaps.Style();
s.iconStyle = new YMaps.IconStyle();
s.iconStyle.offset = new YMaps.Point(-1, -30);
s.iconStyle.href = "http:www.example.com/images/1.png";
s.iconStyle.size = new YMaps.Point(29, 28);
s.iconStyle.shadow = new YMaps.IconShadowStyle();
s.iconStyle.shadow.offset = new YMaps.Point(2, -12);
s.iconStyle.shadow.href = "http:www.example.com/images/2.png";
s.iconStyle.shadow.size = new YMaps.Point(29, 7);
在这里,我将此样式添加到地标
var placemark = new YMaps.Placemark(new YMaps.GeoPoint(lat, long),
{hasBalloon: false,
style: s
});
placemark.setHintContent(mystring);
placemark.enableHint();
map.addOverlay(placemark);
如何在 api 2.0 中创建这种样式?