2 * Contains L.MultiPolyline and L.MultiPolygon layers.
6 function createMulti(klass
) {
7 return L
.FeatureGroup
.extend({
8 initialize: function(latlngs
, options
) {
10 for (var i
= 0, len
= latlngs
.length
; i
< len
; i
++) {
11 this.addLayer(new klass(latlngs
[i
], options
));
15 setStyle: function(style
) {
16 for (var i
in this._layers
) {
17 if (this._layers
.hasOwnProperty(i
) && this._layers
[i
].setStyle
) {
18 this._layers
[i
].setStyle(style
);
25 L
.MultiPolyline
= createMulti(L
.Polyline
);
26 L
.MultiPolygon
= createMulti(L
.Polygon
);