function initMap(){let e=document.querySelectorAll(".gspb_gmap");if(e.length>0)for(let t=0;t<e.length;t++){var i=e[t].dataset.key;let n=window[i],o=Number(n.zoomlevel),a=n.markers,l=Number(n.center_index),c=n.styles||"",s=new window.google.maps.Map(e[t],{zoom:o,styles:c}),r=new google.maps.InfoWindow({content:"This is an InfoWindow"});if(s)for(let p=0;p<a.length;p++){let g=a[p],m=g.iconBox_icon,f=g.title,d=g.description,h={lat:parseFloat(g.lat),lng:parseFloat(g.lang)},u;if(g.isCustomIcon&&("image"===m.type&&""!==m.icon.image.url&&(u=m.icon.image.url),"font"===m.type&&""!==g.icon&&(u="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(g.icon)),"svg"===m.type&&""!==m.icon.svg)){let $=m.icon.svg;u="data:image/svg+xml;charset=utf-8,"+encodeURIComponent($)}let v={position:h,map:s,title:f,content:d};if(void 0!==u){let y=Number(m.iconSize[0]),z={url:u,scaledSize:new google.maps.Size(y,y),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(y/2,y)};v={...v,icon:z}}let w=new google.maps.Marker(v);l==p&&s.setCenter(h),w.addListener("click",function(){let e="";""!==f&&(e+="<h4>"+w.title+"</h4>"),""!==d&&(e+="<p>"+w.content+"</p>"),""!==e&&(r.setContent(e),r.open(s,w))})}}}window.initMap=initMap,window.onload=function(){let e=document.querySelectorAll(".gspb_osmap");if(e.length>0)for(let t=0;t<e.length;t++){var i=e[t].dataset.key;let n=e[t].getAttribute("id"),o=window[i],a=Number(o.zoomlevel),l=o.markers,c=Number(o.center_index),s=L.map(n,{zoom:a});if(L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(s),s)for(let r=0;r<l.length;r++){let p=l[r],g=p.iconBox_icon,m=[parseFloat(p.lat),parseFloat(p.lang)],f=p.title,d=p.description,h,u;if(p.isCustomIcon&&("image"===g.type&&""!==g.icon.image.url&&(u=g.icon.image.url),"font"===g.type&&""!==p.icon&&(u="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(p.icon)),"svg"===g.type&&""!==g.icon.svg)){let $=g.icon.svg;u="data:image/svg+xml;charset=utf-8,"+encodeURIComponent($)}if(void 0!==u){let v={iconSize:[g.iconSize[0],g.iconSize[0]],origin:[0,0],iconAnchor:[g.iconSize[0]/2,g.iconSize[0]],iconUrl:u},y=new L.Icon(v);h=L.marker(m,{icon:y}).addTo(s)}else h=L.marker(m).addTo(s);c==r&&s.panTo(m);let z="";if(""!==f&&(z+="<h4>"+f+"</h4>"),""!==d&&(z+="<p>"+d+"</p>"),""!==z){let w=L.popup({offset:[0,-g.iconSize]}).setContent(z);h.bindPopup(w)}}}};