PageSourceSearch

https://bookings.victoria-glion.ch/assets/MapCard-Bu4nRAtD.js

js victoria-glion.ch collected 2026-10-08 07:11:39 UTC 2,846 bytes, 1 lines download raw bytes

1import{u as y,a as h,b as w,_}from"./formkit.theme-uoC4MDOU.js";import{m as v}from"./marker-539PGXE6.js";import"./computedProperties-DXi-DmhG.js";import{d as M,r as f,q as g,p as k,o as L,c as I,b,M as z}from"./vendor-lxhXACKn.js";import"./globalBasic-DCViCoV8.js";import"./light-nUpfvi-t.js";const C={class:"text-text-primary w-full h-full overflow-hidden"},B={class:"lg:mb-20 w-full h-full flex"},E=M({__name:"MapCard",props:{cityId:{default:null}},setup(S){y(),h();const s=w(),u=f(!1),i=f(null);let t=null,n=null;const c=()=>{new Promise((o,e)=>{if(window.mapboxgl)o(window.mapboxgl);else{const a=document.createElement("script");a.src="https://api.mapbox.com/mapbox-gl-js/v3.4.0/mapbox-gl.js",a.onload=()=>o(window.mapboxgl),a.onerror=()=>e(new Error("Mapbox GL JS library failed to load.")),document.head.appendChild(a)}}).then(o=>{var p;o.accessToken="pk.eyJ1IjoiaG90ZWxwYXJ0bmVyIiwiYSI6ImNseDNlbDl5MDB0aHQydnM0aHhsbjExdnIifQ.WddbBCtWtcGjlc276Sl7iw";const e=(p=s==null?void 0:s.hotelContent)==null?void 0:p.coordinates;if(!i.value||(e==null?void 0:e.longitude)==null||(e==null?void 0:e.latitude)==null)return;n==null||n.disconnect(),t==null||t.remove(),t=new o.Map({container:i.value,style:"mapbox://styles/mapbox/streets-v11",center:[e==null?void 0:e.longitude,e==null?void 0:e.latitude],zoom:10,pitch:45,bearing:-17.6,antialias:!0});const a=new o.LngLatBounds;t.on("style.load",()=>{const x=t.getStyle().layers.find(m=>m.type==="symbol"&&m.layout["text-field"]).id;t.addLayer({id:"add-3d-buildings",source:"composite","source-layer":"building",filter:["==","extrude","true"],type:"fill-extrusion",minzoom:15,paint:{"fill-extrusion-color":"#aaa","fill-extrusion-height":["interpolate",["linear"],["zoom"],15,0,15.05,["get","height"]],"fill-extrusion-base":["interpolate",["linear"],["zoom"],15,0,15.05,["get","min_height"]],"fill-extrusion-opacity":.6}},x)});const l=document.createElement("div");l.className="custom-marker",l.style.backgroundImage=`url(${v})`,l.style.width="52px",l.style.height="52px",l.style.backgroundSize="100%",new o.Marker(l).setLngLat([e.longitude,e.latitude]).addTo(t).getElement().addEventListener("click",async()=>{popup.isOpen()?popup.remove():(await z(),popup.setLngLat([e.longitude,e.latitude]).addTo(t))}),a.extend([e.longitude,e.latitude]),t.fitBounds(a,{padding:{top:150,bottom:150,left:150,right:150},maxZoom:15,duration:4e3,easing:d=>d*(2-d)}),t.on("load",()=>{requestAnimationFrame(()=>{t==null||t.resize()})}),n=new ResizeObserver(()=>{requestAnimationFrame(()=>{t==null||t.resize()})}),n.observe(i.value)}).catch(o=>{console.error(o.message)})};return g(()=>{u.value||c()}),k(u,r=>{r&&c()}),g(()=>{}),(r,o)=>(L(),I("div",C,[b("div",B,[b("div",{ref_key:"mapContainer",ref:i,class:"singleHotelMap flex-grow !rounded-md"},null,512)])]))}}),J=_(E,[["__scopeId","data-v-8dd96832"]]);export{J as default};

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.