Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@targomo/leaflet

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@targomo/leaflet - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json

@@ -1,1 +0,1 @@

{"name":"@targomo/leaflet","description":"Leaflet maps extensions for Targomo's time-based access mapping services.","author":"Targomo","version":"0.0.5","license":"MIT","repository":"github:targomo/targomo-js-extensions","homepage":"https://targomo.com/developers","bugs":{"url":"https://github.com/targomo/targomo-js-extensions/issues"},"keywords":["map","gis","api","rest","isochrone","reachability"],"main":"targomo-leaflet.js","module":"targomo-leaflet.js","browser":"targomo-leaflet.umd.min.js","typings":"./typings/index.d.ts","scripts":{"dev":"npm run clean && webpack --watch","build":"npm run clean && node build.js","lint":"tslint -p tsconfig.json","clean":"shx rm -rf dist","test":"npm run test:browser && npm run test:browser","test:browser":"jest --config=jest.config.json --env=jsdom","test:debug":"node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --config=jest.config.json","test:coverage":"npm run test:browser --coverage"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/jest":"^21.1.5","@types/node":"^6.0.60","fs-extra":"^7.0.0","jest":"^21.2.1","rollup":"^0.51.8","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-copy":"^0.2.3","rollup-plugin-node-resolve":"^3.0.0","rollup-plugin-resolve":"0.0.1-predev.1","rollup-plugin-typescript2":"^0.8.2","rollup-plugin-uglify":"^2.0.1","shx":"^0.2.2","ts-jest":"^21.1.4","ts-loader":"^3.1.1","tslint":"^5.8.0","typescript":"^2.5.0"},"dependencies":{"@targomo/core":"^0.2.3","@types/leaflet":"^1.2.8","leaflet":"^1.3.1"}}
{"name":"@targomo/leaflet","description":"Leaflet maps extensions for Targomo's time-based access mapping services.","author":"Targomo","version":"0.0.6","license":"MIT","repository":"github:targomo/targomo-js-extensions","homepage":"https://targomo.com/developers","bugs":{"url":"https://github.com/targomo/targomo-js-extensions/issues"},"keywords":["map","gis","api","rest","isochrone","reachability"],"main":"targomo-leaflet.js","module":"targomo-leaflet.js","browser":"targomo-leaflet.umd.min.js","typings":"./typings/index.d.ts","scripts":{"dev":"npm run clean && webpack --watch","build":"npm run clean && node build.js","lint":"tslint -p tsconfig.json","clean":"shx rm -rf dist","test":"npm run test:browser && npm run test:browser","test:browser":"jest --config=jest.config.json --env=jsdom","test:debug":"node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --config=jest.config.json","test:coverage":"npm run test:browser --coverage"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/jest":"^21.1.5","@types/node":"^6.0.60","fs-extra":"^7.0.0","jest":"^21.2.1","rollup":"^0.51.8","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-copy":"^0.2.3","rollup-plugin-node-resolve":"^3.0.0","rollup-plugin-resolve":"0.0.1-predev.1","rollup-plugin-typescript2":"^0.8.2","rollup-plugin-uglify":"^2.0.1","shx":"^0.2.2","ts-jest":"^21.1.4","ts-loader":"^3.1.1","tslint":"^5.8.0","typescript":"^2.5.0"},"dependencies":{"@targomo/core":"^0.2.3","@types/leaflet":"^1.2.8","leaflet":"^1.3.1"}}
/**
* @targomo/js-extensions "0.0.5" http://targomo.com
* @targomo/js-extensions "0.0.6" http://targomo.com
* Google and Leaflet JavaScript (& TypeScript) extensions for Targomo's time-based access mapping services.

@@ -193,2 +193,14 @@ * (c) 2019 Targomo

};
ProjectedBounds.prototype.width = function () {
return this.northEast.x - this.southWest.x;
};
ProjectedBounds.prototype.height = function () {
return this.southWest.y - this.northEast.y;
};
ProjectedBounds.prototype.left = function () {
return this.southWest.x;
};
ProjectedBounds.prototype.top = function () {
return this.northEast.y;
};
return ProjectedBounds;

@@ -453,10 +465,12 @@ }());

});
var width = Math.abs(xMaxLeaflet - xMinLeaflet);
var height = Math.abs(yMaxLeaflet - yMinLeaflet);
var width = Math.ceil(Math.abs(xMaxLeaflet - xMinLeaflet));
var height = Math.ceil(Math.abs(yMaxLeaflet - yMinLeaflet));
var content;
if (options.inverse) {
return renderInverseElement(children, width, height);
content = renderInverseElement(children, width, height);
}
else {
return renderElement(children, width, height);
content = renderElement(children, width, height);
}
return { content: content, width: width, height: height };
}

@@ -466,4 +480,4 @@

function MinMaxSchedule(min, max) {
if (min === void 0) { min = 50; }
if (max === void 0) { max = 500; }
if (min === void 0) { min = 200; }
if (max === void 0) { max = 700; }
this.min = min;

@@ -487,2 +501,14 @@ this.max = max;

};
MinMaxSchedule.prototype.scheduleMaximum = function (callback) {
var _this = this;
var action = function () {
clearTimeout(_this.longTimeout);
_this.longTimeout = null;
callback();
};
if (!this.longTimeout) {
this.longTimeout = setTimeout(action, this.max);
}
clearTimeout(this.shortTimeout);
};
return MinMaxSchedule;

@@ -502,3 +528,3 @@ }());

this.options = options;
this.renderTimeout = new MinMaxSchedule();
this.renderTimeout = new MinMaxSchedule(300, 3000);
}

@@ -514,8 +540,26 @@ PolygonOverlayElement.prototype.getElement = function () {

if (immediately === void 0) { immediately = false; }
this.resize();
if (immediately) {
this.resize();
this.render();
this.divElement.style.transform = null;
}
else {
this.renderTimeout.schedule(function () { return _this.render(); });
if (this.divElement && this.bounds) {
var bounds = new ProjectedBounds(this.plugin.getElementPixels(this.bounds));
var div = this.divElement;
var dx = Math.round(bounds.left() - this.currentPixelBounds.left());
var dy = Math.round(bounds.top() - this.currentPixelBounds.top());
var scaleX = bounds.width() / this.currentPixelBounds.width();
var scaleY = bounds.height() / this.currentPixelBounds.height();
if (scaleY !== 1 || scaleX !== 1) {
div.style.transform = "translate3d(" + dx + "px, " + dy + "px, 0) scale3d(" + scaleX + ", " + scaleY + ", 1)";
}
else if (dx !== 0 || dy !== 0) {
div.style.transform = "translate3d(" + dx + "px, " + dy + "px, 0)";
}
}
this.renderTimeout.scheduleMaximum(function () {
_this.render();
_this.divElement.style.transform = null;
});
}

@@ -527,10 +571,9 @@ };

}
var bounds = this.plugin.getElementPixels(this.bounds);
var sw = bounds.southWest;
var ne = bounds.northEast;
var bounds = this.currentPixelBounds = new ProjectedBounds(this.plugin.getElementPixels(this.bounds));
var div = this.divElement;
div.style.left = sw.x + 'px';
div.style.top = ne.y + 'px';
div.style.width = (ne.x - sw.x) + 'px';
div.style.height = (sw.y - ne.y) + 'px';
div.style.left = bounds.left() + 'px';
div.style.top = bounds.top() + 'px';
div.style.width = bounds.width() + 'px';
div.style.height = bounds.height() + 'px';
div.style.transform = null;
};

@@ -546,2 +589,6 @@ /**

div.style.opacity = ('' + this.options.opacity) || '0.5';
div.style['backface-visibility'] = 'hidden';
div.style['perspective'] = 1000;
div.style['transform-origin'] = '0 0 0';
div.style['will-change'] = 'transform';
this.divElement = div;

@@ -608,4 +655,4 @@ return this.divElement;

};
PolygonOverlayElement.prototype.render = function () {
// const inverse = this.options.inverse
PolygonOverlayElement.prototype.render = function (resize) {
if (resize === void 0) { resize = true; }
if (!this.divElement) {

@@ -621,10 +668,12 @@ return;

zoomFactor = Math.min(10000000, zoomFactor);
var growFactor = Math.min(5, Math.max(2, (zoom - 12) / 2));
var growFactor = 0.1;
var _a = this.boundsCalculation(growFactor), bounds = _a.bounds, newBounds = _a.newBounds;
var result = render(bounds, newBounds, zoomFactor, this.model, new PolygonRenderOptions(this.options));
this.divElement.innerHTML = result;
var content = render(bounds, newBounds, zoomFactor, this.model, new PolygonRenderOptions(this.options)).content;
this.divElement.innerHTML = content;
var southWest = core.geometry.webMercatorToLatLng(newBounds.southWest, undefined);
var northEast = core.geometry.webMercatorToLatLng(newBounds.northEast, undefined);
this.bounds = { southWest: southWest, northEast: northEast };
this.resize();
if (resize) {
this.resize();
}
};

@@ -631,0 +680,0 @@ return PolygonOverlayElement;

/**
* @targomo/js-extensions "0.0.5" http://targomo.com
* @targomo/js-extensions "0.0.6" http://targomo.com
* Google and Leaflet JavaScript (& TypeScript) extensions for Targomo's time-based access mapping services.
* (c) 2019 Targomo
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("leaflet"),require("@targomo/core"),require("leaflet.vectorgrid/dist/Leaflet.VectorGrid.bundled.js")):"function"==typeof define&&define.amd?define(["exports","leaflet","@targomo/core","leaflet.vectorgrid/dist/Leaflet.VectorGrid.bundled.js"],e):e((t.tgm=t.tgm||{},t.tgm.leaflet={}),t.L,t.tgm)}(this,function(t,p,d){"use strict";var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var E=function(){return(E=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)};function n(i,r,a,h){return new(a||(a=Promise))(function(t,e){function n(t){try{s(h.next(t))}catch(t){e(t)}}function o(t){try{s(h.throw(t))}catch(t){e(t)}}function s(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(n,o)}s((h=h.apply(i,r||[])).next())})}function s(n,o){var s,i,r,t,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,i&&(r=2&e[0]?i.return:e[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,e[1])).done)return r;switch(i=0,r&&(e=[2&e[0],r.value]),e[0]){case 0:case 1:r=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(r=0<(r=a.trys).length&&r[r.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!r||e[1]>r[0]&&e[1]<r[3])){a.label=e[1];break}if(6===e[0]&&a.label<r[1]){a.label=r[1],r=e;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(e);break}r[2]&&a.ops.pop(),a.trys.pop();continue}e=o.call(n,a)}catch(t){e=[6,t],i=0}finally{s=r=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var r,a,h=(r=.5/Math.PI,a=-.5/Math.PI,function(t,e,n){return void 0===n&&(n=1),{x:t=n*(r*t+.5),y:e=n*(a*e+.5)}});function b(t,e,n){return void 0===n&&(n=1),h(t/6378137,e/6378137,n)}var W=function(){function e(t){this.southWest=new T(1/0,1/0),this.northEast=new T(-1/0,-1/0),t&&(this.southWest=new T(t.southWest.x,t.southWest.y),this.northEast=new T(t.northEast.x,t.northEast.y))}return e.prototype.expandPoint=function(t,e){this.southWest.x=Math.min(this.southWest.x,t),this.northEast.x=Math.max(this.northEast.x,t),this.southWest.y=Math.min(this.southWest.y,e),this.northEast.y=Math.max(this.northEast.y,e)},e.prototype.expand=function(t){this.expandPoint(t.northEast.x,t.northEast.y),this.expandPoint(t.southWest.x,t.southWest.y)},e.prototype.modifyIntersect=function(t){return this.southWest.x=Math.max(this.southWest.x,t.southWest.x),this.northEast.x=Math.min(this.northEast.x,t.northEast.x),this.southWest.y=Math.max(this.southWest.y,t.southWest.y),this.northEast.y=Math.min(this.northEast.y,t.northEast.y),this},e.prototype.contains=function(t){return this.northEast.x>=t.northEast.x&&this.northEast.y>=t.northEast.y&&this.southWest.x<=t.southWest.x&&this.southWest.y<=t.southWest.y},e.prototype.intersects=function(t){return!(this.northEast.x<t.southWest.x||this.northEast.y<t.southWest.y||this.southWest.x>t.northEast.x||this.southWest.y>t.northEast.y)},e.prototype.growOutwardsFactor=function(t){void 0===t&&(t=1);var e=(this.northEast.x-this.southWest.x)*t,n=(this.northEast.y-this.southWest.y)*t;return this.northEast.x+=e,this.northEast.y+=n,this.southWest.x-=e,this.southWest.y-=n,this},e.prototype.growOutwardsAmount=function(t){return this.northEast.x+=t,this.northEast.y+=t,this.southWest.x-=t,this.southWest.y-=t,this},e.prototype.toLineString=function(){return[new T(this.southWest.x,this.northEast.y),new T(this.northEast.x,this.northEast.y),new T(this.northEast.x,this.southWest.y),new T(this.southWest.x,this.southWest.y)]},e.prototype.reproject=function(t){return new e({northEast:t(this.northEast.x,this.northEast.y),southWest:t(this.southWest.x,this.southWest.y)})},e}(),T=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.isCollinear=function(t,e,n){if(t.x==e.x&&t.y==e.y)return!1;if(t.x==this.x&&this.x==e.x)return!0;if(t.y==this.y&&this.y==e.y)return!0;var o=t.x*(this.y-e.y)+this.x*(e.y-t.y)+e.x*(t.y-this.y);return o<n&&-n<o&&t.x!=e.x&&t.y!=e.y},t.prototype.euclideanDistance=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},t}(),u=function(t){var n=this;this.bounds3857=new W,this.points=t.map(function(t){n.bounds3857.expandPoint(t[0],t[1]);var e=b(t[0],t[1],1);return new T(e.x,e.y)})},l=function(){function t(t){var n=this;this.bounds3857=new W,this.travelTime=t.travelTime,this.area=t.area,this.lineStrings=[new u(t.outerBoundary)],this.bounds3857.expand(this.lineStrings[0].bounds3857),t.innerBoundary&&t.innerBoundary.forEach(function(t){var e=new u(t);n.lineStrings.push(e),n.bounds3857.expand(e.bounds3857)})}return t.prototype.getOuterBoundary=function(){return this.lineStrings[0]},t.prototype.getInnerBoundary=function(){return this.lineStrings.slice(1)},t}(),e=function(){function t(t){var n=this;this.polygons={},this.bounds3857=new W,t.forEach(function(t){t.polygons.forEach(function(t){var e=new l(t);n.polygons[e.travelTime]=n.polygons[e.travelTime]||[],n.polygons[e.travelTime].push(e),n.bounds3857.expand(e.bounds3857)})})}return t.prototype.forEach=function(n){var o=this;Object.keys(this.polygons).map(function(t){return+t}).sort(function(t,e){return e-t}).forEach(function(t,e){return n(+t,o.polygons[t],e)})},t}();var c={};["#006837","#39B54A","#8CC63F","#F7931E","#F15A24","#C1272D"].forEach(function(t,e){c[300*(e+1)]=t});var y=function(){this.inverse=!1,this.colors=c,this.opacity=.5,this.strokeWidth=5},f=function(n){function t(t){var e=n.call(this)||this;return Object.assign(e,t),e}return i(t,n),t.prototype.getColorOpacity=function(t,e){var n,o=null;return o=this.colors instanceof Array?this.colors[e]:this.colors[t],(n=o)&&null!=n.color?{color:o.color||"#ccc",opacity:o.opacity||1}:{color:o||"#ccc",opacity:1}},t}(y),L=0;function m(a,t,s,e,h){var n,o=b(t.southWest.x,t.southWest.y,s),i=b(t.northEast.x,t.northEast.y,s);i.y<o.y&&(n=[o.y,i.y],i.y=n[0],o.y=n[1]);var r=Math.floor(o.x),u=Math.floor(o.y),l=Math.ceil(i.x),c=Math.ceil(i.y),y=new W(a).reproject(b).toLineString();function p(o,t){return(t=function(t,e){var i,r,a,h,n=function(t){return(r.x-i.x)*(t.y-i.y)>(r.y-i.y)*(t.x-i.x)},o=function(){var t=new T(i.x-r.x,i.y-r.y),e=new T(a.x-h.x,a.y-h.y),n=i.x*r.y-i.y*r.x,o=a.x*h.y-a.y*h.x,s=1/(t.x*e.y-t.y*e.x);return new T((n*e.x-o*t.x)*s,(n*e.y-o*t.y)*s)},s=t;for(var u in i=e[e.length-1],e){r=e[u];var l=s;for(var c in s=[],a=l[l.length-1],l)n(h=l[c])?(n(a)||s.push(o()),s.push(h)):n(a)&&s.push(o()),a=h;i=r}return s}(t,y)).forEach(function(t,e){var n=(0<e?"L":"M")+" "+(Math.round(t.x*s)-r)+" "+(Math.round(t.y*s)-u);o.push(n)}),0<o.length&&o.push("z"),o}var d=[];e.forEach(function(t,e,n){var o,s,i=e.map(function(t){return(e=t,n=[],a.intersects(e.bounds3857)&&(p(n,e.getOuterBoundary().points),e.getInnerBoundary().forEach(function(t){a.intersects(t.bounds3857)&&p(n,t.points)})),n).join(" ");var e,n}).join(" ");if(0!=i.length){var r=h.getColorOpacity(t,n);d.push((o=i,"\n <g style='opacity: "+(s=E({},r,{strokeWidth:h.strokeWidth,color:h.inverse?"black":r.color})).opacity+"'>\n <path style='stroke: "+s.color+";\n fill: "+s.color+";\n stroke-opacity: "+s.opacity+";\n stroke-width: "+s.strokeWidth+";\n fill-opacity: "+s.opacity+"'\n\n d='"+o+"'/>\n </g>\n "))}});var f,m,g,v,x=Math.abs(l-r),w=Math.abs(c-u);return h.inverse?(g="tgm:inverse:"+L++,'\n <svg height="100%" width="100%" viewbox="0 0 '+(f=x)+" "+(m=w)+"\"\n style='opacity: 1; stroke-linejoin:round; stroke-linecap:round; fill-rule: evenodd'\n xmlns='http://www.w3.org/2000/svg'>\n <path style='mask: url(#mask_"+g+")' d='"+(v="M 0 0 L "+f+" 0 L "+f+" "+m+" L 0 "+m+" z")+"'/>\n \n <defs>\n <mask id='mask_"+g+"'>\n <path style='fill-opacity:1; stroke: white; fill:white;' d='"+v+"'/>\"\n "+d.join("\n")+"\n </mask>\n </defs>\n \n </svg>"):'\n <svg height="100%" width="100%" viewbox="0 0 '+x+" "+w+"\"\n style='opacity: 1; stroke-linejoin:round; stroke-linecap:round; fill-rule: evenodd'\n xmlns='http://www.w3.org/2000/svg'>\n "+d.join("\n")+"\n </svg>"}var g=function(){function t(t,e){void 0===t&&(t=50),void 0===e&&(e=500),this.min=t,this.max=e}return t.prototype.schedule=function(t){var e=this,n=function(){clearTimeout(e.longTimeout),clearTimeout(e.shortTimeout),e.longTimeout=null,e.shortTimeout=null,t()};this.longTimeout||(this.longTimeout=setTimeout(n,this.max)),clearTimeout(this.shortTimeout),this.shortTimeout=setTimeout(n,this.min)},t}(),v=function(){function t(t,e){this.plugin=t,this.options=e,this.renderTimeout=new g}return t.prototype.getElement=function(){return this.divElement},t.prototype.draw=function(t){var e=this;void 0===t&&(t=!1),this.resize(),t?this.render():this.renderTimeout.schedule(function(){return e.render()})},t.prototype.resize=function(){if(this.divElement&&this.bounds){var t=this.plugin.getElementPixels(this.bounds),e=t.southWest,n=t.northEast,o=this.divElement;o.style.left=e.x+"px",o.style.top=n.y+"px",o.style.width=n.x-e.x+"px",o.style.height=e.y-n.y+"px"}},t.prototype.initElement=function(){var t=document.createElement("div");return t.style.borderStyle="none",t.style.borderWidth="0px",t.style.position="absolute",t.style.opacity=""+this.options.opacity||"0.5",this.divElement=t,this.divElement},t.prototype.onRemove=function(){this.divElement.parentNode.removeChild(this.divElement),this.divElement=null},t.prototype.setData=function(t){this.model=t?new e(t):null,this.render()},t.prototype.setInverse=function(t){this.options.inverse=t,this.render()},t.prototype.setColors=function(t){this.options.colors=t,this.render()},t.prototype.setOpacity=function(t){this.options.opacity=t,this.divElement&&(this.divElement.style.opacity=""+this.options.opacity||"0.5")},t.prototype.setStrokeWidth=function(t){this.options.strokeWidth=t,this.render()},t.prototype.boundsCalculation=function(t){var e=this.model,n=this.options.inverse,o=new W(this.plugin.getViewPort()),s=new W(o),i=new W(s).growOutwardsFactor(t).modifyIntersect(e.bounds3857);n&&(i.expand(o),i.growOutwardsFactor(t)),s.growOutwardsFactor(t);var r=d.geometry.webMercatorToLatLng(o.southWest,void 0),a=d.geometry.webMercatorToLatLng(o.northEast,void 0),h=this.plugin.getElementPixels({southWest:r,northEast:a}),u=Math.abs((o.northEast.x-o.southWest.x)/h.northEast.x-h.southWest.x);return i.growOutwardsAmount(this.options&&u*this.options.strokeWidth||0),{bounds:s,newBounds:i}},t.prototype.render=function(){if(this.divElement)if(this.model){var t=this.plugin.getZoom(),e=256*Math.pow(2,t);e=Math.min(1e7,e);var n=Math.min(5,Math.max(2,(t-12)/2)),o=this.boundsCalculation(n),s=o.bounds,i=o.newBounds,r=m(s,i,e,this.model,new f(this.options));this.divElement.innerHTML=r;var a=d.geometry.webMercatorToLatLng(i.southWest,void 0),h=d.geometry.webMercatorToLatLng(i.northEast,void 0);this.bounds={southWest:a,northEast:h},this.resize()}else this.divElement.innerHTML=""},t}(),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(y),w=function(n){function t(t){var e=n.call(this)||this;return e.readyPromise=new Promise(function(t){return e.readyResolve=t}),e.options=Object.assign(new x,t||{}),e}return i(t,n),t.prototype.setData=function(t){var e=this;this.readyPromise.then(function(){e.element&&e.element.setData(t)})},t.prototype.draw=function(){this.element&&(p.DomUtil.setTransform(this.element.getElement(),new p.Point(0,0),null),this.element.draw(!0))},t.prototype.onAdd=function(l){var c=this;this.element=new v({getZoom:function(){return l.getZoom()},getViewPort:function(){var t=l.getBounds();return new W({northEast:d.geometry.latLngToWebMercator({lng:t.getNorthEast().lng,lat:t.getNorthEast().lat}),southWest:d.geometry.latLngToWebMercator({lng:t.getSouthWest().lng,lat:t.getSouthWest().lat})})},getElementPixels:function(t){return{northEast:l.latLngToLayerPoint(t.northEast),southWest:l.latLngToLayerPoint(t.southWest)}}},this.options);var y=this.element.initElement();return y.style.transformOrigin="center",p.DomUtil.addClass(y,"leaflet-zoom-animated"),l.getPanes().overlayPane.appendChild(y),l.on("moveend",this.draw,this),l.on("resize",this.draw,this),l.on("zoomend",this.draw,this),this._map.options.zoomAnimation&&p.Browser.any3d&&l.on("zoomanim",function(t){if(c.element.bounds){var e=l.getZoomScale(t.zoom,l.getZoom()),n=l._latLngToNewLayerPoint(c.element.bounds.southWest,t.zoom,t.center).round(),o=l._latLngToNewLayerPoint(c.element.bounds.northEast,t.zoom,t.center).round(),s=l._latLngToNewLayerPoint(c.element.bounds.southWest,l.getZoom(),l.getCenter()).round(),i=l._latLngToNewLayerPoint(c.element.bounds.northEast,l.getZoom(),l.getCenter()).round(),r=(n.x+o.x)/2,a=(n.y+o.y)/2,h=(s.x+i.x)/2,u=(s.y+i.y)/2;p.DomUtil.setTransform(y,new p.Point(r-h,a-u),e)}}),this.readyResolve(),this.draw(),this},t.prototype.onRemove=function(){return this.element&&(this.element.onRemove(),this.element=null),this},t.prototype.setInverse=function(t){this.options.inverse=t,this.draw()},t.prototype.setColors=function(t){this.options.colors=t,this.draw()},t.prototype.setOpacity=function(t){(this.options.opacity=t,this.element)&&(this.element.getElement().style.opacity=null!=this.options.opacity?""+this.options.opacity:"0.5")},t.prototype.setStrokeWidth=function(t){this.options.strokeWidth=t,this.draw()},t}(p.Layer),M=function(s){function o(t,e,n){if(!e&&!t.basemaps.basemapsLookup[e])throw new Error("valid style name required to access Targomo basemap");var o="https://maps.targomo.com/styles/"+t.basemaps.basemapsLookup[e]+"/rendered/{z}/{x}/{y}.png?key="+t.serviceKey;return s.call(this,o,n)||this}return i(o,s),o.getTileLayerList=function(e){var n={};return e.basemaps.basemapNames.forEach(function(t){n[t]=new o(e,t,{})}),n},o}(p.TileLayer),k=function(){function t(t,e,n,o){this.tgmClient=t,this.update(n,o,e)}return t.prototype.addTo=function(e){return n(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return this.layer?[3,2]:[4,this.createLayer()];case 1:t.sent(),t.label=2;case 2:return this.map=e,this.layer.addTo(e),[2]}})})},t.prototype.update=function(t,e,n){return t&&(this.multigraphOptions=t),e&&(this.vectorTileoptions=e),n&&(this.sources=n),this.createLayer()},t.prototype.createLayer=function(){return n(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return this.map&&this.layer&&this.map.removeLayer(this.layer),[4,this.tgmClient.multigraph.getTiledMultigraphUrl(this.sources,this.multigraphOptions,"mvt")];case 1:return e=t.sent(),this.layer=p.vectorGrid.protobuf(e,this.vectorTileoptions),this.map&&this.layer&&this.layer.addTo(this.map),[2]}})})},t}();t.LeafletPolygonOverlayOptions=x,t.TgmLeafletPolygonOverlay=w,t.TgmLeafletTileLayer=M,t.TgmLeafletMultigraphTileLayer=k,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("leaflet"),require("@targomo/core"),require("leaflet.vectorgrid/dist/Leaflet.VectorGrid.bundled.js")):"function"==typeof define&&define.amd?define(["exports","leaflet","@targomo/core","leaflet.vectorgrid/dist/Leaflet.VectorGrid.bundled.js"],e):e((t.tgm=t.tgm||{},t.tgm.leaflet={}),t.L,t.tgm)}(this,function(t,y,d){"use strict";var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var E=function(){return(E=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)};function n(i,r,h,a){return new(h||(h=Promise))(function(t,e){function n(t){try{s(a.next(t))}catch(t){e(t)}}function o(t){try{s(a.throw(t))}catch(t){e(t)}}function s(e){e.done?t(e.value):new h(function(t){t(e.value)}).then(n,o)}s((a=a.apply(i,r||[])).next())})}function s(n,o){var s,i,r,t,h={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(s)throw new TypeError("Generator is already executing.");for(;h;)try{if(s=1,i&&(r=2&e[0]?i.return:e[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,e[1])).done)return r;switch(i=0,r&&(e=[2&e[0],r.value]),e[0]){case 0:case 1:r=e;break;case 4:return h.label++,{value:e[1],done:!1};case 5:h.label++,i=e[1],e=[0];continue;case 7:e=h.ops.pop(),h.trys.pop();continue;default:if(!(r=0<(r=h.trys).length&&r[r.length-1])&&(6===e[0]||2===e[0])){h=0;continue}if(3===e[0]&&(!r||e[1]>r[0]&&e[1]<r[3])){h.label=e[1];break}if(6===e[0]&&h.label<r[1]){h.label=r[1],r=e;break}if(r&&h.label<r[2]){h.label=r[2],h.ops.push(e);break}r[2]&&h.ops.pop(),h.trys.pop();continue}e=o.call(n,h)}catch(t){e=[6,t],i=0}finally{s=r=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var r,h,a=(r=.5/Math.PI,h=-.5/Math.PI,function(t,e,n){return void 0===n&&(n=1),{x:t=n*(r*t+.5),y:e=n*(h*e+.5)}});function b(t,e,n){return void 0===n&&(n=1),a(t/6378137,e/6378137,n)}var W=function(){function e(t){this.southWest=new T(1/0,1/0),this.northEast=new T(-1/0,-1/0),t&&(this.southWest=new T(t.southWest.x,t.southWest.y),this.northEast=new T(t.northEast.x,t.northEast.y))}return e.prototype.expandPoint=function(t,e){this.southWest.x=Math.min(this.southWest.x,t),this.northEast.x=Math.max(this.northEast.x,t),this.southWest.y=Math.min(this.southWest.y,e),this.northEast.y=Math.max(this.northEast.y,e)},e.prototype.expand=function(t){this.expandPoint(t.northEast.x,t.northEast.y),this.expandPoint(t.southWest.x,t.southWest.y)},e.prototype.modifyIntersect=function(t){return this.southWest.x=Math.max(this.southWest.x,t.southWest.x),this.northEast.x=Math.min(this.northEast.x,t.northEast.x),this.southWest.y=Math.max(this.southWest.y,t.southWest.y),this.northEast.y=Math.min(this.northEast.y,t.northEast.y),this},e.prototype.contains=function(t){return this.northEast.x>=t.northEast.x&&this.northEast.y>=t.northEast.y&&this.southWest.x<=t.southWest.x&&this.southWest.y<=t.southWest.y},e.prototype.intersects=function(t){return!(this.northEast.x<t.southWest.x||this.northEast.y<t.southWest.y||this.southWest.x>t.northEast.x||this.southWest.y>t.northEast.y)},e.prototype.growOutwardsFactor=function(t){void 0===t&&(t=1);var e=(this.northEast.x-this.southWest.x)*t,n=(this.northEast.y-this.southWest.y)*t;return this.northEast.x+=e,this.northEast.y+=n,this.southWest.x-=e,this.southWest.y-=n,this},e.prototype.growOutwardsAmount=function(t){return this.northEast.x+=t,this.northEast.y+=t,this.southWest.x-=t,this.southWest.y-=t,this},e.prototype.toLineString=function(){return[new T(this.southWest.x,this.northEast.y),new T(this.northEast.x,this.northEast.y),new T(this.northEast.x,this.southWest.y),new T(this.southWest.x,this.southWest.y)]},e.prototype.reproject=function(t){return new e({northEast:t(this.northEast.x,this.northEast.y),southWest:t(this.southWest.x,this.southWest.y)})},e.prototype.width=function(){return this.northEast.x-this.southWest.x},e.prototype.height=function(){return this.southWest.y-this.northEast.y},e.prototype.left=function(){return this.southWest.x},e.prototype.top=function(){return this.northEast.y},e}(),T=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.isCollinear=function(t,e,n){if(t.x==e.x&&t.y==e.y)return!1;if(t.x==this.x&&this.x==e.x)return!0;if(t.y==this.y&&this.y==e.y)return!0;var o=t.x*(this.y-e.y)+this.x*(e.y-t.y)+e.x*(t.y-this.y);return o<n&&-n<o&&t.x!=e.x&&t.y!=e.y},t.prototype.euclideanDistance=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},t}(),u=function(t){var n=this;this.bounds3857=new W,this.points=t.map(function(t){n.bounds3857.expandPoint(t[0],t[1]);var e=b(t[0],t[1],1);return new T(e.x,e.y)})},l=function(){function t(t){var n=this;this.bounds3857=new W,this.travelTime=t.travelTime,this.area=t.area,this.lineStrings=[new u(t.outerBoundary)],this.bounds3857.expand(this.lineStrings[0].bounds3857),t.innerBoundary&&t.innerBoundary.forEach(function(t){var e=new u(t);n.lineStrings.push(e),n.bounds3857.expand(e.bounds3857)})}return t.prototype.getOuterBoundary=function(){return this.lineStrings[0]},t.prototype.getInnerBoundary=function(){return this.lineStrings.slice(1)},t}(),e=function(){function t(t){var n=this;this.polygons={},this.bounds3857=new W,t.forEach(function(t){t.polygons.forEach(function(t){var e=new l(t);n.polygons[e.travelTime]=n.polygons[e.travelTime]||[],n.polygons[e.travelTime].push(e),n.bounds3857.expand(e.bounds3857)})})}return t.prototype.forEach=function(n){var o=this;Object.keys(this.polygons).map(function(t){return+t}).sort(function(t,e){return e-t}).forEach(function(t,e){return n(+t,o.polygons[t],e)})},t}();var c={};["#006837","#39B54A","#8CC63F","#F7931E","#F15A24","#C1272D"].forEach(function(t,e){c[300*(e+1)]=t});var p=function(){this.inverse=!1,this.colors=c,this.opacity=.5,this.strokeWidth=5},f=function(n){function t(t){var e=n.call(this)||this;return Object.assign(e,t),e}return i(t,n),t.prototype.getColorOpacity=function(t,e){var n,o=null;return o=this.colors instanceof Array?this.colors[e]:this.colors[t],(n=o)&&null!=n.color?{color:o.color||"#ccc",opacity:o.opacity||1}:{color:o||"#ccc",opacity:1}},t}(p),L=0;function m(h,t,s,e,a){var n,o=b(t.southWest.x,t.southWest.y,s),i=b(t.northEast.x,t.northEast.y,s);i.y<o.y&&(n=[o.y,i.y],i.y=n[0],o.y=n[1]);var r=Math.floor(o.x),u=Math.floor(o.y),l=Math.ceil(i.x),c=Math.ceil(i.y),p=new W(h).reproject(b).toLineString();function y(o,t){return(t=function(t,e){var i,r,h,a,n=function(t){return(r.x-i.x)*(t.y-i.y)>(r.y-i.y)*(t.x-i.x)},o=function(){var t=new T(i.x-r.x,i.y-r.y),e=new T(h.x-a.x,h.y-a.y),n=i.x*r.y-i.y*r.x,o=h.x*a.y-h.y*a.x,s=1/(t.x*e.y-t.y*e.x);return new T((n*e.x-o*t.x)*s,(n*e.y-o*t.y)*s)},s=t;for(var u in i=e[e.length-1],e){r=e[u];var l=s;for(var c in s=[],h=l[l.length-1],l)n(a=l[c])?(n(h)||s.push(o()),s.push(a)):n(h)&&s.push(o()),h=a;i=r}return s}(t,p)).forEach(function(t,e){var n=(0<e?"L":"M")+" "+(Math.round(t.x*s)-r)+" "+(Math.round(t.y*s)-u);o.push(n)}),0<o.length&&o.push("z"),o}var d=[];e.forEach(function(t,e,n){var o,s,i=e.map(function(t){return(e=t,n=[],h.intersects(e.bounds3857)&&(y(n,e.getOuterBoundary().points),e.getInnerBoundary().forEach(function(t){h.intersects(t.bounds3857)&&y(n,t.points)})),n).join(" ");var e,n}).join(" ");if(0!=i.length){var r=a.getColorOpacity(t,n);d.push((o=i,"\n <g style='opacity: "+(s=E({},r,{strokeWidth:a.strokeWidth,color:a.inverse?"black":r.color})).opacity+"'>\n <path style='stroke: "+s.color+";\n fill: "+s.color+";\n stroke-opacity: "+s.opacity+";\n stroke-width: "+s.strokeWidth+";\n fill-opacity: "+s.opacity+"'\n\n d='"+o+"'/>\n </g>\n "))}});var f,m,g,v,x=Math.ceil(Math.abs(l-r)),w=Math.ceil(Math.abs(c-u));return{content:a.inverse?(g="tgm:inverse:"+L++,'\n <svg height="100%" width="100%" viewbox="0 0 '+(f=x)+" "+(m=w)+"\"\n style='opacity: 1; stroke-linejoin:round; stroke-linecap:round; fill-rule: evenodd'\n xmlns='http://www.w3.org/2000/svg'>\n <path style='mask: url(#mask_"+g+")' d='"+(v="M 0 0 L "+f+" 0 L "+f+" "+m+" L 0 "+m+" z")+"'/>\n \n <defs>\n <mask id='mask_"+g+"'>\n <path style='fill-opacity:1; stroke: white; fill:white;' d='"+v+"'/>\"\n "+d.join("\n")+"\n </mask>\n </defs>\n \n </svg>"):'\n <svg height="100%" width="100%" viewbox="0 0 '+x+" "+w+"\"\n style='opacity: 1; stroke-linejoin:round; stroke-linecap:round; fill-rule: evenodd'\n xmlns='http://www.w3.org/2000/svg'>\n "+d.join("\n")+"\n </svg>",width:x,height:w}}var g=function(){function t(t,e){void 0===t&&(t=200),void 0===e&&(e=700),this.min=t,this.max=e}return t.prototype.schedule=function(t){var e=this,n=function(){clearTimeout(e.longTimeout),clearTimeout(e.shortTimeout),e.longTimeout=null,e.shortTimeout=null,t()};this.longTimeout||(this.longTimeout=setTimeout(n,this.max)),clearTimeout(this.shortTimeout),this.shortTimeout=setTimeout(n,this.min)},t.prototype.scheduleMaximum=function(t){var e=this;this.longTimeout||(this.longTimeout=setTimeout(function(){clearTimeout(e.longTimeout),e.longTimeout=null,t()},this.max)),clearTimeout(this.shortTimeout)},t}(),v=function(){function t(t,e){this.plugin=t,this.options=e,this.renderTimeout=new g(300,3e3)}return t.prototype.getElement=function(){return this.divElement},t.prototype.draw=function(t){var e=this;if(void 0===t&&(t=!1),t)this.resize(),this.render(),this.divElement.style.transform=null;else{if(this.divElement&&this.bounds){var n=new W(this.plugin.getElementPixels(this.bounds)),o=this.divElement,s=Math.round(n.left()-this.currentPixelBounds.left()),i=Math.round(n.top()-this.currentPixelBounds.top()),r=n.width()/this.currentPixelBounds.width(),h=n.height()/this.currentPixelBounds.height();1!==h||1!==r?o.style.transform="translate3d("+s+"px, "+i+"px, 0) scale3d("+r+", "+h+", 1)":0===s&&0===i||(o.style.transform="translate3d("+s+"px, "+i+"px, 0)")}this.renderTimeout.scheduleMaximum(function(){e.render(),e.divElement.style.transform=null})}},t.prototype.resize=function(){if(this.divElement&&this.bounds){var t=this.currentPixelBounds=new W(this.plugin.getElementPixels(this.bounds)),e=this.divElement;e.style.left=t.left()+"px",e.style.top=t.top()+"px",e.style.width=t.width()+"px",e.style.height=t.height()+"px",e.style.transform=null}},t.prototype.initElement=function(){var t=document.createElement("div");return t.style.borderStyle="none",t.style.borderWidth="0px",t.style.position="absolute",t.style.opacity=""+this.options.opacity||"0.5",t.style["backface-visibility"]="hidden",t.style.perspective=1e3,t.style["transform-origin"]="0 0 0",t.style["will-change"]="transform",this.divElement=t,this.divElement},t.prototype.onRemove=function(){this.divElement.parentNode.removeChild(this.divElement),this.divElement=null},t.prototype.setData=function(t){this.model=t?new e(t):null,this.render()},t.prototype.setInverse=function(t){this.options.inverse=t,this.render()},t.prototype.setColors=function(t){this.options.colors=t,this.render()},t.prototype.setOpacity=function(t){this.options.opacity=t,this.divElement&&(this.divElement.style.opacity=""+this.options.opacity||"0.5")},t.prototype.setStrokeWidth=function(t){this.options.strokeWidth=t,this.render()},t.prototype.boundsCalculation=function(t){var e=this.model,n=this.options.inverse,o=new W(this.plugin.getViewPort()),s=new W(o),i=new W(s).growOutwardsFactor(t).modifyIntersect(e.bounds3857);n&&(i.expand(o),i.growOutwardsFactor(t)),s.growOutwardsFactor(t);var r=d.geometry.webMercatorToLatLng(o.southWest,void 0),h=d.geometry.webMercatorToLatLng(o.northEast,void 0),a=this.plugin.getElementPixels({southWest:r,northEast:h}),u=Math.abs((o.northEast.x-o.southWest.x)/a.northEast.x-a.southWest.x);return i.growOutwardsAmount(this.options&&u*this.options.strokeWidth||0),{bounds:s,newBounds:i}},t.prototype.render=function(t){if(void 0===t&&(t=!0),this.divElement)if(this.model){var e=this.plugin.getZoom(),n=256*Math.pow(2,e);n=Math.min(1e7,n);var o=this.boundsCalculation(.1),s=o.bounds,i=o.newBounds,r=m(s,i,n,this.model,new f(this.options)).content;this.divElement.innerHTML=r;var h=d.geometry.webMercatorToLatLng(i.southWest,void 0),a=d.geometry.webMercatorToLatLng(i.northEast,void 0);this.bounds={southWest:h,northEast:a},t&&this.resize()}else this.divElement.innerHTML=""},t}(),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(p),w=function(n){function t(t){var e=n.call(this)||this;return e.readyPromise=new Promise(function(t){return e.readyResolve=t}),e.options=Object.assign(new x,t||{}),e}return i(t,n),t.prototype.setData=function(t){var e=this;this.readyPromise.then(function(){e.element&&e.element.setData(t)})},t.prototype.draw=function(){this.element&&(y.DomUtil.setTransform(this.element.getElement(),new y.Point(0,0),null),this.element.draw(!0))},t.prototype.onAdd=function(l){var c=this;this.element=new v({getZoom:function(){return l.getZoom()},getViewPort:function(){var t=l.getBounds();return new W({northEast:d.geometry.latLngToWebMercator({lng:t.getNorthEast().lng,lat:t.getNorthEast().lat}),southWest:d.geometry.latLngToWebMercator({lng:t.getSouthWest().lng,lat:t.getSouthWest().lat})})},getElementPixels:function(t){return{northEast:l.latLngToLayerPoint(t.northEast),southWest:l.latLngToLayerPoint(t.southWest)}}},this.options);var p=this.element.initElement();return p.style.transformOrigin="center",y.DomUtil.addClass(p,"leaflet-zoom-animated"),l.getPanes().overlayPane.appendChild(p),l.on("moveend",this.draw,this),l.on("resize",this.draw,this),l.on("zoomend",this.draw,this),this._map.options.zoomAnimation&&y.Browser.any3d&&l.on("zoomanim",function(t){if(c.element.bounds){var e=l.getZoomScale(t.zoom,l.getZoom()),n=l._latLngToNewLayerPoint(c.element.bounds.southWest,t.zoom,t.center).round(),o=l._latLngToNewLayerPoint(c.element.bounds.northEast,t.zoom,t.center).round(),s=l._latLngToNewLayerPoint(c.element.bounds.southWest,l.getZoom(),l.getCenter()).round(),i=l._latLngToNewLayerPoint(c.element.bounds.northEast,l.getZoom(),l.getCenter()).round(),r=(n.x+o.x)/2,h=(n.y+o.y)/2,a=(s.x+i.x)/2,u=(s.y+i.y)/2;y.DomUtil.setTransform(p,new y.Point(r-a,h-u),e)}}),this.readyResolve(),this.draw(),this},t.prototype.onRemove=function(){return this.element&&(this.element.onRemove(),this.element=null),this},t.prototype.setInverse=function(t){this.options.inverse=t,this.draw()},t.prototype.setColors=function(t){this.options.colors=t,this.draw()},t.prototype.setOpacity=function(t){(this.options.opacity=t,this.element)&&(this.element.getElement().style.opacity=null!=this.options.opacity?""+this.options.opacity:"0.5")},t.prototype.setStrokeWidth=function(t){this.options.strokeWidth=t,this.draw()},t}(y.Layer),M=function(s){function o(t,e,n){if(!e&&!t.basemaps.basemapsLookup[e])throw new Error("valid style name required to access Targomo basemap");var o="https://maps.targomo.com/styles/"+t.basemaps.basemapsLookup[e]+"/rendered/{z}/{x}/{y}.png?key="+t.serviceKey;return s.call(this,o,n)||this}return i(o,s),o.getTileLayerList=function(e){var n={};return e.basemaps.basemapNames.forEach(function(t){n[t]=new o(e,t,{})}),n},o}(y.TileLayer),P=function(){function t(t,e,n,o){this.tgmClient=t,this.update(n,o,e)}return t.prototype.addTo=function(e){return n(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return this.layer?[3,2]:[4,this.createLayer()];case 1:t.sent(),t.label=2;case 2:return this.map=e,this.layer.addTo(e),[2]}})})},t.prototype.update=function(t,e,n){return t&&(this.multigraphOptions=t),e&&(this.vectorTileoptions=e),n&&(this.sources=n),this.createLayer()},t.prototype.createLayer=function(){return n(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return this.map&&this.layer&&this.map.removeLayer(this.layer),[4,this.tgmClient.multigraph.getTiledMultigraphUrl(this.sources,this.multigraphOptions,"mvt")];case 1:return e=t.sent(),this.layer=y.vectorGrid.protobuf(e,this.vectorTileoptions),this.map&&this.layer&&this.layer.addTo(this.map),[2]}})})},t}();t.LeafletPolygonOverlayOptions=x,t.TgmLeafletPolygonOverlay=w,t.TgmLeafletTileLayer=M,t.TgmLeafletMultigraphTileLayer=P,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=targomo-leaflet.umd.min.js.map

@@ -34,2 +34,6 @@ import { MultipolygonData, PolygonData } from './types';

}): ProjectedBounds;
width(): number;
height(): number;
left(): number;
top(): number;
}

@@ -36,0 +40,0 @@ export interface ProjectedPointData {

@@ -17,2 +17,3 @@ /// <reference path="../../../../node_modules/@types/googlemaps/index.d.ts" />

private options;
private idleListener;
/**

@@ -19,0 +20,0 @@ *

@@ -20,2 +20,3 @@ import * as svg from '../svg/render';

private renderTimeout;
private currentPixelBounds;
/**

@@ -22,0 +23,0 @@ *

@@ -11,2 +11,6 @@ import { ProjectedMultiPolygon, ProjectedBounds } from '../geometry/projectedPolygon';

*/
export declare function render(viewport: ProjectedBounds, bounds3857: ProjectedBounds, zoomFactor: number, multipolygons: ProjectedMultiPolygon, options: PolygonRenderOptions): string;
export declare function render(viewport: ProjectedBounds, bounds3857: ProjectedBounds, zoomFactor: number, multipolygons: ProjectedMultiPolygon, options: PolygonRenderOptions): {
content: string;
width: number;
height: number;
};

@@ -8,2 +8,3 @@ export declare class MinMaxSchedule {

schedule(callback: () => any): void;
scheduleMaximum(callback: () => any): void;
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc