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.6 KiB
JavaScript
2 lines
1.6 KiB
JavaScript
2 weeks ago
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7569],{36720:function(e,t,n){var r=n(91712),o=n(41376),i=n(95783),a=n(54354),l=n(31998),c=n(69039),u=n(77138),s=n(77975),g=n(720),p=n(42010),w=n(41372),f=new p.Z({source:new l.Z({attributions:'<a href="https://www.maptiler.com/copyright/" target="_blank">© MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a>',url:"https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=get_your_own_D6rA4zTHduk6KOKTXzGB",maxZoom:20})}),m={Point:new c.ZP({image:new u.Z({fill:new s.Z({color:"rgba(255,255,0,0.4)"}),radius:5,stroke:new g.Z({color:"#ff0",width:1})})}),LineString:new c.ZP({stroke:new g.Z({color:"#f00",width:3})}),MultiLineString:new c.ZP({stroke:new g.Z({color:"#0f0",width:3})})},h=new w.Z({source:new i.Z({url:"data/gpx/fells_loop.gpx",format:new r.Z}),style:function(e){return m[e.getGeometry().getType()]}}),y=new o.Z({layers:[f,h],target:document.getElementById("map"),view:new a.ZP({center:[-7916041.528716288,5228379.045749711],zoom:12})}),Z=function(e){var t=[];if(y.forEachFeatureAtPixel(e,(function(e){t.push(e)})),t.length>0){var n,r,o=[];for(n=0,r=t.length;n<r;++n)o.push(t[n].get("desc"));document.getElementById("info").innerHTML=o.join(", ")||"(unknown)",y.getTarget().style.cursor="pointer"}else document.getElementById("info").innerHTML=" ",y.getTarget().style.cursor=""};y.on("pointermove",(function(e){if(!e.dragging){var t=y.getEventPixel(e.originalEvent);Z(t)}})),y.on("click",(function(e){Z(e.pixel)}))}},function(e){var t=function(t){return e(e.s=t)};t(9877),t(36720)}]);
|
||
|
//# sourceMappingURL=gpx.js.map
|