mapboxgl.accessToken ="pk.eyJ1IjoianVzdGluaW50ZWdybzIxMiIsImEiOiJjbHByMGF3aHkwNjZxMmlydnp4cGYxOXBrIn0.o9L86kGLVl9CtgumDbgIvQ";const center=[-76.678911, 39.805111];const earth="mapbox://styles/mapbox/standard";const satellite="mapbox://styles/mapbox/satellite-v9";const EARTH_THUMB="https://cdn.prod.website-files.com/6ac8f24e2ead2f416c82b4d5/6acccb81562161873846e919_earth_thumb.png";const SAT_THUMB="https://cdn.prod.website-files.com/6ac8f24e2ead2f416c82b4d5/6acccb93f60c44ee289f6845_satellite_thumb.png";const map = new mapboxgl.Map({container:"footer-map",style:earth,center,zoom: 13,});map.addControl(new mapboxgl.NavigationControl(),"top-left");class StyleSwitcher{onAdd(map){this.map=map;this.sat=false;this.el=document.createElement("div");this.el.className="mapboxgl-ctrl mapboxgl-ctrl-group";this.btn=document.createElement("button");this.btn.type="button";this.btn.className="switcher";this.btn.setAttribute("aria-label","Switch map style");this.btn.style.backgroundImage=`url(${EARTH_THUMB})`;this.btn.onclick=()=>{this.sat=!this.sat;map.setStyle(this.sat?satellite:earth);this.btn.style.backgroundImage=`url(${this.sat ? SAT_THUMB : EARTH_THUMB})`;};this.el.appendChild(this.btn);return this.el;}onRemove(){this.el.remove();}}map.addControl(new mapboxgl.FullscreenControl(),"top-right");map.addControl(new StyleSwitcher(),"top-right");new mapboxgl.Marker().setLngLat(center).setPopup(new mapboxgl.Popup({offset:25}).setHTML("Cozy Home, Gifts & Décor
12025 Susquehanna Trail South,
Glen Rock, PA 17327",),).addTo(map);