1import l from"woody_addon_touristicmaps_map_control";import{searchLocation as c}from"woody_addon_touristicmaps_utils";class s extends l{constructor(e={}){super("search-city",e)}createPanel(){const e=document.createElement("form");e.classList.add("maplibregl-ctrl","maplibregl-ctrl-group"),e.style="display: flex; flex-direction: row; align-items: center";const i=this.args.lang=="fr"?"Rechercher une ville":"Search for city",t=document.createElement("input");t.setAttribute("aria-label",t.title=t.placeholder=i),t.type="search",t.style="display: block; padding: .5em; width: 9em; height: 2em",e.appendChild(t);const a=document.createElement("button");return a.setAttribute("aria-label",a.title="France"),a.type="submit",a.style="display: grid; place-items: center; padding: .5em; width: 6em; height: 2em",a.innerHTML="Rechercher",e.appendChild(a),e.addEventListener("submit",async n=>{n.preventDefault(),n.stopPropagation();const r=await c(t.value);r.lat&&r.lon&&this.mapComponent.setPosition({center:[r.lon,r.lat],range:[.5,.5]}),this.mapComponent.dispatchEvent(new CustomEvent("search-city-result",{detail:r}))}),e}}export{s 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.