text: "use strict";(self["webpackChunkwebgis_spa"]=self["webpackChunkwebgis_spa"]||[]).push([[985],{8985:(e,t,r)=>{r.r(t),r.d(t,{default:()=>R});var a=r(3673);function n(e,t,r,n,o,s){const l=(0,a.up)("Map"),c=(0,a.up)("q-page");return(0,a.wg)(),(0,a.j4)(c,{class:"q-pt-lg"},{default:(0,a.w5)((()=>[(0,a._)("div",null,[(0,a.Wm)(l)])])),_:1})}var o=r(2323);const s={class:"q-pa-md row items-start items-center q-gutter-md"},l={id:"openmap",ref:"map-gis",class:"map-container"};function c(e,t,r,n,c,p){return(0,a.wg)(),(0,a.iD)("div",s,[(0,a._)("div",null,"Map zoom: "+(0,o.zw)(c.mapZoom),1),(0,a._)("div",null," Map center: "+(0,o.zw)(p.mapCenterComputed[0].toFixed(5))+", "+(0,o.zw)(p.mapCenterComputed[1].toFixed(5)),1),(0,a._)("div",l,null,512)])}r(2167);var p=r(3081),i=r(5140),m=r(7879),u=r(2411),d=r(4070),h=r(7263),w=r(5344),C=r(2553),f=r(3489),y=r(5090),g=r(9455),Z=r(1314);const S={name:"Map",props:{layer:Object},components:{},data(){return{map:null,mapCenter:[2791191.1823448315,8117240.098736058],mapZoom:7}},watch:{layerSelectedRasterComputed(e,t){this.createMap()},layersSelectedVectorComputed(e,t){this.createMap()}},mounted(){this.createMap()},methods:{createMap(){document.getElementById("openmap").innerHTML="";var e=[];const t=new m.Z({source:new u.Z({url:this.layerSelectedRasterComputed.url,attributions:this.layerSelectedRasterComputed.attributions})});e.push(t);const r=new f.ZP({fill:new y.Z({color:"rgba(255, 255, 255, 0.6)"}),stroke:new g.Z({color:"#319FD3",width:1}),text:new Z.Z({font:"12px Calibri,sans-serif",fill:new y.Z({color:"#000"}),stroke:new g.Z({color:"#fff",width:3})})});this.layersSelectedVectorComputed.length>0&&this.layersSelectedVectorComputed.forEach((t=>{let a=new h.Z({source:new w.Z({url:t.url,format:new C.Z}),style:function(e){return r.getText().setText(e.get("name")),r}});e.push(a)})),this.map=new p.Z({target:this.$refs["map-gis"],layers:e,view:new i.ZP({center:this.mapCenter,zoom:this.mapZoom,constrainResolution:!0})}),this.map.on("moveend",(e=>{let t=e.map,r=t.getView().getCenter(),a=t.getView().getZoom();this.mapCenter=r,this.mapZoom=a}))}},computed:{layersSelectedVectorComputed:function(){return this.$store.state.layers.layersSelectedVector},layerSelectedRasterComputed:function(){return this.$store.state.layers.layerSelectedRaster},mapCenterComputed:function(){return(0,d.bU)(this.mapCenter)}}};S.render=c,S.__scopeId="data-v-e378ebb6";const b=S,v={name:"Web-GIS",components:{Map:b},data(){return{}},mounted(){},methods:{},computed:{layersSelectedVectorComputed:function(){return this.$store.state.layers.layersSelectedVector},layerSelectedRasterComputed:function(){return this.$store.state.layers.layerSelectedRaster}}};var M=r(4379),V=r(7518),_=r.n(V);v.render=n;const R=v;_()(v,"components",{QPage:M.Z})}}]);