diff --git a/Server/app/svelte/src/components/map-component.svelte b/Server/app/svelte/src/components/map-component.svelte index ea2bb4e..f4f31f2 100644 --- a/Server/app/svelte/src/components/map-component.svelte +++ b/Server/app/svelte/src/components/map-component.svelte @@ -15,10 +15,14 @@ function createMap(center,zoom) { let map = L.map(mapContainer, { center: center, - zoom: zoom + zoom: zoom, }); L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap contributors' + attribution: '© OpenStreetMap contributors', + minNativeZoom: 2, + minZoom: 2, + maxNativeZoom: 16, + maxZoom: 16, }).addTo(map); return map } diff --git a/Server/public/js/components/map-component.js b/Server/public/js/components/map-component.js index 6d4b59d..0282835 100644 --- a/Server/public/js/components/map-component.js +++ b/Server/public/js/components/map-component.js @@ -1 +1 @@ -import{S as t,i as a,a as e,b as s,l as r,s as o,e as n,n as i,d as l,h as c,o as p,r as h}from"./index-95aedb1a.js";function u(t){let a;return{c(){a=n("div"),this.c=i,l(a,"id","map")},m(e,r){s(e,a,r),t[2](a)},p:i,i:i,o:i,d(e){e&&c(a),t[2](null)}}}function m(t,a,e){let s,{callback:r=null}=a;function o(t,a){let e=L.map(s,{center:t,zoom:a});return L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors'}).addTo(e),e}return p((()=>{r(o)})),t.$$set=t=>{"callback"in t&&e(1,r=t.callback)},[s,r,function(t){h[t?"unshift":"push"]((()=>{s=t,e(0,s)}))}]}class b extends t{constructor(t){super(),this.shadowRoot.innerHTML="",a(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},m,u,o,{callback:1},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),r()))}static get observedAttributes(){return["callback"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),r()}}customElements.define("map-component",b);export{b as default}; +import{S as t,i as a,a as e,b as s,l as o,s as r,e as i,n,d as l,h as c,o as p,r as m}from"./index-95aedb1a.js";function h(t){let a;return{c(){a=i("div"),this.c=n,l(a,"id","map")},m(e,o){s(e,a,o),t[2](a)},p:n,i:n,o:n,d(e){e&&c(a),t[2](null)}}}function u(t,a,e){let s,{callback:o=null}=a;function r(t,a){let e=L.map(s,{center:t,zoom:a});return L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors',minNativeZoom:2,minZoom:2,maxNativeZoom:16,maxZoom:16}).addTo(e),e}return p((()=>{o(r)})),t.$$set=t=>{"callback"in t&&e(1,o=t.callback)},[s,o,function(t){m[t?"unshift":"push"]((()=>{s=t,e(0,s)}))}]}class b extends t{constructor(t){super(),this.shadowRoot.innerHTML="",a(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},u,h,r,{callback:1},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["callback"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),o()}}customElements.define("map-component",b);export{b as default};