import{k as m,M as u,b as c,V as x,l as i,n as l}from"./TileImage-B-0PORC6.js";import{X as w,W as y,a as _}from"./WMTS-C6QUHVX3.js";import{at as g,by as E,bq as p,an as b,bs as j,_ as v}from"./index-BVAEVuZQ.js";const z=g({__name:"test",setup(S){const f=E();return p(()=>{console.log([...m([119.57292352958241,36.00576589040354]),...m([120.80535132856873,36.10453987929036])]);const a=new u({target:f.value,view:new x({zoom:10,center:[120.183895,36.052669]}),layers:[new c({source:new w({url:"https://t{0-6}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=5fe359d7b4199f3100f686218393c5f2"})}),new c({source:new w({url:"https://t{0-6}.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=5fe359d7b4199f3100f686218393c5f2"})})]}),o=i("EPSG:3857").getExtent(),n=l(o)/256,e=new Array(22),t=new Array(22);for(let r=0;r<22;r++)e[r]=n/Math.pow(2,r),t[r]=r;const d=new c({source:new y({url:"/mapserver/wmts",layer:"3b2c1bf3-fc8b-4328-968e-cbc6566cd7c9",format:"image/png",style:"",matrixSet:"EPSG:3857",tileGrid:new _({resolutions:e,matrixIds:t,origin:[o[0],o[3]]})})});a.addLayer(d)}),p(()=>{const s=i("EPSG:4326").getExtent(),o=l(s)/512,n=new Array(22),e=new Array(22);for(let t=0;t<22;t++)n[t]=o/Math.pow(2,t),e[t]=t;console.log(n,e)}),p(()=>{const s=i("EPSG:3857").getExtent(),o=l(s)/256,n=new Array(22),e=new Array(22);for(let t=0;t<22;t++)n[t]=o/Math.pow(2,t),e[t]=t;console.log(n,e)}),(a,s)=>(j(),b("div",{class:"home-container",ref_key:"mapRef",ref:f},null,512))}}),A=v(z,[["__scopeId","data-v-742565ed"]]);export{A as default};
