PageSourceSearch

https://www.vgregion.se/js/visuell-identitet/dist/visuell-identitet-leaflet-map.799f4824278379d40fbb.js

js vgregion.se collected 2026-10-01 10:31:38 UTC 2,874 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkvgr=self.webpackChunkvgr||[]).push([[505],{9635:function(e,n,a){a.r(n),a(8706),a(8598),a(2010),a(6099),a(3500);var t,i,o,r=a(3481),l=(a(9389),a(9005),a(7142),a(6098));function s(e){var n,a=r.markerClusterGroup();t={};for(var i=0;i<e.length;i++)if(!isNaN(e[i].position[0])&&!isNaN(e[i].position[1])&&0!=e[i].position[0]&&0!=e[i].position[1]){var o={lat:e[i].position[0],lng:e[i].position[1]};n=r.marker(o,{title:e[i].name});var l=r.icon({iconUrl:"/icons/visuell-identitet/leaflet/marker-icon.png",crossOrigin:!1});n.bindPopup(c(e[i])),n.options.alt="Klickbar markör "+e[i].name,n.options.title="Klickbar markör "+e[i].name,n.setIcon(l),t[e[i].id]=n,a.addLayer(n)}return a}function d(){i.addLayer(o);var e=[];o.eachLayer(function(n){n instanceof r.Marker&&e.push(n)});var n=r.featureGroup(e);if(i.fitBounds(n.getBounds()),null!=t){var a=document.querySelectorAll(".map-link");null!=a&&a.forEach(function(e){e.addEventListener("click",u)})}}function u(e){if(e.target instanceof Element){e.preventDefault();var n=document.getElementById("search-result-map");(0,l.cH)(n)||n.scrollIntoView();var a=e.target.closest("[data-id]"),i=a?a.getAttribute("data-id"):null,r=t[i];null!=r&&o.zoomToShowLayer(r,function(){r.openPopup()})}}function c(e){var n='<div><a href="'+e.url+'"><h3>'+e.name+"</h3></a>";if(null!=e.address&&e.address.length>0){var a="address-label-"+e.id,t="address-link-"+e.id;n+="<div>",n+='<span id="'+a+'">Adress: </span > ',n+='<span aria-labelledby="'+a+" "+t+'" id="'+t+'" > '+e.address.split("$").join(", ")+"</span>",n+="</div>"}if(null!=e.phone&&e.phone.length>0){var i=e.phone[0],o="phone-label-".concat(0,"-").concat(e.id),r="phone-text-".concat(0,"-").concat(e.id);n+="<div>",n+='<span id="'+o+'">Telefon: </span>',n+='<span><a aria-labelledby="'+o+" "+r+'" id="'+r+'" href="tel:'+i+'">'+i+"</a></span>",n+="</div>"}return n}window.addEventListener("markerPositionsChanged",function(e){var n=e.detail.markerPositions;null!=e.detail&&0!=n.length&&(null==o?(o=s(n),null!=i&&d()):0==n.length?o.clearLayers():(o.clearLayers(),o=s(n),null!=i&&d()))},!1),document.addEventListener("keydown",function(e){27===e.keyCode&&null!=i&&i.closePopup()}),document.addEventListener("DOMContentLoaded",function(){if(null!=document.getElementById("search-result-map")){var e=new r.Proj.CRS("EPSG:3006","+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",{resolutions:[4096,2048,1024,512,256,128,64,32,16,8,4,2,1,.5],origin:[-12e5,85e5],bounds:r.bounds([-12e5,85e5],[4305696,2994304])});i=new r.Map("search-result-map",{crs:e}),new r.TileLayer("/api/map-proxy/{z}/{x}/{y}",{maxZoom:13,minZoom:0,attribution:'&copy; <a href="http://www.lantmateriet.se/en/">Lantmäteriet</a> Topografisk Webbkarta Visning, CCB'}).addTo(i),null!=o&&d()}})}}]);
2//# sourceMappingURL=visuell-identitet-leaflet-map.799f4824278379d40fbb.js.map

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.