2 !function(a,b){"function"==typeof define&&define.amd?define(["leaflet"],b):b("object"==typeof module&&module.exports?require("leaflet"):a.L)}(this,function(a){"use strict";var b=a.FeatureGroup.extend({initialize:function(a,b){var c=b.multiOptions.copyBaseOptions;this._layers={},this._options=b,(void 0===c||c)&&this._copyBaseOptions(),this.setLatLngs(a)},_copyBaseOptions:function(){var b,c,d=this._options.multiOptions,e=d.options,f=e.length;for(b=a.extend({},this._options),delete b.multiOptions,c=0;c<f;++c)e[c]=a.extend({},b,e[c])},setLatLngs:function(b){var c,d,e,f,g=b.length,h=this._options.multiOptions,i=h.optionIdxFn,j=h.fnContext||this;for(this._originalLatlngs=b,this.eachLayer(function(a){this.removeLayer(a)},this),c=1;c<g;++c)e=i.call(j,b[c],b[c-1],c,b),1===c&&(f=[b[0]],d=i.call(j,b[0],b[0],0,b)),f.push(b[c]),d===e&&c!==g-1||("function"==typeof h.options?this.addLayer(a.polyline(f,h.options(d))):this.addLayer(a.polyline(f,h.options[d])),d=e,f=[b[c]]);return this},getLatLngs:function(){return this._originalLatlngs},getLatLngsSegments:function(){var a=[];return this.eachLayer(function(b){a.push(b.getLatLngs())}),a}});a.MultiOptionsPolyline=b,a.multiOptionsPolyline=function(a,c){return new b(a,c)}});