PageSourceSearch

https://www.obec-zihle.cz/assets/bundles/mapinfooter/js/map_in_footer-CoYPFvC.js

js obec-zihle.cz collected 2026-10-03 00:07:24 UTC 5,387 bytes, 20 lines download raw bytes

1(()=>{const a={1:(e,t,n)=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" width="31" height="41">
2      <title>${t||"Bod na mape"}</title>
3      <path fill="${e}" fill-opacity="${n}" d="M215.7 499.2C267 435 384 279.4 384 192 
4        C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2
5        c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 
6        64 64 0 1 1 0-128z"/>
7    </svg>`,2:(e,t,n)=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
8      <title>${t||"Bod na mape"}</title>
9      <path fill="${e}" fill-opacity="${n}" d="M16 144a144 144 0 1 1 288 0A144 144
10        0 1 1 16 144zM160 80c8.8 0 16-7.2 16-16s-7.2-16-16-16c-53 0-96
11        43-96 96c0 8.8 7.2 16 16 16s16-7.2 16-16c0-35.3 28.7-64 64-64zM128
12        480l0-162.9c10.4 1.9 21.1 2.9 32 2.9s21.6-1 32-2.9L192 480c0
13        17.7-14.3 32-32 32s-32-14.3-32-32z"/>
14    </svg>`,3:(e,t,n,s)=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
15      <title>${t||"Bod na mape"}</title>
16      <path fill="${e}" fill-opacity="${n}" d="M384 192c0 87.4-117 243-168.3 307.2c-12.3 
17        15.3-35.1 15.3-47.4 0C117 435 0 279.4 0 192C0 86 86 0 192 0S384
18        86 384 192z"/>
19      <text x="50%" y="45%" dominant-baseline="middle" text-anchor="middle" fill="${s}" font-size="185" font-weight="bold">${t}</text>
20    </svg>`},t=e=>{const o=String(e||""),s=o.match(/([0-9.]+)([NS]),\s*([0-9.]+)([EW])/);if(!s)return console.error("Invalid coordinate format:",e),{latitude:0,longitude:0};const[,i,a,r,c]=s;let t=parseFloat(i),n=parseFloat(r);return a==="S"&&(t=-t),c==="W"&&(n=-n),{latitude:Number(t.toFixed(7)),longitude:Number(n.toFixed(7))}},u=(e,t,n,s="")=>{const o=L.control({position:e});return o.onAdd=()=>{const o=L.DomUtil.create("div"),e=L.DomUtil.create("a",s,o);return n&&(e.textContent=n),e.href=t,e.target="_blank",L.DomEvent.disableClickPropagation(e),o},o},s=()=>{const e=L.control({position:"bottomright"});return e.onAdd=()=>{const t=L.DomUtil.create("div"),e=L.DomUtil.create("a","",t);return e.href="https://mapy.com/",e.target="_blank",e.innerHTML='<img src="https://api.mapy.com/img/api/logo.svg" alt="mapy.com logo" />',L.DomEvent.disableClickPropagation(e),t},e},o=(e,t)=>{const n=document.createElement("div");if(e){const s=document.createElement("b");s.textContent=e,n.appendChild(s),t&&n.appendChild(document.createElement("br"))}if(!t)return n;const o=String(t),i=o.match(/https?:\/\/[^\s<>"']+/i);if(!i)return n.appendChild(document.createTextNode(o)),n;const a=i[0],r=(a.match(/[).,;!?]+$/)||[""])[0],c=r?a.slice(0,-r.length):a,l=o.slice(0,i.index),u=o.slice(i.index+a.length);l&&n.appendChild(document.createTextNode(l));const s=document.createElement("a");s.href=c,s.textContent=c,s.target="_blank",s.rel="noopener noreferrer",n.appendChild(s);const d=r+u;return d&&n.appendChild(document.createTextNode(d)),n},i=(e,t)=>!e&&!t?null:o(e,t),n=async t=>{const n=`https://static.gc-system.cz/leaflet/hranice-obci/${t}.json`;try{const s=await fetch(n);if(!s.ok)throw new Error(`Failed to load GeoJSON for LAU2: ${t} (status ${s.status})`);const o=await s.json();L.geoJSON(o,{color:"#cc0000",weight:3,smoothFactor:3,fill:!1}).addTo(e)}catch(e){console.error("Error loading municipality boundaries:",e)}},r=(e,t)=>{typeof mapData=="object"&&mapData&&(mapData.latitude=e,mapData.longitude=t)},c=(n,s,o,c,l,d,u)=>{const{latitude:m,longitude:f}=t(n);r(m,f);const g=L.divIcon({html:a[c](s,l,o,d),className:"marker-color",iconSize:[32,42],iconAnchor:[16,42]}),h=L.marker([m,f],{icon:g,keyboard:!!(l||u)}).addTo(e),p=i(l,u);p&&(h.bindPopup(p,{offset:L.point(0,-20.5)}),h.on("popupopen",()=>{const e=e=>{e.key==="Escape"&&h.closePopup()};document.addEventListener("keydown",e),h.once("popupclose",()=>document.removeEventListener("keydown",e))}))},l=(e,n,s,o,i=!0)=>{const{latitude:r,longitude:c}=t(mapData.coordinates),l=mapData.defaultLocale==="sk"?"https://mapy.com/sk":"https://mapy.com",a=[`mapset=${e}`,`center=${c},${r}`,`zoom=${o}`];return i===!0&&a.push("marker=true"),`${l}/fnc/v1/showmap?${a.join("&")}`},d=(t=null,n)=>{const s=t??l(mapData.mapSet,mapData.latitude,mapData.longitude,mapData.defaultZoom,n!==0[0]?n:mapData.showMarker),o=mapData.defaultLocale==="sk"?"Zobraziť na Mapy.com":"Zobrazit na Mapy.com";u("bottomleft",s,o,"btn-map-in-footer").addTo(e)};let e;const h=n=>{const{latitude:o,longitude:i}=t(n.coordinates);n.latitude=o,n.longitude=i;const a=n.mapSet==="basic"||n.mapSet==="outdoor"?"256@2x":"256";e=L.map("gcm-map",{tap:!1,gestureHandling:!0,dragging:n.moveControls,keyboard:n.moveControls,zoomControl:n.zoomControls,scrollWheelZoom:n.zoomControls,doubleClickZoom:n.zoomControls,touchZoom:n.zoomControls}
20).setView([o,i],n.defaultZoom),L.Control.Zoom.prototype.options.zoomInTitle=n.zoomInTitle,L.Control.Zoom.prototype.options.zoomOutTitle=n.zoomOutTitle,L.tileLayer(`https://api.mapy.com/v1/maptiles/${n.mapSet}/${a}/{z}/{x}/{y}?apiKey=${n.apiKey}`,{minZoom:7,maxZoom:19,attribution:'<a href="https://api.mapy.com/copyright" target="_blank">&copy; Seznam.cz a.s. a další</a>'}).addTo(e),n.mapSet==="aerial"&&L.tileLayer(`https://api.mapy.com/v1/maptiles/names-overlay/256/{z}/{x}/{y}?apikey=${n.apiKey}`,{minZoom:7,maxZoom:19}).addTo(e),s().addTo(e),e.attributionControl.setPrefix(""),n.zoomControls&&e.zoomControl.setPosition("topright")};window.mapInFooter={initMap:h,drawBorderFromGeoJSON:n,addMarker:c,addMapControl:d}})()

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.