Script and makefile adjustments for updating extlib
[larjonas-mediagoblin.git] / extlib / leaflet / src / layer / vector / MultiPoly.js
blob60d6de68f0c771414343ddba8ad47017422f75d6
1 /*
2 * Contains L.MultiPolyline and L.MultiPolygon layers.
3 */
5 (function() {
6 function createMulti(klass) {
7 return L.FeatureGroup.extend({
8 initialize: function(latlngs, options) {
9 this._layers = {};
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);
22 });
25 L.MultiPolyline = createMulti(L.Polyline);
26 L.MultiPolygon = createMulti(L.Polygon);
27 }());