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
2.3 KiB
JavaScript
2 lines
2.3 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{259:function(e,t,n){"use strict";n.r(t);var o,a=n(158),r=n(3),i=n(2),c=n(184),d=n(30),l=n(185),s=n(97),u=n(151),g=n(5),m=n(19),p=n(27),f=n(10),w=new r.a({layers:[new g.a({source:new p.a({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})})],target:"map",view:new i.a({center:[0,0],zoom:2})}),v=document.getElementById("extractstyles");function h(){o&&w.removeInteraction(o),(o=new a.a({formatConstructors:[c.a,d.a,l.a,new s.a({extractStyles:v.checked}),u.a]})).on("addfeatures",(function(e){var t=new f.a({features:e.features});w.addLayer(new m.a({source:t})),w.getView().fit(t.getExtent())})),w.addInteraction(o)}h(),v.addEventListener("change",h);var y=function(e){var t=[];if(w.forEachFeatureAtPixel(e,(function(e){t.push(e)})),t.length>0){var n,o,a=[];for(n=0,o=t.length;n<o;++n)a.push(t[n].get("name"));document.getElementById("info").innerHTML=a.join(", ")||" "}else document.getElementById("info").innerHTML=" "};w.on("pointermove",(function(e){if(!e.dragging){var t=w.getEventPixel(e.originalEvent);y(t)}})),w.on("click",(function(e){y(e.pixel)}));var E=document.getElementById("download");function k(e,t){fetch(e).then((function(e){return e.blob()})).then((function(e){navigator.msSaveBlob?navigator.msSaveBlob(e,t):(E.href=URL.createObjectURL(e),E.download=t,E.click())}))}document.getElementById("download-gpx").addEventListener("click",(function(){k("data/gpx/fells_loop.gpx","fells_loop.gpx")})),document.getElementById("download-geojson").addEventListener("click",(function(){k("data/geojson/roads-seoul.geojson","roads-seoul.geojson")})),document.getElementById("download-igc").addEventListener("click",(function(){k("data/igc/Ulrich-Prinz.igc","Ulrich-Prinz.igc")})),document.getElementById("download-kml").addEventListener("click",(function(){k("data/kml/states.kml","states.kml")})),document.getElementById("download-topojson").addEventListener("click",(function(){k("data/topojson/fr-departments.json","fr-departments.json")}))}},[[259,0]]]);
|
|
//# sourceMappingURL=drag-and-drop.js.map
|