You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.2 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7792],{47984:function(e,t,n){var r=n(41376),o=n(79847),a=n(42010),i=n(54354),c=n(31998),p=n(31250),s=new a.Z({source:new o.Z}),u=new a.Z({source:new c.Z({attributions:'<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>',url:"https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=get_your_own_D6rA4zTHduk6KOKTXzGB",maxZoom:20})}),l=new r.Z({layers:[s,u],target:"map",view:new i.ZP({center:[0,0],zoom:2})}),w=document.getElementById("swipe");u.on("prerender",(function(e){var t=e.context,n=l.getSize(),r=n[0]*(w.value/100),o=(0,p.CR)(e,[r,0]),a=(0,p.CR)(e,[n[0],0]),i=(0,p.CR)(e,[r,n[1]]),c=(0,p.CR)(e,n);t.save(),t.beginPath(),t.moveTo(o[0],o[1]),t.lineTo(i[0],i[1]),t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]),t.closePath(),t.clip()})),u.on("postrender",(function(e){e.context.restore()}));var h=function(){l.render()};w.addEventListener("input",h),w.addEventListener("change",h)}},function(e){var t=function(t){return e(e.s=t)};t(9877),t(47984)}]);
//# sourceMappingURL=layer-swipe.js.map