PageSourceSearch

https://www.exploregwinnett.org/dist/RoutingMap-CIopXB2F.js

js exploregwinnett.org collected 2026-10-03 21:55:41 UTC 4,881 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BasicMap-BQWlX_nT.js","./ListenerManager-B9zmCDZv.js","./GoogleMapsLoader-BItwxU3D.js","./sharedMapSettings-62mvULFP.js","./main-BpYodjiM.js","./feed-BMmvEeYE.js","./index--6mjBm2l.js","./feed-DcbYxcRy.css"])))=>i.map(i=>d[i]);
2import{g as d,_ as g}from"./main-BpYodjiM.js";import{L as v}from"./ListenerManager-B9zmCDZv.js";import{setMarkerUrlColor as I,traveledPathOptions as E,defaultPathOptions as R}from"./sharedMapSettings-62mvULFP.js";import{s as b,g as x}from"./featuredMapUtils-DRvLuD5K.js";import{d as C}from"./index--6mjBm2l.js";import"./feed-BMmvEeYE.js";const Z=(h={})=>({mapEl:null,listingSelector:"[data-map-listing]",padIndex:!1,mapTheme:"standard",travelMode:"DRIVING",markers:[],listingEls:[],listingElsWithLocation:[],basicMapInstance:void 0,mapRouter:null,incrementalMapRouterClass:null,listenerBoss:new v,init(){return this.mapEl=this.$refs?.map??null,this.padIndex=h.padIndex??!1,this.mapTheme=h.mapTheme??"standard",this.travelMode=h.travelMode??"DRIVING",()=>this.mounted()},mounted(){this.$el&&(this.$el.hidden=!1),this.setUpMap()},destroy(){this.listenerBoss.removeAll(),this.mapRouter=null},async setUpMap(){if(!this.$el||!this.mapEl){console.error("routingMap: map element not found");return}const{points:s,listingEls:i}=x(this.$el,this.listingSelector);if(this.listingEls=Array.from(i),this.listingElsWithLocation=this.listingEls.filter(r=>r.hasAttribute("data-has-location")),!s.length)return;const[{default:a},{default:l},{getDefaultMapOptions:c}]=await Promise.all([g(()=>import("./BasicMap-BQWlX_nT.js"),__vite__mapDeps([0,1,2]),import.meta.url),g(()=>import("./IncrementalMapRouter-1hEnyrHv.js"),[],import.meta.url),g(()=>import("./sharedMapSettings-62mvULFP.js"),__vite__mapDeps([3,4,5,6,7,1]),import.meta.url)]),t=await c(this.mapTheme);this.incrementalMapRouterClass=l,this.basicMapInstance=new a({outerEl:this.$el,mapEl:this.mapEl,mapOptions:t,points:s,onMapReady:(r,e)=>{this.handleMapReady(r,e)}}),this.listenerBoss.register(document,"scroll",C(()=>{this.updateScrollProgress()},10)),this.listenerBoss.register(window,"resize",()=>{this.basicMapInstance?.updateMapBounds()})},handleMapReady(s,i){const a=d("--map-marker-color",void 0,"#00f"),l=d("--map-marker-color-hover",void 0,"#f00");this.markers=i;const c=this.markers.length;c&&(this.markers.forEach((t,r)=>{const e=t,o=e.point.listingEl,u=o;u.marker=t;const n=o.querySelector("[data-map-listing-icon]"),M=d("--map-marker-color",o,a);let m=o.getAttribute("data-map-listing")||"";this.padIndex&&(m=m.padStart(2,"0")),b(t,a,m);const p=t.getIcon(),f=Object.assign({},p);I(p,a),e.customDefaultIcon=p,I(f,l),e.customHoverIcon=f,e.customZIndex=c-r,t.setZIndex(e.customZIndex),t.addListener("mousedown",()=>{this.deselectAll(),o.classList.add("hover"),t.setIcon(e.customHoverIcon??null),t.setZIndex(e.customZIndex+1e3),n&&(n.style.backgroundColor=l),o.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),this.basicMapInstance?.updateMapBounds(),this.basicMapInstance?.centerMap()}),t.addListener("mouseover",()=>{this.deselectAll(),o.classList.add("hover"),t.setIcon(e.customHoverIcon??null),t.setZIndex(e.customZIndex+700),n&&(n.style.backgroundColor=l)}),t.addListener("mouseout",()=>{o.classList.remove("hover"),t.setIcon(e.customDefaultIcon??null),t.setZIndex(e.customZIndex),n&&(n.style.backgroundColor=M)})}),this.incrementalMapRouterClass&&(this.mapRouter=new this.incrementalMapRouterClass({orderedMarkers:i,map:s,defaultPathOptions:R,traveledPathOptions:E,travelMode:this.travelMode,onReady:()=>{this.updateScrollProgress()}}))),this.listingEls.length&&this.listingEls.forEach(t=>{const e=t.marker??null,o=t.querySelector("[data-map-listing-icon]"),u=d("--map-marker-color",t,a);this.listenerBoss.register(t,"mouseover",()=>{if(this.deselectAll(),e){const n=e;e.setIcon(n.customHoverIcon??null),e.setZIndex(n.customZIndex+1e3),o&&(o.style.backgroundColor=l)}this.basicMapInstance?.updateMapBounds(),this.basicMapInstance?.centerMap()}),this.listenerBoss.register(t,"mouseout",()=>{if(e){const n=e;e.setIcon(n.customDefaultIcon??null),e.setZIndex(n.customZIndex)}o&&(o.style.backgroundColor=u)}
2)})},updateScrollProgress(){if(this.mapRouter&&this.listingElsWithLocation.length){const s=Math.max(document.documentElement.clientHeight,window.innerHeight||0);let i=0,a=0;this.listingElsWithLocation.forEach((l,c)=>{if(l&&l.offsetParent!==null){const t=l.getBoundingClientRect(),e=(1-(t.bottom-s*.5)/t.height)*100;e>0&&(i=c,a=Math.min(e,100))}}),this.mapRouter.setProgress(i,a)}},deselectAll(){this.listingEls.length&&this.listingEls.forEach(s=>{s.classList.remove("hover");const i=s.querySelector("[data-map-listing-icon]"),a=s.getAttribute("data-color")||"";i&&(i.style.backgroundColor=a)}),this.markers.length&&this.markers.forEach(s=>{const i=s;s.setIcon(i.customDefaultIcon??null)})}});export{Z 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.