leaflet-tilelayer-swiss
Advanced tools
Comparing version 2.0.1 to 2.0.2
/*! | ||
* Leaflet.TileLayer.Swiss v2.0.1 | ||
* Leaflet.TileLayer.Swiss v2.0.2 | ||
* Plugin for displaying Swiss map tiles | ||
@@ -7,3 +7,3 @@ * © Roman Karavia | MIT License | ||
*/ | ||
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var L$1=_interopDefault(require("leaflet")),lv03="EPSG:21781",lv95="EPSG:2056";void 0===Number.isFinite&&(Number.isFinite=function(t){return"number"==typeof t&&isFinite(t)});var t=Math.sqrt(Number.EPSILON);function n(t){if(!Array.isArray(t))throw new Error("Expected input to be an array.");if(t.length<2)throw new Error("Expected input to be an array with length >= 2, got "+t.length+".");if(t.some((function(t){return!Number.isFinite(t)})))throw new Error("Expected all coordinates to be finite numbers.")}function r(t,n,a){return(a/60+n)/60+t}function o(t){return 180*t/Math.PI}function M(t){return t*Math.PI/180}function s(t,n){return{apply:function(a){var r=a[0],o=a[1],e=a.slice(2);return[r+t,o+n].concat(e)},unapply:function(a){var r=a[0],o=a[1],e=a.slice(2);return[r-t,o-n].concat(e)}}}var u=s(6e5,2e5),c=u.apply,p=u.unapply,l=s(26e5,12e5),v=l.apply,w=l.unapply,y=674.374,I=15.056,P=405.346;function m(n,a){var r=1/a,e=2*r-Math.pow(r,2);return{fromCartesian:function(a){for(var r,i,s,h=a[0],u=a[1],c=a[2],M=Math.atan(u/h),l=Math.sqrt(Math.pow(h,2)+Math.pow(u,2)),p=Math.atan(c/((1-e)*l));!(Math.abs(i-r)<t);)r=i,i=n/Math.sqrt(1-e*Math.pow(Math.sin(p),2)),s=l/Math.cos(p)-i,p=Math.atan(c/((1-e*i/(i+s))*l));var f=o(p);return[o(M),f,s]},toCartesian:function(t){var a=t[0],r=t[2];void 0===r&&(r=0);var o=M(t[1]),i=M(a),s=n/Math.sqrt(1-e*Math.pow(Math.sin(o),2));return[(s+r)*Math.cos(o)*Math.cos(i),(s+r)*Math.cos(o)*Math.sin(i),(s*(1-e)+r)*Math.sin(o)]}}}var d=m(6377397.155,299.15281285),q=d.fromCartesian,x=d.toCartesian,E=m(6378137,298.257223563),C=E.fromCartesian,N=E.toCartesian,F=1/299.15281285,A=M(r(46,57,8.66)),L=M(r(7,26,22.5)),O=2*F-Math.pow(F,2),S=6377397.155*Math.sqrt(1-O)/(1-O*Math.pow(Math.sin(A),2)),k=Math.sqrt(1+O/(1-O)*Math.pow(Math.cos(A),4)),z=Math.asin(Math.sin(A)/k),B=Math.sqrt(O),D=Math.log(Math.tan(Math.PI/4+z/2))-k*Math.log(Math.tan(Math.PI/4+A/2))+k*B/2*Math.log((1+B*Math.sin(A))/(1-B*Math.sin(A)));function G(t){var n,a,r,o,e,i,s,h,u,c=[(n=N(t))[0]-y,n[1]-I,n[2]-P],l=q(c),p=(a=l[0],r=M(l[1]),o=M(a),e=k*Math.log(Math.tan(Math.PI/4+r/2))-k*B/2*Math.log((1+B*Math.sin(r))/(1-B*Math.sin(r)))+D,i=2*(Math.atan(Math.exp(e))-Math.PI/4),s=k*(o-L),h=Math.asin(Math.cos(z)*Math.sin(i)-Math.sin(z)*Math.cos(i)*Math.cos(s)),u=Math.atan(Math.sin(s)/(Math.sin(z)*Math.tan(i)+Math.cos(z)*Math.cos(s))),[S*u,S/2*Math.log((1+Math.sin(h))/(1-Math.sin(h)))]);return t.length>2?p.concat([l[2]]):p}function H(n){var a=function(a){for(var r,e,i=n[0],s=2*(Math.atan(Math.exp(n[1]/S))-Math.PI/4),h=i/S,u=Math.asin(Math.cos(z)*Math.sin(s)+Math.sin(z)*Math.cos(s)*Math.cos(h)),c=Math.atan(Math.sin(h)/(Math.cos(z)*Math.cos(h)-Math.sin(z)*Math.tan(s))),M=L+c/k,l=u;!(Math.abs(e-r)<t);)r=e,e=(Math.log(Math.tan(Math.PI/4+u/2))-D)/k+B*Math.log(Math.tan(Math.PI/4+Math.asin(B*Math.sin(l))/2)),l=2*Math.atan(Math.exp(e))-Math.PI/2;var p=o(l);return[o(M),p]}();a.push(n[2]);var r,e=[(r=x(a))[0]+y,r[1]+I,r[2]+P],i=C(e);return n.length>2?i:i.slice(0,2)}var J={project:function(t){return n(t),c(G(t))},unproject:function(t){return n(t),H(p(t))}};function K(t){return n(t),v(G(t))}function Q(t){return n(t),H(w(t))}var R={project:K,unproject:Q},LV03_BOUNDS=L$1.bounds([42e4,3e4],[9e5,35e4]),LV95_BOUNDS=L$1.bounds([242e4,103e4],[29e5,135e4]);function leafletProjection(t,n){return{bounds:n,project:function(n){var a=n.lng,r=n.lat,o=t.project([a,r]),e=o[0],i=o[1];return L$1.point(e,i)},unproject:function(n){var a=n.x,r=n.y,o=t.unproject([a,r]),e=o[0],i=o[1];return L$1.latLng(i,e)}}}var lv03$1=leafletProjection(J,LV03_BOUNDS),lv95$1=leafletProjection(R,LV95_BOUNDS),RESOLUTIONS=[4e3,3750,3500,3250,3e3,2750,2500,2250,2e3,1750,1500,1250,1e3,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,.5,.25,.1];function fromZoom(t){if(t<0)return RESOLUTIONS[0];if(t>RESOLUTIONS.length-1)return RESOLUTIONS[RESOLUTIONS.length-1];var n=Math.floor(t);if(n===t)return RESOLUTIONS[t];var a=RESOLUTIONS[n],r=RESOLUTIONS[n+1]/a;return a*Math.pow(r,t-n)}function toZoom(t){var n=RESOLUTIONS.findIndex((function(n){return t>=n}));if(0===n)return 0;if(-1===n)return RESOLUTIONS.length-1;if(RESOLUTIONS[n]===t)return n;var a=RESOLUTIONS[n-1],r=RESOLUTIONS[n];return n+Math.log(r/t)/Math.log(a/r)}var CRS=L$1.Class.extend({includes:L$1.CRS,initialize:function(t){this.code=t.code,this.projection=t.projection;var n=this.projection.bounds.getBottomLeft();this.transformation=new L$1.Transformation(1,-n.x,-1,n.y),this.infinite=!1},scale:function(t){return 1/fromZoom(t)},zoom:function(t){return toZoom(1/t)},distance:function(t,n){var a=this.project(t),r=this.project(n);return a.distanceTo(r)}}),lv03$2=new CRS({code:lv03,projection:lv03$1}),lv95$2=new CRS({code:lv95,projection:lv95$1}),tileBounds=L$1.latLngBounds(lv95$2.unproject(lv95$2.projection.bounds.min),lv95$2.unproject(lv95$2.projection.bounds.max)),switzerlandBounds=L$1.latLngBounds(lv95$2.unproject(L$1.point(2485e3,1075e3)),lv95$2.unproject(L$1.point(2835e3,1295e3))),urlsByCrs={};urlsByCrs[lv03]="https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/21781/{z}/{y}/{x}.{format}",urlsByCrs[lv95]="https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/2056/{z}/{x}/{y}.{format}",L$1.CRS.EPSG21781=lv03$2,L$1.CRS.EPSG2056=lv95$2;var Swiss=L$1.TileLayer.extend({options:{attribution:'© <a href="https://www.swisstopo.ch/" target="_blank">Swisstopo</a>',bounds:tileBounds,crs:lv95$2,format:"jpeg",layer:"ch.swisstopo.pixelkarte-farbe",minZoom:14,maxNativeZoom:27,maxZoom:28,subdomains:"0123456789",switzerlandBounds:switzerlandBounds,timestamp:"current"},initialize:function(t){L$1.setOptions(this,t);var n=this.options.url||urlsByCrs[this.options.crs.code];L$1.TileLayer.prototype.initialize.call(this,n,this.options)}});L$1.tileLayer.swiss=function(t){return new Swiss(t)},module.exports=Swiss; | ||
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var L$1=_interopDefault(require("leaflet")),lv03="EPSG:21781",lv95="EPSG:2056";void 0===Number.isFinite&&(Number.isFinite=function(t){return"number"==typeof t&&isFinite(t)});var t=1e-12;function n(t){if(!Array.isArray(t))throw new Error("Expected input to be an array.");if(t.length<2)throw new Error("Expected input to be an array with length >= 2, got "+t.length+".");if(t.some((function(t){return!Number.isFinite(t)})))throw new Error("Expected all coordinates to be finite numbers.")}function r(t,n,a){return(a/60+n)/60+t}function o(t){return 180*t/Math.PI}function M(t){return t*Math.PI/180}function s(t,n){return{apply:function(a){var r=a[0],o=a[1],e=a.slice(2);return[r+t,o+n].concat(e)},unapply:function(a){var r=a[0],o=a[1],e=a.slice(2);return[r-t,o-n].concat(e)}}}var u=s(6e5,2e5),c=u.apply,p=u.unapply,l=s(26e5,12e5),v=l.apply,w=l.unapply,b=674.374,I=15.056,P=405.346;function m(n,a){var r=1/a,e=2*r-Math.pow(r,2);return{fromCartesian:function(a){for(var r,i,s,h=a[0],u=a[1],c=a[2],M=Math.atan(u/h),l=Math.sqrt(Math.pow(h,2)+Math.pow(u,2)),p=Math.atan(c/((1-e)*l));!(Math.abs(i-r)<t);)r=i,i=n/Math.sqrt(1-e*Math.pow(Math.sin(p),2)),s=l/Math.cos(p)-i,p=Math.atan(c/((1-e*i/(i+s))*l));var f=o(p);return[o(M),f,s]},toCartesian:function(t){var a=t[0],r=t[2];void 0===r&&(r=0);var o=M(t[1]),i=M(a),s=n/Math.sqrt(1-e*Math.pow(Math.sin(o),2));return[(s+r)*Math.cos(o)*Math.cos(i),(s+r)*Math.cos(o)*Math.sin(i),(s*(1-e)+r)*Math.sin(o)]}}}var d=m(6377397.155,299.15281285),x=d.fromCartesian,q=d.toCartesian,C=m(6378137,298.257223563),E=C.fromCartesian,F=C.toCartesian,N=1/299.15281285,A=M(r(46,57,8.66)),k=M(r(7,26,22.5)),z=2*N-Math.pow(N,2),B=6377397.155*Math.sqrt(1-z)/(1-z*Math.pow(Math.sin(A),2)),D=Math.sqrt(1+z/(1-z)*Math.pow(Math.cos(A),4)),G=Math.asin(Math.sin(A)/D),H=Math.sqrt(z),J=Math.log(Math.tan(Math.PI/4+G/2))-D*Math.log(Math.tan(Math.PI/4+A/2))+D*H/2*Math.log((1+H*Math.sin(A))/(1-H*Math.sin(A)));function K(t){var n,a,r,o,e,i,s,h,u,c=[(n=F(t))[0]-b,n[1]-I,n[2]-P],l=x(c),p=(a=l[0],r=M(l[1]),o=M(a),e=D*Math.log(Math.tan(Math.PI/4+r/2))-D*H/2*Math.log((1+H*Math.sin(r))/(1-H*Math.sin(r)))+J,i=2*(Math.atan(Math.exp(e))-Math.PI/4),s=D*(o-k),h=Math.asin(Math.cos(G)*Math.sin(i)-Math.sin(G)*Math.cos(i)*Math.cos(s)),u=Math.atan(Math.sin(s)/(Math.sin(G)*Math.tan(i)+Math.cos(G)*Math.cos(s))),[B*u,B/2*Math.log((1+Math.sin(h))/(1-Math.sin(h)))]);return t.length>2?p.concat([l[2]]):p}function L(n){var a=function(a){for(var r,e,i=n[0],s=2*(Math.atan(Math.exp(n[1]/B))-Math.PI/4),h=i/B,u=Math.asin(Math.cos(G)*Math.sin(s)+Math.sin(G)*Math.cos(s)*Math.cos(h)),c=Math.atan(Math.sin(h)/(Math.cos(G)*Math.cos(h)-Math.sin(G)*Math.tan(s))),M=k+c/D,l=u;!(Math.abs(e-r)<t);)r=e,e=(Math.log(Math.tan(Math.PI/4+u/2))-J)/D+H*Math.log(Math.tan(Math.PI/4+Math.asin(H*Math.sin(l))/2)),l=2*Math.atan(Math.exp(e))-Math.PI/2;var p=o(l);return[o(M),p]}();a.push(n[2]);var r,e=[(r=q(a))[0]+b,r[1]+I,r[2]+P],i=E(e);return n.length>2?i:i.slice(0,2)}var O={project:function(t){return n(t),c(K(t))},unproject:function(t){return n(t),L(p(t))}};function Q(t){return n(t),v(K(t))}function R(t){return n(t),L(w(t))}var S={project:Q,unproject:R},LV03_BOUNDS=L$1.bounds([42e4,3e4],[9e5,35e4]),LV95_BOUNDS=L$1.bounds([242e4,103e4],[29e5,135e4]);function leafletProjection(t,n){return{bounds:n,project:function(n){var a=n.lng,r=n.lat,o=t.project([a,r]),e=o[0],i=o[1];return L$1.point(e,i)},unproject:function(n){var a=n.x,r=n.y,o=t.unproject([a,r]),e=o[0],i=o[1];return L$1.latLng(i,e)}}}var lv03$1=leafletProjection(O,LV03_BOUNDS),lv95$1=leafletProjection(S,LV95_BOUNDS),RESOLUTIONS=[4e3,3750,3500,3250,3e3,2750,2500,2250,2e3,1750,1500,1250,1e3,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,.5,.25,.1];function fromZoom(t){if(t<0)return RESOLUTIONS[0];if(t>RESOLUTIONS.length-1)return RESOLUTIONS[RESOLUTIONS.length-1];var n=Math.floor(t);if(n===t)return RESOLUTIONS[t];var a=RESOLUTIONS[n],r=RESOLUTIONS[n+1]/a;return a*Math.pow(r,t-n)}function toZoom(t){var n=RESOLUTIONS.findIndex((function(n){return t>=n}));if(0===n)return 0;if(-1===n)return RESOLUTIONS.length-1;if(RESOLUTIONS[n]===t)return n;var a=RESOLUTIONS[n-1],r=RESOLUTIONS[n];return n+Math.log(r/t)/Math.log(a/r)}var CRS=L$1.Class.extend({includes:L$1.CRS,initialize:function(t){this.code=t.code,this.projection=t.projection;var n=this.projection.bounds.getBottomLeft();this.transformation=new L$1.Transformation(1,-n.x,-1,n.y),this.infinite=!1},scale:function(t){return 1/fromZoom(t)},zoom:function(t){return toZoom(1/t)},distance:function(t,n){var a=this.project(t),r=this.project(n);return a.distanceTo(r)}}),lv03$2=new CRS({code:lv03,projection:lv03$1}),lv95$2=new CRS({code:lv95,projection:lv95$1}),tileBounds=L$1.latLngBounds(lv95$2.unproject(lv95$2.projection.bounds.min),lv95$2.unproject(lv95$2.projection.bounds.max)),switzerlandBounds=L$1.latLngBounds(lv95$2.unproject(L$1.point(2485e3,1075e3)),lv95$2.unproject(L$1.point(2835e3,1295e3))),urlsByCrs={};urlsByCrs[lv03]="https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/21781/{z}/{y}/{x}.{format}",urlsByCrs[lv95]="https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/2056/{z}/{x}/{y}.{format}",L$1.CRS.EPSG21781=lv03$2,L$1.CRS.EPSG2056=lv95$2;var Swiss=L$1.TileLayer.extend({options:{attribution:'© <a href="https://www.swisstopo.ch/" target="_blank">Swisstopo</a>',bounds:tileBounds,crs:lv95$2,format:"jpeg",layer:"ch.swisstopo.pixelkarte-farbe",minZoom:14,maxNativeZoom:27,maxZoom:28,subdomains:"0123456789",switzerlandBounds:switzerlandBounds,timestamp:"current"},initialize:function(t){L$1.setOptions(this,t);var n=this.options.url||urlsByCrs[this.options.crs.code];L$1.TileLayer.prototype.initialize.call(this,n,this.options)}});L$1.tileLayer.swiss=function(t){return new Swiss(t)},module.exports=Swiss; | ||
//# sourceMappingURL=Leaflet.TileLayer.Swiss.cjs.js.map |
/*! | ||
* Leaflet.TileLayer.Swiss v2.0.1 | ||
* Leaflet.TileLayer.Swiss v2.0.2 | ||
* Plugin for displaying Swiss map tiles | ||
@@ -7,3 +7,3 @@ * © Roman Karavia | MIT License | ||
*/ | ||
import t from"leaflet";void 0===Number.isFinite&&(Number.isFinite=function(t){return"number"==typeof t&&isFinite(t)});var n=Math.sqrt(Number.EPSILON);function a(t){if(!Array.isArray(t))throw new Error("Expected input to be an array.");if(t.length<2)throw new Error("Expected input to be an array with length >= 2, got "+t.length+".");if(t.some((function(t){return!Number.isFinite(t)})))throw new Error("Expected all coordinates to be finite numbers.")}function r(t,n,a){return(a/60+n)/60+t}function o(t){return 180*t/Math.PI}function e(t){return t*Math.PI/180}function i(t,n){return{apply:function(a){var r=a[0],o=a[1],e=a.slice(2);return[r+t,o+n].concat(e)},unapply:function(a){var r=a[0],o=a[1],e=a.slice(2);return[r-t,o-n].concat(e)}}}var h=i(6e5,2e5),s=h.apply,u=h.unapply,c=i(26e5,12e5),M=c.apply,p=c.unapply,f=674.374,l=15.056,m=405.346;function d(t,a){var r=1/a,i=2*r-Math.pow(r,2);return{fromCartesian:function(a){for(var r,e,h,s=a[0],u=a[1],c=a[2],M=Math.atan(u/s),p=Math.sqrt(Math.pow(s,2)+Math.pow(u,2)),f=Math.atan(c/((1-i)*p));!(Math.abs(e-r)<n);)r=e,e=t/Math.sqrt(1-i*Math.pow(Math.sin(f),2)),h=p/Math.cos(f)-e,f=Math.atan(c/((1-i*e/(e+h))*p));var l=o(f);return[o(M),l,h]},toCartesian:function(n){var a=n[0],r=n[2];void 0===r&&(r=0);var o=e(n[1]),h=e(a),s=t/Math.sqrt(1-i*Math.pow(Math.sin(o),2));return[(s+r)*Math.cos(o)*Math.cos(h),(s+r)*Math.cos(o)*Math.sin(h),(s*(1-i)+r)*Math.sin(o)]}}}var v=d(6377397.155,299.15281285),w=v.fromCartesian,g=v.toCartesian,b=d(6378137,298.257223563),j=b.fromCartesian,y=b.toCartesian,x=1/299.15281285,P=e(r(46,57,8.66)),E=e(r(7,26,22.5)),I=2*x-Math.pow(x,2),S=6377397.155*Math.sqrt(1-I)/(1-I*Math.pow(Math.sin(P),2)),C=Math.sqrt(1+I/(1-I)*Math.pow(Math.cos(P),4)),L=Math.asin(Math.sin(P)/C),q=Math.sqrt(I),z=Math.log(Math.tan(Math.PI/4+L/2))-C*Math.log(Math.tan(Math.PI/4+P/2))+C*q/2*Math.log((1+q*Math.sin(P))/(1-q*Math.sin(P)));function G(t){var n,a,r,o,i,h,s,u,c,M=[(n=y(t))[0]-f,n[1]-l,n[2]-m],p=w(M),d=(a=p[0],r=e(p[1]),o=e(a),i=C*Math.log(Math.tan(Math.PI/4+r/2))-C*q/2*Math.log((1+q*Math.sin(r))/(1-q*Math.sin(r)))+z,h=2*(Math.atan(Math.exp(i))-Math.PI/4),s=C*(o-E),u=Math.asin(Math.cos(L)*Math.sin(h)-Math.sin(L)*Math.cos(h)*Math.cos(s)),c=Math.atan(Math.sin(s)/(Math.sin(L)*Math.tan(h)+Math.cos(L)*Math.cos(s))),[S*c,S/2*Math.log((1+Math.sin(u))/(1-Math.sin(u)))]);return t.length>2?d.concat([p[2]]):d}function N(t){var a=function(a){for(var r,e,i=t[0],h=2*(Math.atan(Math.exp(t[1]/S))-Math.PI/4),s=i/S,u=Math.asin(Math.cos(L)*Math.sin(h)+Math.sin(L)*Math.cos(h)*Math.cos(s)),c=Math.atan(Math.sin(s)/(Math.cos(L)*Math.cos(s)-Math.sin(L)*Math.tan(h))),M=E+c/C,p=u;!(Math.abs(e-r)<n);)r=e,e=(Math.log(Math.tan(Math.PI/4+u/2))-z)/C+q*Math.log(Math.tan(Math.PI/4+Math.asin(q*Math.sin(p))/2)),p=2*Math.atan(Math.exp(e))-Math.PI/2;var f=o(p);return[o(M),f]}();a.push(t[2]);var r,e=[(r=g(a))[0]+f,r[1]+l,r[2]+m],i=j(e);return t.length>2?i:i.slice(0,2)}var B={project:function(t){return a(t),s(G(t))},unproject:function(t){return a(t),N(u(t))}};var F={project:function(t){return a(t),M(G(t))},unproject:function(t){return a(t),N(p(t))}},T=t.bounds([42e4,3e4],[9e5,35e4]),R=t.bounds([242e4,103e4],[29e5,135e4]);function Z(n,a){return{bounds:a,project:function(a){var r=a.lng,o=a.lat,e=n.project([r,o]),i=e[0],h=e[1];return t.point(i,h)},unproject:function(a){var r=a.x,o=a.y,e=n.unproject([r,o]),i=e[0],h=e[1];return t.latLng(h,i)}}}var k=Z(B,T),A=Z(F,R),O=[4e3,3750,3500,3250,3e3,2750,2500,2250,2e3,1750,1500,1250,1e3,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,.5,.25,.1];var _=t.Class.extend({includes:t.CRS,initialize:function(n){this.code=n.code,this.projection=n.projection;var a=this.projection.bounds.getBottomLeft();this.transformation=new t.Transformation(1,-a.x,-1,a.y),this.infinite=!1},scale:function(t){return 1/function(t){if(t<0)return O[0];if(t>O.length-1)return O[O.length-1];var n=Math.floor(t);if(n===t)return O[t];var a=O[n],r=O[n+1]/a;return a*Math.pow(r,t-n)}(t)},zoom:function(t){return function(t){var n=O.findIndex((function(n){return t>=n}));if(0===n)return 0;if(-1===n)return O.length-1;if(O[n]===t)return n;var a=O[n-1],r=O[n];return n+Math.log(r/t)/Math.log(a/r)}(1/t)},distance:function(t,n){var a=this.project(t),r=this.project(n);return a.distanceTo(r)}}),D=new _({code:"EPSG:21781",projection:k}),H=new _({code:"EPSG:2056",projection:A}),J=t.latLngBounds(H.unproject(H.projection.bounds.min),H.unproject(H.projection.bounds.max)),K=t.latLngBounds(H.unproject(t.point(2485e3,1075e3)),H.unproject(t.point(2835e3,1295e3))),Q={"EPSG:21781":"https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/21781/{z}/{y}/{x}.{format}","EPSG:2056":"https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/2056/{z}/{x}/{y}.{format}"};t.CRS.EPSG21781=D,t.CRS.EPSG2056=H;var U=t.TileLayer.extend({options:{attribution:'© <a href="https://www.swisstopo.ch/" target="_blank">Swisstopo</a>',bounds:J,crs:H,format:"jpeg",layer:"ch.swisstopo.pixelkarte-farbe",minZoom:14,maxNativeZoom:27,maxZoom:28,subdomains:"0123456789",switzerlandBounds:K,timestamp:"current"},initialize:function(n){t.setOptions(this,n);var a=this.options.url||Q[this.options.crs.code];t.TileLayer.prototype.initialize.call(this,a,this.options)}});t.tileLayer.swiss=function(t){return new U(t)};export default U; | ||
import t from"leaflet";void 0===Number.isFinite&&(Number.isFinite=function(t){return"number"==typeof t&&isFinite(t)});var n=1e-12;function a(t){if(!Array.isArray(t))throw new Error("Expected input to be an array.");if(t.length<2)throw new Error("Expected input to be an array with length >= 2, got "+t.length+".");if(t.some((function(t){return!Number.isFinite(t)})))throw new Error("Expected all coordinates to be finite numbers.")}function r(t,n,a){return(a/60+n)/60+t}function o(t){return 180*t/Math.PI}function e(t){return t*Math.PI/180}function i(t,n){return{apply:function(a){var r=a[0],o=a[1],e=a.slice(2);return[r+t,o+n].concat(e)},unapply:function(a){var r=a[0],o=a[1],e=a.slice(2);return[r-t,o-n].concat(e)}}}var h=i(6e5,2e5),s=h.apply,u=h.unapply,c=i(26e5,12e5),M=c.apply,p=c.unapply,f=674.374,l=15.056,m=405.346;function d(t,a){var r=1/a,i=2*r-Math.pow(r,2);return{fromCartesian:function(a){for(var r,e,h,s=a[0],u=a[1],c=a[2],M=Math.atan(u/s),p=Math.sqrt(Math.pow(s,2)+Math.pow(u,2)),f=Math.atan(c/((1-i)*p));!(Math.abs(e-r)<n);)r=e,e=t/Math.sqrt(1-i*Math.pow(Math.sin(f),2)),h=p/Math.cos(f)-e,f=Math.atan(c/((1-i*e/(e+h))*p));var l=o(f);return[o(M),l,h]},toCartesian:function(n){var a=n[0],r=n[2];void 0===r&&(r=0);var o=e(n[1]),h=e(a),s=t/Math.sqrt(1-i*Math.pow(Math.sin(o),2));return[(s+r)*Math.cos(o)*Math.cos(h),(s+r)*Math.cos(o)*Math.sin(h),(s*(1-i)+r)*Math.sin(o)]}}}var v=d(6377397.155,299.15281285),w=v.fromCartesian,g=v.toCartesian,j=d(6378137,298.257223563),y=j.fromCartesian,b=j.toCartesian,x=1/299.15281285,P=e(r(46,57,8.66)),E=e(r(7,26,22.5)),I=2*x-Math.pow(x,2),C=6377397.155*Math.sqrt(1-I)/(1-I*Math.pow(Math.sin(P),2)),S=Math.sqrt(1+I/(1-I)*Math.pow(Math.cos(P),4)),z=Math.asin(Math.sin(P)/S),L=Math.sqrt(I),q=Math.log(Math.tan(Math.PI/4+z/2))-S*Math.log(Math.tan(Math.PI/4+P/2))+S*L/2*Math.log((1+L*Math.sin(P))/(1-L*Math.sin(P)));function G(t){var n,a,r,o,i,h,s,u,c,M=[(n=b(t))[0]-f,n[1]-l,n[2]-m],p=w(M),d=(a=p[0],r=e(p[1]),o=e(a),i=S*Math.log(Math.tan(Math.PI/4+r/2))-S*L/2*Math.log((1+L*Math.sin(r))/(1-L*Math.sin(r)))+q,h=2*(Math.atan(Math.exp(i))-Math.PI/4),s=S*(o-E),u=Math.asin(Math.cos(z)*Math.sin(h)-Math.sin(z)*Math.cos(h)*Math.cos(s)),c=Math.atan(Math.sin(s)/(Math.sin(z)*Math.tan(h)+Math.cos(z)*Math.cos(s))),[C*c,C/2*Math.log((1+Math.sin(u))/(1-Math.sin(u)))]);return t.length>2?d.concat([p[2]]):d}function B(t){var a=function(a){for(var r,e,i=t[0],h=2*(Math.atan(Math.exp(t[1]/C))-Math.PI/4),s=i/C,u=Math.asin(Math.cos(z)*Math.sin(h)+Math.sin(z)*Math.cos(h)*Math.cos(s)),c=Math.atan(Math.sin(s)/(Math.cos(z)*Math.cos(s)-Math.sin(z)*Math.tan(h))),M=E+c/S,p=u;!(Math.abs(e-r)<n);)r=e,e=(Math.log(Math.tan(Math.PI/4+u/2))-q)/S+L*Math.log(Math.tan(Math.PI/4+Math.asin(L*Math.sin(p))/2)),p=2*Math.atan(Math.exp(e))-Math.PI/2;var f=o(p);return[o(M),f]}();a.push(t[2]);var r,e=[(r=g(a))[0]+f,r[1]+l,r[2]+m],i=y(e);return t.length>2?i:i.slice(0,2)}var F={project:function(t){return a(t),s(G(t))},unproject:function(t){return a(t),B(u(t))}};var N={project:function(t){return a(t),M(G(t))},unproject:function(t){return a(t),B(p(t))}},T=t.bounds([42e4,3e4],[9e5,35e4]),R=t.bounds([242e4,103e4],[29e5,135e4]);function Z(n,a){return{bounds:a,project:function(a){var r=a.lng,o=a.lat,e=n.project([r,o]),i=e[0],h=e[1];return t.point(i,h)},unproject:function(a){var r=a.x,o=a.y,e=n.unproject([r,o]),i=e[0],h=e[1];return t.latLng(h,i)}}}var k=Z(F,T),A=Z(N,R),O=[4e3,3750,3500,3250,3e3,2750,2500,2250,2e3,1750,1500,1250,1e3,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,.5,.25,.1];var _=t.Class.extend({includes:t.CRS,initialize:function(n){this.code=n.code,this.projection=n.projection;var a=this.projection.bounds.getBottomLeft();this.transformation=new t.Transformation(1,-a.x,-1,a.y),this.infinite=!1},scale:function(t){return 1/function(t){if(t<0)return O[0];if(t>O.length-1)return O[O.length-1];var n=Math.floor(t);if(n===t)return O[t];var a=O[n],r=O[n+1]/a;return a*Math.pow(r,t-n)}(t)},zoom:function(t){return function(t){var n=O.findIndex((function(n){return t>=n}));if(0===n)return 0;if(-1===n)return O.length-1;if(O[n]===t)return n;var a=O[n-1],r=O[n];return n+Math.log(r/t)/Math.log(a/r)}(1/t)},distance:function(t,n){var a=this.project(t),r=this.project(n);return a.distanceTo(r)}}),D=new _({code:"EPSG:21781",projection:k}),H=new _({code:"EPSG:2056",projection:A}),J=t.latLngBounds(H.unproject(H.projection.bounds.min),H.unproject(H.projection.bounds.max)),K=t.latLngBounds(H.unproject(t.point(2485e3,1075e3)),H.unproject(t.point(2835e3,1295e3))),Q={"EPSG:21781":"https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/21781/{z}/{y}/{x}.{format}","EPSG:2056":"https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/2056/{z}/{x}/{y}.{format}"};t.CRS.EPSG21781=D,t.CRS.EPSG2056=H;var U=t.TileLayer.extend({options:{attribution:'© <a href="https://www.swisstopo.ch/" target="_blank">Swisstopo</a>',bounds:J,crs:H,format:"jpeg",layer:"ch.swisstopo.pixelkarte-farbe",minZoom:14,maxNativeZoom:27,maxZoom:28,subdomains:"0123456789",switzerlandBounds:K,timestamp:"current"},initialize:function(n){t.setOptions(this,n);var a=this.options.url||Q[this.options.crs.code];t.TileLayer.prototype.initialize.call(this,a,this.options)}});t.tileLayer.swiss=function(t){return new U(t)};export default U; | ||
//# sourceMappingURL=Leaflet.TileLayer.Swiss.esm.js.map |
/*! | ||
* Leaflet.TileLayer.Swiss v2.0.1 | ||
* Leaflet.TileLayer.Swiss v2.0.2 | ||
* Plugin for displaying Swiss map tiles | ||
@@ -7,3 +7,3 @@ * © Roman Karavia | MIT License | ||
*/ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("leaflet")):"function"==typeof define&&define.amd?define(["leaflet"],n):((t=t||self).L=t.L||{},t.L.TileLayer=t.L.TileLayer||{},t.L.TileLayer.Swiss=n(t.L))}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;void 0===Number.isFinite&&(Number.isFinite=function(t){return"number"==typeof t&&isFinite(t)});var n=Math.sqrt(Number.EPSILON);function a(t){if(!Array.isArray(t))throw new Error("Expected input to be an array.");if(t.length<2)throw new Error("Expected input to be an array with length >= 2, got "+t.length+".");if(t.some((function(t){return!Number.isFinite(t)})))throw new Error("Expected all coordinates to be finite numbers.")}function e(t,n,a){return(a/60+n)/60+t}function r(t){return 180*t/Math.PI}function o(t){return t*Math.PI/180}function i(t,n){return{apply:function(a){var e=a[0],r=a[1],o=a.slice(2);return[e+t,r+n].concat(o)},unapply:function(a){var e=a[0],r=a[1],o=a.slice(2);return[e-t,r-n].concat(o)}}}var s=i(6e5,2e5),h=s.apply,u=s.unapply,c=i(26e5,12e5),M=c.apply,p=c.unapply,f=674.374,l=15.056,d=405.346;function m(t,a){var e=1/a,i=2*e-Math.pow(e,2);return{fromCartesian:function(a){for(var e,o,s,h=a[0],u=a[1],c=a[2],M=Math.atan(u/h),p=Math.sqrt(Math.pow(h,2)+Math.pow(u,2)),f=Math.atan(c/((1-i)*p));!(Math.abs(o-e)<n);)e=o,o=t/Math.sqrt(1-i*Math.pow(Math.sin(f),2)),s=p/Math.cos(f)-o,f=Math.atan(c/((1-i*o/(o+s))*p));var l=r(f);return[r(M),l,s]},toCartesian:function(n){var a=n[0],e=n[2];void 0===e&&(e=0);var r=o(n[1]),s=o(a),h=t/Math.sqrt(1-i*Math.pow(Math.sin(r),2));return[(h+e)*Math.cos(r)*Math.cos(s),(h+e)*Math.cos(r)*Math.sin(s),(h*(1-i)+e)*Math.sin(r)]}}}var v=m(6377397.155,299.15281285),w=v.fromCartesian,y=v.toCartesian,g=m(6378137,298.257223563),b=g.fromCartesian,j=g.toCartesian,x=1/299.15281285,P=o(e(46,57,8.66)),L=o(e(7,26,22.5)),E=2*x-Math.pow(x,2),I=6377397.155*Math.sqrt(1-E)/(1-E*Math.pow(Math.sin(P),2)),S=Math.sqrt(1+E/(1-E)*Math.pow(Math.cos(P),4)),C=Math.asin(Math.sin(P)/S),q=Math.sqrt(E),z=Math.log(Math.tan(Math.PI/4+C/2))-S*Math.log(Math.tan(Math.PI/4+P/2))+S*q/2*Math.log((1+q*Math.sin(P))/(1-q*Math.sin(P)));function T(t){var n,a,e,r,i,s,h,u,c,M=[(n=j(t))[0]-f,n[1]-l,n[2]-d],p=w(M),m=(a=p[0],e=o(p[1]),r=o(a),i=S*Math.log(Math.tan(Math.PI/4+e/2))-S*q/2*Math.log((1+q*Math.sin(e))/(1-q*Math.sin(e)))+z,s=2*(Math.atan(Math.exp(i))-Math.PI/4),h=S*(r-L),u=Math.asin(Math.cos(C)*Math.sin(s)-Math.sin(C)*Math.cos(s)*Math.cos(h)),c=Math.atan(Math.sin(h)/(Math.sin(C)*Math.tan(s)+Math.cos(C)*Math.cos(h))),[I*c,I/2*Math.log((1+Math.sin(u))/(1-Math.sin(u)))]);return t.length>2?m.concat([p[2]]):m}function G(t){var a=function(a){for(var e,o,i=t[0],s=2*(Math.atan(Math.exp(t[1]/I))-Math.PI/4),h=i/I,u=Math.asin(Math.cos(C)*Math.sin(s)+Math.sin(C)*Math.cos(s)*Math.cos(h)),c=Math.atan(Math.sin(h)/(Math.cos(C)*Math.cos(h)-Math.sin(C)*Math.tan(s))),M=L+c/S,p=u;!(Math.abs(o-e)<n);)e=o,o=(Math.log(Math.tan(Math.PI/4+u/2))-z)/S+q*Math.log(Math.tan(Math.PI/4+Math.asin(q*Math.sin(p))/2)),p=2*Math.atan(Math.exp(o))-Math.PI/2;var f=r(p);return[r(M),f]}();a.push(t[2]);var e,o=[(e=y(a))[0]+f,e[1]+l,e[2]+d],i=b(o);return t.length>2?i:i.slice(0,2)}var N={project:function(t){return a(t),h(T(t))},unproject:function(t){return a(t),G(u(t))}};var B={project:function(t){return a(t),M(T(t))},unproject:function(t){return a(t),G(p(t))}},F=t.bounds([42e4,3e4],[9e5,35e4]),O=t.bounds([242e4,103e4],[29e5,135e4]);function R(n,a){return{bounds:a,project:function(a){var e=a.lng,r=a.lat,o=n.project([e,r]),i=o[0],s=o[1];return t.point(i,s)},unproject:function(a){var e=a.x,r=a.y,o=n.unproject([e,r]),i=o[0],s=o[1];return t.latLng(s,i)}}}var Z=R(N,F),k=R(B,O),A=[4e3,3750,3500,3250,3e3,2750,2500,2250,2e3,1750,1500,1250,1e3,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,.5,.25,.1];var _=t.Class.extend({includes:t.CRS,initialize:function(n){this.code=n.code,this.projection=n.projection;var a=this.projection.bounds.getBottomLeft();this.transformation=new t.Transformation(1,-a.x,-1,a.y),this.infinite=!1},scale:function(t){return 1/function(t){if(t<0)return A[0];if(t>A.length-1)return A[A.length-1];var n=Math.floor(t);if(n===t)return A[t];var a=A[n],e=A[n+1]/a;return a*Math.pow(e,t-n)}(t)},zoom:function(t){return function(t){var n=A.findIndex((function(n){return t>=n}));if(0===n)return 0;if(-1===n)return A.length-1;if(A[n]===t)return n;var a=A[n-1],e=A[n];return n+Math.log(e/t)/Math.log(a/e)}(1/t)},distance:function(t,n){var a=this.project(t),e=this.project(n);return a.distanceTo(e)}}),D=new _({code:"EPSG:21781",projection:Z}),H=new _({code:"EPSG:2056",projection:k}),J=t.latLngBounds(H.unproject(H.projection.bounds.min),H.unproject(H.projection.bounds.max)),K=t.latLngBounds(H.unproject(t.point(2485e3,1075e3)),H.unproject(t.point(2835e3,1295e3))),Q={"EPSG:21781":"https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/21781/{z}/{y}/{x}.{format}","EPSG:2056":"https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/2056/{z}/{x}/{y}.{format}"};t.CRS.EPSG21781=D,t.CRS.EPSG2056=H;var U=t.TileLayer.extend({options:{attribution:'© <a href="https://www.swisstopo.ch/" target="_blank">Swisstopo</a>',bounds:J,crs:H,format:"jpeg",layer:"ch.swisstopo.pixelkarte-farbe",minZoom:14,maxNativeZoom:27,maxZoom:28,subdomains:"0123456789",switzerlandBounds:K,timestamp:"current"},initialize:function(n){t.setOptions(this,n);var a=this.options.url||Q[this.options.crs.code];t.TileLayer.prototype.initialize.call(this,a,this.options)}});return t.tileLayer.swiss=function(t){return new U(t)},U})); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("leaflet")):"function"==typeof define&&define.amd?define(["leaflet"],n):((t=t||self).L=t.L||{},t.L.TileLayer=t.L.TileLayer||{},t.L.TileLayer.Swiss=n(t.L))}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;void 0===Number.isFinite&&(Number.isFinite=function(t){return"number"==typeof t&&isFinite(t)});var n=1e-12;function a(t){if(!Array.isArray(t))throw new Error("Expected input to be an array.");if(t.length<2)throw new Error("Expected input to be an array with length >= 2, got "+t.length+".");if(t.some((function(t){return!Number.isFinite(t)})))throw new Error("Expected all coordinates to be finite numbers.")}function e(t,n,a){return(a/60+n)/60+t}function r(t){return 180*t/Math.PI}function o(t){return t*Math.PI/180}function i(t,n){return{apply:function(a){var e=a[0],r=a[1],o=a.slice(2);return[e+t,r+n].concat(o)},unapply:function(a){var e=a[0],r=a[1],o=a.slice(2);return[e-t,r-n].concat(o)}}}var s=i(6e5,2e5),h=s.apply,u=s.unapply,c=i(26e5,12e5),M=c.apply,p=c.unapply,f=674.374,l=15.056,d=405.346;function m(t,a){var e=1/a,i=2*e-Math.pow(e,2);return{fromCartesian:function(a){for(var e,o,s,h=a[0],u=a[1],c=a[2],M=Math.atan(u/h),p=Math.sqrt(Math.pow(h,2)+Math.pow(u,2)),f=Math.atan(c/((1-i)*p));!(Math.abs(o-e)<n);)e=o,o=t/Math.sqrt(1-i*Math.pow(Math.sin(f),2)),s=p/Math.cos(f)-o,f=Math.atan(c/((1-i*o/(o+s))*p));var l=r(f);return[r(M),l,s]},toCartesian:function(n){var a=n[0],e=n[2];void 0===e&&(e=0);var r=o(n[1]),s=o(a),h=t/Math.sqrt(1-i*Math.pow(Math.sin(r),2));return[(h+e)*Math.cos(r)*Math.cos(s),(h+e)*Math.cos(r)*Math.sin(s),(h*(1-i)+e)*Math.sin(r)]}}}var v=m(6377397.155,299.15281285),w=v.fromCartesian,y=v.toCartesian,g=m(6378137,298.257223563),j=g.fromCartesian,b=g.toCartesian,x=1/299.15281285,P=o(e(46,57,8.66)),L=o(e(7,26,22.5)),E=2*x-Math.pow(x,2),I=6377397.155*Math.sqrt(1-E)/(1-E*Math.pow(Math.sin(P),2)),S=Math.sqrt(1+E/(1-E)*Math.pow(Math.cos(P),4)),C=Math.asin(Math.sin(P)/S),q=Math.sqrt(E),z=Math.log(Math.tan(Math.PI/4+C/2))-S*Math.log(Math.tan(Math.PI/4+P/2))+S*q/2*Math.log((1+q*Math.sin(P))/(1-q*Math.sin(P)));function T(t){var n,a,e,r,i,s,h,u,c,M=[(n=b(t))[0]-f,n[1]-l,n[2]-d],p=w(M),m=(a=p[0],e=o(p[1]),r=o(a),i=S*Math.log(Math.tan(Math.PI/4+e/2))-S*q/2*Math.log((1+q*Math.sin(e))/(1-q*Math.sin(e)))+z,s=2*(Math.atan(Math.exp(i))-Math.PI/4),h=S*(r-L),u=Math.asin(Math.cos(C)*Math.sin(s)-Math.sin(C)*Math.cos(s)*Math.cos(h)),c=Math.atan(Math.sin(h)/(Math.sin(C)*Math.tan(s)+Math.cos(C)*Math.cos(h))),[I*c,I/2*Math.log((1+Math.sin(u))/(1-Math.sin(u)))]);return t.length>2?m.concat([p[2]]):m}function G(t){var a=function(a){for(var e,o,i=t[0],s=2*(Math.atan(Math.exp(t[1]/I))-Math.PI/4),h=i/I,u=Math.asin(Math.cos(C)*Math.sin(s)+Math.sin(C)*Math.cos(s)*Math.cos(h)),c=Math.atan(Math.sin(h)/(Math.cos(C)*Math.cos(h)-Math.sin(C)*Math.tan(s))),M=L+c/S,p=u;!(Math.abs(o-e)<n);)e=o,o=(Math.log(Math.tan(Math.PI/4+u/2))-z)/S+q*Math.log(Math.tan(Math.PI/4+Math.asin(q*Math.sin(p))/2)),p=2*Math.atan(Math.exp(o))-Math.PI/2;var f=r(p);return[r(M),f]}();a.push(t[2]);var e,o=[(e=y(a))[0]+f,e[1]+l,e[2]+d],i=j(o);return t.length>2?i:i.slice(0,2)}var B={project:function(t){return a(t),h(T(t))},unproject:function(t){return a(t),G(u(t))}};var F={project:function(t){return a(t),M(T(t))},unproject:function(t){return a(t),G(p(t))}},N=t.bounds([42e4,3e4],[9e5,35e4]),R=t.bounds([242e4,103e4],[29e5,135e4]);function Z(n,a){return{bounds:a,project:function(a){var e=a.lng,r=a.lat,o=n.project([e,r]),i=o[0],s=o[1];return t.point(i,s)},unproject:function(a){var e=a.x,r=a.y,o=n.unproject([e,r]),i=o[0],s=o[1];return t.latLng(s,i)}}}var k=Z(B,N),A=Z(F,R),O=[4e3,3750,3500,3250,3e3,2750,2500,2250,2e3,1750,1500,1250,1e3,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,.5,.25,.1];var _=t.Class.extend({includes:t.CRS,initialize:function(n){this.code=n.code,this.projection=n.projection;var a=this.projection.bounds.getBottomLeft();this.transformation=new t.Transformation(1,-a.x,-1,a.y),this.infinite=!1},scale:function(t){return 1/function(t){if(t<0)return O[0];if(t>O.length-1)return O[O.length-1];var n=Math.floor(t);if(n===t)return O[t];var a=O[n],e=O[n+1]/a;return a*Math.pow(e,t-n)}(t)},zoom:function(t){return function(t){var n=O.findIndex((function(n){return t>=n}));if(0===n)return 0;if(-1===n)return O.length-1;if(O[n]===t)return n;var a=O[n-1],e=O[n];return n+Math.log(e/t)/Math.log(a/e)}(1/t)},distance:function(t,n){var a=this.project(t),e=this.project(n);return a.distanceTo(e)}}),D=new _({code:"EPSG:21781",projection:k}),H=new _({code:"EPSG:2056",projection:A}),J=t.latLngBounds(H.unproject(H.projection.bounds.min),H.unproject(H.projection.bounds.max)),K=t.latLngBounds(H.unproject(t.point(2485e3,1075e3)),H.unproject(t.point(2835e3,1295e3))),Q={"EPSG:21781":"https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/21781/{z}/{y}/{x}.{format}","EPSG:2056":"https://wmts{s}.geo.admin.ch/1.0.0/{layer}/default/{timestamp}/2056/{z}/{x}/{y}.{format}"};t.CRS.EPSG21781=D,t.CRS.EPSG2056=H;var U=t.TileLayer.extend({options:{attribution:'© <a href="https://www.swisstopo.ch/" target="_blank">Swisstopo</a>',bounds:J,crs:H,format:"jpeg",layer:"ch.swisstopo.pixelkarte-farbe",minZoom:14,maxNativeZoom:27,maxZoom:28,subdomains:"0123456789",switzerlandBounds:K,timestamp:"current"},initialize:function(n){t.setOptions(this,n);var a=this.options.url||Q[this.options.crs.code];t.TileLayer.prototype.initialize.call(this,a,this.options)}});return t.tileLayer.swiss=function(t){return new U(t)},U})); | ||
//# sourceMappingURL=Leaflet.TileLayer.Swiss.umd.js.map |
{ | ||
"name": "leaflet-tilelayer-swiss", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Leaflet.TileLayer.Swiss is a Leaflet plugin for displaying national maps of Switzerland using map tiles from Swisstopo.", | ||
@@ -47,4 +47,4 @@ "source": "src/index.js", | ||
"rollup-plugin-terser": "^5.1.3", | ||
"swissgrid": "^1.0.2" | ||
"swissgrid": "^1.0.3" | ||
} | ||
} |
@@ -32,3 +32,4 @@ [![npm version](https://img.shields.io/npm/v/leaflet-tilelayer-swiss.svg)](https://www.npmjs.com/package/leaflet-tilelayer-swiss) | ||
```html | ||
<script src="https://unpkg.com/leaflet-tilelayer-swiss@2.0.0/dist/Leaflet.TileLayer.Swiss.js"></script> | ||
<script src="https://unpkg.com/leaflet-tilelayer-swiss@2.0.1/dist/Leaflet.TileLayer.Swiss.umd.js" crossorigin | ||
integrity="sha384-QQS8FVB6RhNfzlOqzJV3/V4P6YNJSs49djuAoMAh2NJ5BNaYxPCC1t14fwtcg90/"></script> | ||
``` | ||
@@ -35,0 +36,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172
83048