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.9 KiB
JavaScript
2 lines
1.9 KiB
JavaScript
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6653],{18525:function(e,n,t){var o=t(25649),r=t(41376),i=t(79847),l=t(720),c=t(18626),s=t(42010),u=t(54354),a=t(83384),d=t(86923),g=t(12810),h=t(15421),f=new i.Z,w=new s.Z({source:new c.Z({tileGrid:f.getTileGrid(),projection:f.getProjection()}),visible:!1}),v=new o.Z({strokeStyle:new l.Z({color:"rgba(255,120,0,0.9)",width:2,lineDash:[.5,4]}),showLabels:!0,visible:!1,wrapX:!1}),m=new r.Z({layers:[new s.Z({source:f}),w,v],target:"map",view:new u.ZP({projection:"EPSG:3857",center:[0,0],zoom:1})}),p=document.getElementById("epsg-query"),E=document.getElementById("epsg-search"),Z=document.getElementById("epsg-result"),b=document.getElementById("render-edges"),k=document.getElementById("show-tiles"),j=document.getElementById("show-graticule");function y(e,n,t,o){if(null===e||null===n||null===t||null===o)return Z.innerHTML="Nothing usable found, using EPSG:3857...",void m.setView(new u.ZP({projection:"EPSG:3857",center:[0,0],zoom:1}));Z.innerHTML="("+e+") "+n;var r="EPSG:"+e;a.Z.defs(r,t),(0,h.z)(a.Z);var i=(0,g.U2)(r),l=(0,g.Ck)("EPSG:4326",i),c=[o[1],o[2],o[3],o[0]];i.setWorldExtent(c),o[1]>o[3]&&(c=[o[1],o[2],o[3]+360,o[0]]);var s=(0,d.Ne)(c,l,void 0,8);i.setExtent(s);var f=new u.ZP({projection:i});m.setView(f),f.fit(s)}E.onclick=function(e){var n;n=p.value,Z.innerHTML="Searching ...",fetch("https://epsg.io/?format=json&q="+n).then((function(e){return e.json()})).then((function(e){var n=e.results;if(n&&n.length>0)for(var t=0,o=n.length;t<o;t++){var r=n[t];if(r){var i=r.code,l=r.name,c=r.proj4,s=r.bbox;if(i&&i.length>0&&c&&c.length>0&&s&&4==s.length)return void y(i,l,c,s)}}y(null,null,null,null)})),e.preventDefault()},b.onchange=function(){f.setRenderReprojectionEdges(b.checked)},k.onchange=function(){w.setVisible(k.checked)},j.onchange=function(){v.setVisible(j.checked)}}},function(e){var n=function(n){return e(e.s=n)};n(9877),n(18525)}]);
|
|
//# sourceMappingURL=reprojection-by-code.js.map
|