Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
219 lines
39 KiB
HTML
219 lines
39 KiB
HTML
<!doctype html>
|
||
<html lang="nl">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Hotels als leverancier in BIPP</title>
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.css">
|
||
<style>
|
||
:root{--bg:#f6f7f8;--panel:#fff;--fg:#1d2329;--muted:#5d6872;--line:#dde1e5;--ant:#c2410c;--be:#1d4ed8;--bu:#0f766e}
|
||
@media (prefers-color-scheme:dark){:root{--bg:#14181c;--panel:#1c2227;--fg:#e8ebee;--muted:#9aa5ae;--line:#2d353c}}
|
||
*{box-sizing:border-box}
|
||
html,body{height:100%;margin:0}
|
||
body{font:14px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--fg)}
|
||
#map{position:absolute;inset:0}
|
||
#box{position:absolute;z-index:1000;top:12px;left:12px;width:min(360px,calc(100% - 70px))}
|
||
.sb{background:var(--panel);border-radius:10px;box-shadow:0 2px 8px rgba(0,0,0,.35);overflow:hidden}
|
||
#q{width:100%;border:0;outline:0;padding:12px 14px;background:transparent;color:var(--fg);font:inherit;font-size:15px}
|
||
#res{list-style:none;margin:0;padding:0;max-height:min(55vh,420px);overflow:auto;border-top:1px solid var(--line)}
|
||
#res:empty{display:none}
|
||
#res li{padding:8px 14px;cursor:pointer;display:flex;gap:10px;align-items:center}
|
||
#res li:hover,#res li.on{background:var(--bg)}
|
||
#res i{width:10px;height:10px;border-radius:50%;flex:none}
|
||
#res b{display:block;font-weight:600}
|
||
#res span{color:var(--muted);font-size:12px}
|
||
#box{width:min(360px,calc(100% - 112px))}
|
||
.lang{display:inline-flex;border-radius:6px;overflow:hidden;background:var(--panel);box-shadow:0 1px 5px rgba(0,0,0,.4);font:600 11px system-ui,sans-serif}
|
||
.lang button{border:0;margin:0;background:transparent;color:var(--muted);font:inherit;padding:5px 8px;cursor:pointer}
|
||
.lang button:hover{color:var(--fg)}
|
||
.lang button[aria-pressed=true]{background:var(--fg);color:var(--panel);cursor:default}
|
||
#lang{position:absolute;z-index:1000;top:12px;right:12px}
|
||
.lv{display:none;flex-direction:column;border:0;margin:0 10px 10px 0}
|
||
.lv button{width:30px;height:30px;padding:0;background:#fff;color:#5d6872;font-size:12px;border-radius:0}
|
||
.lv button+button{border-top:1px solid #ccc}
|
||
.lv button[aria-pressed=true]{background:#1d2329;color:#fff}
|
||
@media (max-width:480px){#lang{display:none}.lv{display:flex}#box{width:min(360px,calc(100% - 70px))}}
|
||
.leaflet-popup-content{font:13px/1.4 system-ui,sans-serif}
|
||
.ua{width:26px;height:26px;border-radius:6px;background:#d6001c;color:#fff;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.45);font:700 12px/22px system-ui,sans-serif;text-align:center}
|
||
.ua{transform:scale(.68);transition:transform .15s}
|
||
#map.zs .ua{transform:scale(.4)}
|
||
#map.zh .ua{display:none}
|
||
.lab{background:rgba(255,255,255,.88);color:#1d2329;border:0;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.15);font:600 11px/1.2 system-ui,sans-serif;padding:1px 4px;display:none}
|
||
.lab:before{display:none}
|
||
#map.zl .lab{display:block}
|
||
#map.zl .lab.hid,#map.zl .lab.hd{display:none}
|
||
.leaflet-popup-content small{color:#6b7580}
|
||
.leaflet-popup-content{margin:14px 22px 14px 16px}
|
||
.leaflet-popup-content .pt{font-weight:700;font-size:14px;line-height:1.3;padding-right:10px}
|
||
.leaflet-popup-content .po{color:#6b7580;font-size:12px;margin-top:2px}
|
||
.leaflet-popup-content .pa{margin-top:4px}
|
||
.leaflet-popup-content .pr{color:#6b7580;margin-top:10px;padding-top:8px;border-top:1px solid #e6e9ec;display:flex;align-items:center;gap:7px}
|
||
.leaflet-popup-content .pd{flex:none;width:11px;height:11px;border-radius:50%;border:2px solid;box-sizing:border-box}
|
||
#lg{position:absolute;left:12px;bottom:12px;z-index:1000;background:var(--panel);border-radius:10px;padding:10px 12px 8px;box-shadow:0 2px 10px rgba(0,0,0,.3);font:12px system-ui,sans-serif;color:var(--fg);min-width:190px;max-width:calc(100% - 80px)}
|
||
#lg b{display:block;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
|
||
.fr{display:flex;align-items:center;gap:8px;padding:4px 6px;margin:0 -6px;border-radius:6px;cursor:pointer;user-select:none}
|
||
.fr:hover{background:var(--bg)}
|
||
.fr span{flex:1}
|
||
.fr em{font-style:normal;color:var(--muted);font-size:11px;min-width:2ch;text-align:right}
|
||
.fr i{width:14px;height:14px;border-radius:50%;border:2px solid transparent;box-sizing:border-box;flex:none}
|
||
.fr.fo span{color:var(--muted);opacity:.6}
|
||
.fr.fo i{background:var(--panel)!important}
|
||
.fa{margin-top:6px;padding-top:6px;border-top:1px solid var(--line);font-weight:600;cursor:pointer}
|
||
.fa:hover{text-decoration:underline}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div id="map"></div>
|
||
<div id="lg"></div>
|
||
<div id="lang" class="lang" role="group"></div>
|
||
<div id="box">
|
||
<div class="sb"><input id="q" type="search" placeholder="Zoek hotel, stad of straat" autocomplete="off" aria-label="Zoek hotel"><ul id="res"></ul></div>
|
||
</div>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"></script>
|
||
<script>
|
||
const DATA=[{"tab": "Antwerpen", "hotel": "Antwerp City Hotel", "stad": "Antwerpen", "adres": "Appelmansstraat 31", "land": "België", "ll": [51.2163856, 4.4175503], "prec": "adres"}, {"tab": "Antwerpen", "hotel": "Arass Hotel & Business Flats N.V.", "stad": "Antwerpen", "adres": "Plantin en Moretuslei 111", "land": "België", "ll": [51.2087116, 4.4379812], "prec": "adres"}, {"tab": "Antwerpen", "hotel": "B&B Hotel Belgium B.V.", "stad": "Antwerpen", "adres": "Frankrijklei 36", "land": "België", "ll": [51.2183664, 4.4150354], "prec": "adres", "p": 83}, {"tab": "Antwerpen", "hotel": "B&B Hotel Belgium B.V.", "stad": "Antwerpen", "adres": "Léon Stynenstraat 80", "land": "België", "ll": [51.2051933, 4.3850769], "prec": "adres", "p": 81}, {"tab": "Antwerpen", "hotel": "Bernardin Guesthouse", "stad": "Antwerpen", "adres": "Sint-Jacobsstraat 3", "land": "België", "ll": [51.22038, 4.40991], "prec": "adres", "p": 134}, {"tab": "Antwerpen", "hotel": "Century Hotel", "stad": "Antwerpen", "adres": "Pelikaanstraat 20", "land": "België", "ll": [51.2162777, 4.420316], "prec": "adres", "p": 47}, {"tab": "Antwerpen", "hotel": "Crowne Plaza Hotel (HOLCRO N.V.)", "stad": "Antwerpen", "adres": "Gerard Le Grellelaan 10", "land": "België", "ll": [51.190315, 4.4040924], "prec": "adres", "p": 127}, {"tab": "Antwerpen", "hotel": "De Keyser Hotel", "stad": "Antwerpen", "adres": "De Keyserlei 66-70", "land": "België", "ll": [51.2169767, 4.4195649], "prec": "adres", "p": 143, "bf": 1}, {"tab": "Antwerpen", "hotel": "Firean Hotel", "stad": "Antwerpen", "adres": "Karel Oomsstraat 6", "land": "België", "ll": [51.1974168, 4.4098286], "prec": "adres"}, {"tab": "Antwerpen", "hotel": "Hampton by Hilton Antwerp Central Station", "stad": "Antwerpen", "adres": "Pelikaanstraat 10-16", "land": "België", "ll": [51.2165826, 4.4200763], "prec": "adres", "p": 126, "bf": 1}, {"tab": "Antwerpen", "hotel": "Hilton Antwerp Old Town", "stad": "Antwerpen", "adres": "Groenplaats 32", "land": "België", "ll": [51.2192758, 4.4022091], "prec": "adres", "p": 172}, {"tab": "Antwerpen", "hotel": "Holiday Inn Express Antwerp City - North (HDA N.V.)", "stad": "Antwerpen", "adres": "Italielei 2a", "land": "België", "ll": [51.2294457, 4.4125778], "prec": "adres", "p": 109, "bf": 1}, {"tab": "Antwerpen", "hotel": "Holiday Inn Express Antwerp City Centre (HDOA) N.V.", "stad": "Antwerpen", "adres": "Frankrijklei 4-6", "land": "België", "ll": [51.2194374, 4.4155304], "prec": "adres", "p": 125, "bf": 1}, {"tab": "Antwerpen", "hotel": "Hotel A-Stay Pelikaanstraat N.V.", "stad": "Antwerpen", "adres": "Pelikaanstraat 86", "land": "België", "ll": [51.2143976, 4.4199974], "prec": "adres", "p": 76}, {"tab": "Antwerpen", "hotel": "Hotel Citybox Antwerp B.V.", "stad": "Antwerpen", "adres": "Molenbergstraat 2-4", "land": "België", "ll": [51.220353, 4.4154416], "prec": "adres", "p": 78}, {"tab": "Antwerpen", "hotel": "Hotel Franq (Den Dooren Boom Hotelexploitatie) B.V.", "stad": "Antwerpen", "adres": "Kipdorp 10-12", "land": "België", "ll": [51.2211482, 4.4059912], "prec": "adres", "p": 296}, {"tab": "Antwerpen", "hotel": "Hotel Indigo Antwerp - City Centre (HDQA N.V.)", "stad": "Antwerpen", "adres": "Koningin Astridplein 43", "land": "België", "ll": [51.2187469, 4.4203625], "prec": "adres", "p": 116}, {"tab": "Antwerpen", "hotel": "Hotel Julien (Morilo B.V.)", "stad": "Antwerpen", "adres": "Korte Nieuwstraat 24", "land": "België", "ll": [51.2201953, 4.4039669], "prec": "adres", "p": 433}, {"tab": "Antwerpen", "hotel": "Hotel Mercure Antwerp City South (Mercatorpark Antwerp N.V.)", "stad": "Antwerpen", "adres": "Desguinlei 94", "land": "België", "ll": [51.1946249, 4.4063164], "prec": "adres", "p": 103}, {"tab": "Antwerpen", "hotel": "Hotel NH Collection Antwerp Centre (Hotel Explotatiemaatschappij Diegem N.V.)", "stad": "Antwerpen", "adres": "Pelikaanstraat 84", "land": "België", "ll": [51.2144121, 4.4204392], "prec": "adres", "p": 124}, {"tab": "Antwerpen", "hotel": "Hotel N°43 Styles Antwerpen City Center", "stad": "Antwerpen", "adres": "Koningin Astridplein 43-44", "land": "België", "ll": [51.2181614, 4.4215778], "prec": "adres", "p": 116}, {"tab": "Antwerpen", "hotel": "Hotel Riga B.V.", "stad": "Antwerpen", "adres": "Korte Koepoortstraat 4", "land": "België", "ll": [51.2213758, 4.402319], "prec": "adres"}, {"tab": "Antwerpen", "hotel": "Hotel Rubens - Grote Markt", "stad": "Antwerpen", "adres": "Oude Beurs 29", "land": "België", "ll": [51.2217626, 4.4017265], "prec": "adres", "p": 251, "bf": 1}, {"tab": "Antwerpen", "hotel": "Hotel Rubenshof", "stad": "Antwerpen", "adres": "Amerikalei 115-117", "land": "België", "ll": [51.2065468, 4.3950153], "prec": "adres", "p": 64}, {"tab": "Antwerpen", "hotel": "Hotel Sapphire House Antwerp (Odyssey Antwerpen I B.V.)", "stad": "Antwerpen", "adres": "Lange Nieuwstraat 20-24", "land": "België", "ll": [51.2197659, 4.4071591], "prec": "adres", "p": 314}, {"tab": "Antwerpen", "hotel": "Hotel Sir Plantin B.V. (Via Antwerp)", "stad": "Antwerpen", "adres": "Plantin en Moretuslei 136-140", "land": "België", "ll": [51.2092621, 4.4302602], "prec": "adres", "p": 103}, {"tab": "Antwerpen", "hotel": "Hotel U Eat & Sleep (U-GO B.V.)", "stad": "Antwerpen", "adres": "Nassaustraat 42", "land": "België", "ll": [51.2299055, 4.4051081], "prec": "adres", "p": 186}, {"tab": "Antwerpen", "hotel": "Hotel ’t Sandt N.V.", "stad": "Antwerpen", "adres": "Zand 13-19", "land": "België", "ll": [51.2195536, 4.396314], "prec": "adres", "p": 234, "bf": 1}, {"tab": "Antwerpen", "hotel": "HotelO Kathedral B.V.", "stad": "Antwerpen", "adres": "Handschoenmarkt 3", "land": "België", "ll": [51.2206475, 4.3996233], "prec": "adres", "p": 126}, {"tab": "Antwerpen", "hotel": "Hyllit Hotel Antwerp (Bel It Corporation N.V.)", "stad": "Antwerpen", "adres": "De Keyserlei 28-30", "land": "België", "ll": [51.2173162, 4.4172356], "prec": "adres", "p": 139}, {"tab": "Antwerpen", "hotel": "Ibis Antwerpen Centrum (Ulysse OpCo Belgium N.V.)", "stad": "Antwerpen", "adres": "Meistraat 39", "land": "België", "ll": [51.2149075, 4.41107], "prec": "adres", "p": 93}, {"tab": "Antwerpen", "hotel": "Ibis Budget Antwerpen Centraal Station (Accor Invest Belgium N.V.)", "stad": "Antwerpen", "adres": "Lange Kievitstraat 145", "land": "België", "ll": [51.2133301, 4.4235739], "prec": "adres", "p": 64}, {"tab": "Antwerpen", "hotel": "Leonardo Hotel Antwerpen (Fattal Hotels Mgmt N.V.)", "stad": "Antwerpen", "adres": "De Keyserlei 59", "land": "België", "ll": [51.2176276, 4.420019], "prec": "adres", "p": 79}, {"tab": "Antwerpen", "hotel": "Leopold Hotel Antwerp (Hotel Developmt Corp)", "stad": "Antwerpen", "adres": "Quinten Matsijslei 25", "land": "België", "ll": [51.2133147, 4.4169302], "prec": "adres", "p": 125}, {"tab": "Antwerpen", "hotel": "Lindner Hotel & City Lounge Antwerpen", "stad": "Antwerpen", "adres": "Lange Kievitstraat 125", "land": "België", "ll": [51.2132433, 4.4226771], "prec": "adres", "p": 120}, {"tab": "Antwerpen", "hotel": "Mercure Antwerp City Centre (Hotel Dev. Corp.) N.V.", "stad": "Antwerpen", "adres": "Quinten Matsijslei 25", "land": "België", "ll": [51.2133147, 4.4169302], "prec": "adres", "p": 125}, {"tab": "Antwerpen", "hotel": "Prize Belgium B.V. (by Radisson Antwerp City)", "stad": "Antwerpen", "adres": "Tunnelplaats 5", "land": "België", "ll": [51.2269381, 4.413092], "prec": "adres", "p": 84}, {"tab": "Antwerpen", "hotel": "Quality Hotel Antwerpen Cent. Opera (Perfect B.V.)", "stad": "Antwerpen", "adres": "Molenbergstraat 9-11", "land": "België", "ll": [51.2202293, 4.4150853], "prec": "adres", "p": 69}, {"tab": "Antwerpen", "hotel": "Radisson Blu Astrid Hotel", "stad": "Antwerpen", "adres": "Koningin Astridplein 7", "land": "België", "ll": [51.2192612, 4.4213533], "prec": "adres", "p": 135}, {"tab": "Antwerpen", "hotel": "Theater Hotel CVBA", "stad": "Antwerpen", "adres": "Arenbergstraat 30", "land": "België", "ll": [51.2152191, 4.4082664], "prec": "adres", "p": 104}, {"tab": "Antwerpen", "hotel": "Van der Valk Hotel Antwerpen", "stad": "Antwerpen", "adres": "Luitenant Lippenslaan 66", "land": "België", "ll": [51.2091955, 4.4461771], "prec": "adres", "p": 142}, {"tab": "Antwerpen", "hotel": "Van der Valk Park Lane Antwerpen N.V.", "stad": "Antwerpen", "adres": "Van Eycklei 34", "land": "België", "ll": [51.2109301, 4.410881], "prec": "adres", "p": 134}, {"tab": "Antwerpen", "hotel": "YUST Hotel Antwerp N.V.", "stad": "Antwerpen", "adres": "Coveliersstraat 6", "land": "België", "ll": [51.1987792, 4.4167493], "prec": "adres", "p": 79}, {"tab": "België", "hotel": "Atlas Hotel Brussels B.V.", "stad": "Brussel", "adres": "Rue du Vieux Marché aux Grains 30", "land": "België", "ll": [50.8495235, 4.3460492], "prec": "adres"}, {"tab": "België", "hotel": "B&B Hotel Brussel Centrum B.V.", "stad": "Brussel", "adres": "", "land": "België", "ll": [50.8467372, 4.352493], "prec": "stad"}, {"tab": "België", "hotel": "Best Western Hotel Wavre", "stad": "Waver", "adres": "", "land": "België", "ll": [50.7336446, 4.5892763], "prec": "naam"}, {"tab": "België", "hotel": "Hotel Bristol Internationaal", "stad": "Mortsel", "adres": "", "land": "België", "ll": [51.1704119, 4.4566996], "prec": "stad"}, {"tab": "België", "hotel": "Hotel de Flandre Namur N.V.", "stad": "Namen", "adres": "Place de la Station 14", "land": "België", "ll": [50.4680946, 4.8627624], "prec": "adres"}, {"tab": "België", "hotel": "Hotel Drie Eiken IZW (UZA)", "stad": "Edegem", "adres": "", "land": "België", "ll": [51.1548066, 4.4458312], "prec": "stad"}, {"tab": "België", "hotel": "Hotel Horizon", "stad": "Ghislenghien", "adres": "", "land": "België", "ll": [50.6694232, 3.8691516], "prec": "naam"}, {"tab": "België", "hotel": "Hotel Kasteel Solhof B.V.", "stad": "Aartselaar", "adres": "", "land": "België", "ll": [51.133297, 4.3870241], "prec": "stad"}, {"tab": "België", "hotel": "Hotel Mardaga", "stad": "As", "adres": "", "land": "België", "ll": [51.0059372, 5.6017787], "prec": "naam"}, {"tab": "België", "hotel": "Hotel NH Collection Grand Sablon", "stad": "Brussel", "adres": "", "land": "België", "ll": [50.8467372, 4.352493], "prec": "stad"}, {"tab": "België", "hotel": "Hotel Vé B.V.", "stad": "Mechelen", "adres": "Vismarkt 14", "land": "België", "ll": [51.0266127, 4.4767172], "prec": "adres"}, {"tab": "België", "hotel": "Ibis Gent Centrum St-Baafs Kathedraal (Accor Invest Belgium N.V.)", "stad": "Gent", "adres": "", "land": "België", "ll": [51.0528387, 3.7261984], "prec": "naam"}, {"tab": "België", "hotel": "Ibis Liège Centre Opéra (GRAPE HOSPITALITY BELGIAN OPCO B.V.)", "stad": "Luik", "adres": "", "land": "België", "ll": [50.6432481, 5.5717555], "prec": "naam"}, {"tab": "België", "hotel": "Koppenherberg (Impuls Factory B.V.)", "stad": "Oudenaarde", "adres": "Rotelenberg 33", "land": "België", "ll": [50.8085186, 3.5795201], "prec": "adres"}, {"tab": "België", "hotel": "LAPSCHUERE B.V. (Lozer Lodge.be)", "stad": "Lozer", "adres": "", "land": "België", "ll": [50.9320176, 3.5708123], "prec": "naam"}, {"tab": "België", "hotel": "Martins Hotels N.V.", "stad": "Bergen", "adres": "", "land": "België", "ll": [50.4549568, 3.951958], "prec": "stad"}, {"tab": "België", "hotel": "Martins Hotels N.V.", "stad": "Bilzen", "adres": "", "land": "België", "ll": [50.8707787, 5.5181089], "prec": "stad"}, {"tab": "België", "hotel": "Martins Hotels N.V.", "stad": "Brugge", "adres": "", "land": "België", "ll": [51.2085526, 3.226772], "prec": "stad"}, {"tab": "België", "hotel": "Martins Hotels N.V.", "stad": "Brussel", "adres": "", "land": "België", "ll": [50.8467372, 4.352493], "prec": "stad"}, {"tab": "België", "hotel": "Martins Hotels N.V.", "stad": "Genval", "adres": "", "land": "België", "ll": [50.7220137, 4.5029938], "prec": "stad"}, {"tab": "België", "hotel": "Martins Hotels N.V.", "stad": "Leuven", "adres": "", "land": "België", "ll": [50.879202, 4.7011675], "prec": "stad"}, {"tab": "België", "hotel": "Martins Hotels N.V.", "stad": "Louvain-la-Neuve", "adres": "", "land": "België", "ll": [50.6740673, 4.6138095], "prec": "stad"}, {"tab": "België", "hotel": "Martins Hotels N.V.", "stad": "Mechelen", "adres": "", "land": "België", "ll": [51.0281381, 4.4803453], "prec": "stad"}, {"tab": "België", "hotel": "Martins Hotels N.V.", "stad": "Tubeke", "adres": "", "land": "België", "ll": [50.69302, 4.204696], "prec": "stad"}, {"tab": "België", "hotel": "Pentahotel Brussels City Centre (CFH Penta Belgian N.V.)", "stad": "Brussel", "adres": "", "land": "België", "ll": [50.8309509, 4.3565023], "prec": "naam"}, {"tab": "België", "hotel": "Ter Elst Recreatie en Congreshotel", "stad": "Edegem", "adres": "", "land": "België", "ll": [51.1548066, 4.4458312], "prec": "stad"}, {"tab": "België", "hotel": "The Hoxton Brussels (Victoria Hotel Opco B.V.)", "stad": "Brussel", "adres": "", "land": "België", "ll": [50.8557187, 4.3632631], "prec": "naam"}, {"tab": "België", "hotel": "The Lodge Abdij B.V.", "stad": "Leuven", "adres": "Abdij van Park 4", "land": "België", "ll": [50.8642529, 4.7149577], "prec": "adres"}, {"tab": "Buitenland", "hotel": "A&O Hostel and Hotel Rotterdam B.V.", "stad": "Rotterdam", "adres": "", "land": "Nederland", "ll": [51.9244424, 4.47775], "prec": "stad"}, {"tab": "Buitenland", "hotel": "A&O Hostels Keulen GmbH", "stad": "Keulen", "adres": "", "land": "Duitsland", "ll": [50.938361, 6.959974], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Alexander Thomson Hotel", "stad": "Glasgow", "adres": "", "land": "Verenigd Koninkrijk", "ll": [55.861155, -4.2501687], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Aljamal hotel", "stad": "Amman", "adres": "", "land": "Jordanië", "ll": [31.9515694, 35.9239625], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Apollo Hotel Utrecht (EHM Hotel Utrecht)", "stad": "Utrecht", "adres": "", "land": "Nederland", "ll": [52.0841923, 5.0988034], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Arcadia Lodges", "stad": "Kabale", "adres": "", "land": "Oeganda", "ll": [-1.3359666, 30.036886], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Belvilla AG (CH)", "stad": "Zürich", "adres": "", "land": "Zwitserland", "ll": [47.3744489, 8.5410422], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Black Forest Hostel", "stad": "Freiburg", "adres": "", "land": "Duitsland", "ll": [47.9960901, 7.8494005], "prec": "stad"}, {"tab": "Buitenland", "hotel": "City Centre Hotel Mabi Maastricht", "stad": "Maastricht", "adres": "", "land": "Nederland", "ll": [50.8512438, 5.6909768], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Delta Hotels Dar es Salaam (by Marriott)", "stad": "Dar es Salaam", "adres": "", "land": "Tanzania", "ll": [-6.8160837, 39.2803583], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Dusit Princess Hotel Residences Nairobi", "stad": "Nairobi", "adres": "", "land": "Kenia", "ll": [-1.2890006, 36.8172812], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Fletcher Hotel Dikke van Dale (Fletcher Hotel Exploitaties B.V.)", "stad": "Sluis", "adres": "", "land": "Nederland", "ll": [51.3256629, 3.5166309], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Gresham Hotel Company Ltd. (Riu Plaza)", "stad": "Dublin", "adres": "", "land": "Ierland", "ll": [53.3493795, -6.2605593], "prec": "stad"}, {"tab": "Buitenland", "hotel": "GuestHouse Hotel Kaatheuvel B.V.", "stad": "Kaatsheuvel", "adres": "", "land": "Nederland", "ll": [51.6598038, 5.0319484], "prec": "stad"}, {"tab": "Buitenland", "hotel": "HappyGoLuckyHotel (bed-company GmbH)", "stad": "Berlijn", "adres": "", "land": "Duitsland", "ll": [52.5173885, 13.3951309], "prec": "stad"}, {"tab": "Buitenland", "hotel": "High Corner Guest House", "stad": "Makhanda", "adres": "", "land": "Zuid-Afrika", "ll": [-33.3070778, 26.5262836], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Hilton Quebec", "stad": "Québec", "adres": "", "land": "Canada", "ll": [52.4760892, -71.8258668], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Hotel Eklo Lille SAS", "stad": "Rijsel", "adres": "", "land": "Frankrijk", "ll": [50.6365654, 3.0635282], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Hotel Fidder (Best Western)", "stad": "Zwolle", "adres": "", "land": "Nederland", "ll": [52.5145653, 6.0977204], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Hotel Fomento de San Sebastián S.A.", "stad": "San Sebastián", "adres": "", "land": "Spanje", "ll": [43.3224219, -1.9838889], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Hotel Jansen (Alles is Jansen B.V.)", "stad": "Amsterdam", "adres": "", "land": "Nederland", "ll": [52.3730796, 4.8924534], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Hotel La Source Lubumbashi", "stad": "Lubumbashi", "adres": "", "land": "DR Congo", "ll": [-11.6642316, 27.4826264], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Hotel Mercure Reims Centre Cathédrale", "stad": "Reims", "adres": "", "land": "Frankrijk", "ll": [49.2577886, 4.031926], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Hotel Ruch (Prestige investments Ltd.)", "stad": "Kampala", "adres": "", "land": "Oeganda", "ll": [0.3177137, 32.5813539], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Hotel Sofitel Saigon Plaza", "stad": "Ho Chi Minhstad", "adres": "", "land": "Vietnam", "ll": [10.7737261, 106.7166008], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Illovo Hotel (Gordon Institute of Business Science)", "stad": "Johannesburg", "adres": "", "land": "Zuid-Afrika", "ll": [-26.205, 28.049722], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Jugendherberge Konstanz e.V.", "stad": "Konstanz", "adres": "", "land": "Duitsland", "ll": [47.659216, 9.1750718], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Jugendherberge Mannheim International", "stad": "Mannheim", "adres": "", "land": "Duitsland", "ll": [49.4892913, 8.4673098], "prec": "stad"}, {"tab": "Buitenland", "hotel": "NH Collection Roma Centro", "stad": "Rome", "adres": "", "land": "Italië", "ll": [41.8933203, 12.4829321], "prec": "stad"}, {"tab": "Buitenland", "hotel": "NH Valencia Center", "stad": "Valencia", "adres": "", "land": "Spanje", "ll": [39.4697065, -0.3763353], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Nordic Hotels OÜ", "stad": "Tallinn", "adres": "", "land": "Estland", "ll": [59.437242, 24.7572693], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Novotel Manila Araneta City", "stad": "Quezon City", "adres": "", "land": "Filipijnen", "ll": [14.6510546, 121.0486254], "prec": "stad"}, {"tab": "Buitenland", "hotel": "OREA HOTELS s.r.o.", "stad": "Praag", "adres": "", "land": "Tsjechië", "ll": [50.0874654, 14.4212535], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Prinsengracht Hotel B.V.", "stad": "Amsterdam", "adres": "", "land": "Nederland", "ll": [52.3730796, 4.8924534], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Radisson Blu Hotel Nairobi Upper Hill", "stad": "Nairobi", "adres": "", "land": "Kenia", "ll": [-1.2890006, 36.8172812], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Regent Hotel (Cambridge) Ltd", "stad": "Cambridge", "adres": "", "land": "Verenigd Koninkrijk", "ll": [52.1975846, 0.1391537], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Roskilde Danhostel Aps", "stad": "Roskilde", "adres": "", "land": "Denemarken", "ll": [55.6433478, 12.0819247], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Scandic Hotels Oy", "stad": "Espoo", "adres": "", "land": "Finland", "ll": [60.2049651, 24.6559808], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Sheraton Frankfurt Airport hotel (LE-BE hotel)", "stad": "Frankfurt", "adres": "", "land": "Duitsland", "ll": [50.1106444, 8.6820917], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Sheraton Istanbul City Center", "stad": "Istanbul", "adres": "", "land": "Turkije", "ll": [41.006381, 28.9758715], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Sibuya Game Reserve and Lodge (Pty) Ltd", "stad": "Kenton-on-Sea", "adres": "", "land": "Zuid-Afrika", "ll": [-33.6817381, 26.6745343], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Sigtunahojden Hotell och Konferens AB", "stad": "Sigtuna", "adres": "", "land": "Zweden", "ll": [59.6165201, 17.7236301], "prec": "stad"}, {"tab": "Buitenland", "hotel": "Speke Resort and Conference Center MUNYONYO", "stad": "Kampala", "adres": "", "land": "Oeganda", "ll": [0.3177137, 32.5813539], "prec": "stad"}, {"tab": "Buitenland", "hotel": "The Brooklodge Hotel Partnership", "stad": "Aughrim", "adres": "", "land": "Ierland", "ll": [53.3038135, -8.3165156], "prec": "stad"}, {"tab": "Buitenland", "hotel": "The Westin Princeton", "stad": "Princeton", "adres": "", "land": "Verenigde Staten", "ll": [40.3496953, -74.6597376], "prec": "stad"}, {"tab": "Buitenland", "hotel": "University Hotel Groningen", "stad": "Groningen", "adres": "", "land": "Nederland", "ll": [53.2190652, 6.5680077], "prec": "stad"}, {"tab": "Buitenland", "hotel": "VIKO Apart Hotel (Viko Konsult EOOD)", "stad": "Sofia", "adres": "", "land": "Bulgarije", "ll": [42.6977028, 23.3217359], "prec": "stad"}];
|
||
const REG={"Antwerpen":["Antwerpen","#c2410c"],"België":["België","#1d4ed8"],"Buitenland":["Buitenland","#0f766e"]};
|
||
const CL=[100,130,160,1e9];
|
||
const TXT={
|
||
nl:{ph:"Zoek hotel, stad of straat",none:"Geen hotel gevonden",old:"In BIPP als",night:"nacht",ex:"excl. ontbijt",inc:"ontbijt inbegrepen",ua:"Universiteit Antwerpen, Stadscampus",title:"Hotels als leverancier in BIPP",lgl:"Taal",lgt:"Prijs per nacht",lgr:["geen prijs","onder €100","€100 - €130","€130 - €160","vanaf €160"],lga:"Alles tonen"},
|
||
en:{ph:"Search hotel, city or street",none:"No hotel found",old:"In BIPP as",night:"night",ex:"excl. breakfast",inc:"breakfast included",ua:"University of Antwerp, City Campus",title:"Hotels as suppliers in BIPP",lgl:"Language",lgt:"Price per night",lgr:["no price","under €100","€100 - €130","€130 - €160","€160 and up"],lga:"Show all"}};
|
||
const KC=["#aab2ba","#c4e8a8","#74cdb4","#78b3ea","#8a82d8"],KR=["#7b8791","#7fa95a","#3f9f86","#4a86c4","#5a52b0"],KORDER=[1,2,3,4,0];
|
||
const EN={land:{"Bulgarije":"Bulgaria","Denemarken":"Denmark","Duitsland":"Germany","Estland":"Estonia","Filipijnen":"Philippines","Frankrijk":"France","Ierland":"Ireland","Italië":"Italy","Jordanië":"Jordan","Kenia":"Kenya","Nederland":"Netherlands","Oeganda":"Uganda","Spanje":"Spain","Tsjechië":"Czechia","Turkije":"Turkey","Verenigd Koninkrijk":"United Kingdom","Verenigde Staten":"United States","Zuid-Afrika":"South Africa","Zweden":"Sweden","Zwitserland":"Switzerland","België":"Belgium"},
|
||
stad:{"Berlijn":"Berlin","Brussel":"Brussels","Brugge":"Bruges","Gent":"Ghent","Keulen":"Cologne","Luik":"Liège","Namen":"Namur","Praag":"Prague","Rijsel":"Lille","Tubeke":"Tubize","Waver":"Wavre","Ho Chi Minhstad":"Ho Chi Minh City","Zürich":"Zurich","Bergen":"Mons","Québec":"Quebec City"},
|
||
w:{"Filosofie":"Philosophy","Geschiedenis":"History","doctoraatsverdedigingen en events":"PhD defences and events"}};
|
||
let lang="nl";try{lang=localStorage.lang||(/^nl/i.test(navigator.language)?"nl":"en")}catch(e){lang=/^nl/i.test(navigator.language)?"nl":"en"}
|
||
const T=()=>TXT[lang],tr=(k,v)=>lang==="en"&&EN[k][v]||v;
|
||
const placeOf=d=>[d.adres,tr("stad",d.stad),d.tab==="Buitenland"?tr("land",d.land):""].filter(Boolean).join(", ");
|
||
const PREC={adres:"op adres",naam:"op naam (geen adres bekend)",stad:"alleen stad"};
|
||
const map=L.map("map",{zoomControl:false}).setView([51.2194,4.4025],12);
|
||
L.control.zoom({position:"bottomright"}).addTo(map);
|
||
const lvCtl=L.control({position:"bottomright"});lvCtl.onAdd=function(){const d=L.DomUtil.create("div","lang lv");d.setAttribute("role","group");L.DomEvent.disableClickPropagation(d);return d};lvCtl.addTo(map);
|
||
L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,referrerPolicy:"origin",attribution:"© OpenStreetMap-bijdragers"}).addTo(map);
|
||
const esc=s=>String(s).replace(/[&<>"]/g,c=>({"&":"&","<":"<",">":">",'"':"""}[c]));
|
||
map.createPane("hot").style.zIndex=620;
|
||
const layer=L.layerGroup().addTo(map);
|
||
const LABELS=[[/^Bernardin/i,"Bernardin"],[/^HotelO/i,"HotelO"],[/^Hyllit/i,"Hyllit"],[/^Atlas/i,"Atlas"],[/^Best Western/i,"Best Western"],[/^Pentahotel/i,"Pentahotel"],[/^Ter Elst/i,"Ter Elst"],[/Hoxton/i,"Hoxton"],[/^Delta Hotels/i,"Delta"],[/^Dusit/i,"Dusit Princess"],[/^Fletcher/i,"Fletcher"],[/^Radisson Blu Hotel Nairobi/i,"Radisson Blu Nairobi"],[/Mabi/i,"Mabi"],[/^Jugendherberge Konstanz/i,"Jugendherberge Konstanz"],[/^Jugendherberge Mannheim/i,"Jugendherberge Mannheim"],[/^A&O Hostel and Hotel Rotterdam/i,"A&O Rotterdam"],[/^A&O Hostels Keulen/i,"A&O Keulen"],[/^Sheraton Frankfurt/i,"Sheraton Frankfurt"],[/^Sheraton Istanbul/i,"Sheraton Istanbul"],[/^University Hotel/i,"University Hotel"],[/^Novotel/i,"Novotel Manila"],[/^Scandic/i,"Scandic"],[/^Speke/i,"Speke Resort"],[/^Sibuya/i,"Sibuya"],[/^Sigtuna/i,"Sigtunahöjden"],[/^Roskilde/i,"Roskilde Danhostel"],[/^Nordic/i,"Nordic Hotels"],[/^OREA/i,"Orea"],[/^Gresham/i,"Gresham (Riu Plaza)"],[/^Hotel Fomento/i,"Fomento"],[/^Hotel Eklo/i,"Eklo"],[/^B&B/i,"B&B"],[/^Antwerp City Hotel/i,"City Hotel"],[/^Arass/i,"Arass"],[/^Hampton/i,"Hampton"],[/^Hilton Antwerp/i,"Hilton"],[/^Holiday Inn Express/i,"Holiday Inn Express"],[/^Hotel A-Stay/i,"A-Stay"],[/Citybox/i,"Citybox"],[/Franq/i,"Franq"],[/Indigo/i,"Indigo"],[/^Hotel Julien/i,"Julien"],[/^(Hotel )?Mercure/i,"Mercure"],[/^(Hotel )?NH Collection/i,"NH Collection"],[/N°43/,"N°43"],[/^Hotel Riga/i,"Riga"],[/^Hotel Rubens - /i,"Rubens"],[/^Hotel Sapphire/i,"Sapphire House"],[/^Hotel Sir Plantin/i,"Sir Plantin"],[/^Hotel U Eat/i,"U Eat & Sleep"],[/Sandt/,"\u2019t Sandt"],[/^Ibis Budget/i,"Ibis Budget"],[/^Ibis/i,"Ibis"],[/^Leonardo/i,"Leonardo"],[/^Leopold/i,"Leopold"],[/^Lindner/i,"Lindner"],[/^Prize/i,"Prize"],[/^Quality/i,"Quality"],[/^Radisson Blu Astrid/i,"Radisson Blu"],[/^Theater/i,"Theater"],[/^Van der Valk/i,"Van der Valk"],[/^YUST/i,"YUST"],[/^Martins/i,"Martins"],[/^Crowne Plaza/i,"Crowne Plaza"]];
|
||
function labelOf(n){for(const[r,l]of LABELS)if(r.test(n))return l;
|
||
return n.replace(/^Hotel\s+(?!de\b)/i,"").replace(/\s+Hotels?$/i,"").replace(/\s+Antwerp(en)?\b/i,"").trim()||n}
|
||
const NU=[[/^Antwerp City Hotel/,"Premier Suites Antwerp","Premier Suites"],[/^Century Hotel/,"a&o Antwerpen Centraal","a&o Centraal"],[/^Hotel Indigo|^Hotel N°43/,"Hotel Indigo Antwerp City Centre","Indigo"],[/^Hotel Mercure Antwerp City South/,"Pullman Antwerp","Pullman"],[/^Hotel Sir Plantin/,"VIA Antwerp","VIA"],[/^Leopold Hotel|^Mercure Antwerp City Centre/,"Maek Hotel Antwerp Central","Maek"],[/^Quality Hotel Antwerpen Cent/,"Opera Hotel Antwerp","Opera"],[/^Radisson Blu Astrid/,"Radisson Blu Hotel, Antwerp City Centre","Radisson Blu"]];
|
||
const seenK=new Set();
|
||
const items=DATA.filter(d=>d.ll).filter(d=>{const nw=NU.find(n=>n[0].test(d.hotel));if(!nw)return true;const k=nw[1]+d.ll;if(seenK.has(k))return false;seenK.add(k);return true}).map(d=>{
|
||
d.kc=d.p?CL.findIndex(c=>d.p<c)+1:0;
|
||
const m=L.circleMarker(d.ll,{pane:"hot",radius:d.prec==="adres"?8:6,color:KR[d.kc],weight:2,fillColor:KC[d.kc],fillOpacity:d.prec==="adres"?.95:.55});
|
||
const short=d.hotel.replace(/\s*\([^)]*\)/g,"").replace(/\b(N\.?V\.?|B\.?V\.?|BVBA|CVBA|NV|BV|SA|GmbH|Ltd\.?)\s*$/i,"").replace(/\s+(N\.?V\.?|B\.?V\.?|BVBA|CVBA)\s*$/i,"").trim();
|
||
d.full=short;d.short=labelOf(short);
|
||
const nw=NU.find(n=>n[0].test(d.hotel));if(nw){d.full=nw[1];d.short=nw[2];d.oud=short}
|
||
m.on("popupopen",()=>m.getTooltip()&&m.getTooltip().getElement()&&m.getTooltip().getElement().classList.add("hid"));
|
||
m.on("popupclose",()=>m.getTooltip()&&m.getTooltip().getElement()&&m.getTooltip().getElement().classList.remove("hid"));
|
||
m.bindPopup(()=>{const prijs=d.p?`<div class="pr"><i class="pd" style="background:${KC[d.kc]};border-color:${KR[d.kc]}"></i>${T().lgr[d.kc]}/${T().night}${d.bf?" ("+T().inc+")":""}</div>`:"";
|
||
return `<div class="pt">${esc(d.full)}</div>${d.oud?`<div class="po">${T().old}: ${esc(d.oud)}</div>`:""}<div class="pa">${esc(placeOf(d))}</div>${prijs}`});
|
||
m.bindTooltip(esc(d.short),{permanent:true,direction:"right",offset:[d.prec==="adres"?4:2,0],className:"lab"});
|
||
d.m=m;return d;
|
||
});
|
||
const UA=[
|
||
{k:"R",n:"R-blok",a:"Rodestraat 14",ll:[51.2235,4.41368],w:"Filosofie"},
|
||
{k:"D",n:"D-blok",a:"Grote Kauwenberg 18",ll:[51.223,4.41128],w:""},
|
||
{k:"S",n:"S-blok (Grauwzustersklooster)",a:"Lange Sint-Annastraat 7",ll:[51.2208993,4.413989],w:"doctoraatsverdedigingen en events"},
|
||
{k:"M",n:"M-blok",a:"Sint-Jacobstraat",ll:[51.22027,4.409631],w:""},
|
||
{k:"KS",n:"KS-blok (Kattenstraat)",a:"Kattenstraat 10",ll:[51.2215,4.41142],w:""},
|
||
{k:"SJ",n:"SJ-blok (Brantijser)",a:"Sint-Jacobsmarkt 13",ll:[51.220653,4.41085],w:"Geschiedenis"}];
|
||
UA.forEach(u=>L.marker(u.ll,{zIndexOffset:1000,icon:L.divIcon({className:"",html:`<div class="ua">${u.k}</div>`,iconSize:[26,26],iconAnchor:[13,13]})}).addTo(map).bindPopup(()=>`<b>${u.n}</b><br>${T().ua}<br>${u.a}${u.w?"<br><small>"+tr("w",u.w)+"</small>":""}`));
|
||
const q=document.getElementById("q"),res=document.getElementById("res");
|
||
let hits=[],sel=-1;
|
||
items.forEach(d=>layer.addLayer(d.m));
|
||
const home=L.latLngBounds(items.filter(d=>d.tab==="Antwerpen").map(d=>d.ll).concat(UA.map(u=>u.ll)));
|
||
map.fitBounds(home.pad(.15),{maxZoom:15,animate:false});map.setView([51.2200,4.4120],Math.min(map.getZoom()+2,15),{animate:false});
|
||
function suggest(){
|
||
const t=q.value.trim().toLowerCase();
|
||
res.innerHTML="";hits=[];sel=-1;
|
||
if(!t||document.activeElement!==q&&!t)return;
|
||
hits=items.filter(d=>(d.hotel+" "+d.short+" "+d.full+" "+d.adres+" "+d.stad+" "+d.land+" "+tr("stad",d.stad)+" "+tr("land",d.land)).toLowerCase().includes(t)).slice(0,30);
|
||
hits.forEach((d,i)=>{const li=document.createElement("li");
|
||
li.innerHTML=`<i style="background:${REG[d.tab][1]}"></i><div><b>${esc(d.full)}</b><span>${esc(placeOf(d))}</span></div>`;
|
||
li.onmousedown=e=>{e.preventDefault();pick(i)};res.append(li)});
|
||
if(!hits.length)res.innerHTML=`<li><span>${T().none}</span></li>`;
|
||
}
|
||
function pick(i){
|
||
const d=hits[i];if(!d)return;
|
||
map.setView(d.ll,Math.max(map.getZoom(),d.prec==="stad"?10:16));if(d.hidden){delete off[d.kc];applyFilter()}d.m.openPopup();
|
||
q.value=d.full;res.innerHTML="";q.blur();
|
||
}
|
||
q.addEventListener("input",suggest);
|
||
q.addEventListener("focus",suggest);
|
||
q.addEventListener("blur",()=>setTimeout(()=>{res.innerHTML=""},150));
|
||
q.addEventListener("keydown",e=>{
|
||
const lis=[...res.children];
|
||
if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault();if(!hits.length)return;sel=(sel+(e.key==="ArrowDown"?1:-1)+hits.length)%hits.length;lis.forEach((l,i)=>l.classList.toggle("on",i===sel));lis[sel].scrollIntoView({block:"nearest"})}
|
||
else if(e.key==="Enter"){pick(sel>=0?sel:0)}
|
||
else if(e.key==="Escape"){q.value="";res.innerHTML="";q.blur()}
|
||
});
|
||
const lg=document.getElementById("lg"),off={},counts={0:0,1:0,2:0,3:0,4:0};
|
||
function renderLegend(){
|
||
lg.innerHTML=`<b>${T().lgt}</b>`+KORDER.map(k=>`<div class="fr${off[k]?" fo":""}" data-k="${k}"><i style="background:${KC[k]};border-color:${KR[k]}"></i><span>${T().lgr[k]}</span><em>${counts[k]}</em></div>`).join("")+`<div class="fa">${T().lga}</div>`;
|
||
}
|
||
function updateCounts(){
|
||
const b=map.getBounds();KORDER.forEach(k=>counts[k]=0);
|
||
items.forEach(d=>{if(b.contains(d.ll))counts[d.kc]++});
|
||
lg.querySelectorAll(".fr").forEach(r=>{r.lastElementChild.textContent=counts[r.dataset.k]});
|
||
}
|
||
function applyFilter(){
|
||
items.forEach(d=>{const h=!!off[d.kc];d.hidden=h;if(h)layer.removeLayer(d.m);else layer.addLayer(d.m)});
|
||
lg.querySelectorAll(".fr").forEach(r=>r.classList.toggle("fo",!!off[r.dataset.k]));
|
||
declutter();
|
||
}
|
||
lg.addEventListener("click",e=>{
|
||
const r=e.target.closest(".fr"),a=e.target.closest(".fa");
|
||
if(r){const k=+r.dataset.k,n=KORDER.filter(x=>off[x]).length;
|
||
if(!n)KORDER.forEach(x=>{if(x!==k)off[x]=true});
|
||
else{if(off[k])delete off[k];else off[k]=true;if(KORDER.every(x=>off[x]))KORDER.forEach(x=>delete off[x])}
|
||
applyFilter()}
|
||
else if(a){KORDER.forEach(x=>delete off[x]);applyFilter()}
|
||
});
|
||
L.DomEvent.disableClickPropagation(lg);L.DomEvent.disableScrollPropagation(lg);
|
||
const langBoxes=[document.getElementById("lang"),lvCtl.getContainer()];
|
||
langBoxes.forEach(b=>{b.innerHTML=["nl","en"].map(l=>`<button type="button" data-l="${l}">${l.toUpperCase()}</button>`).join("");b.onclick=e=>{const l=e.target.dataset&&e.target.dataset.l;if(!l||l===lang)return;lang=l;try{localStorage.lang=lang}catch(e){}applyLang()}});
|
||
function applyLang(){document.documentElement.lang=lang;document.title=T().title;q.placeholder=T().ph;q.setAttribute("aria-label",T().ph);langBoxes.forEach(b=>{b.setAttribute("aria-label",T().lgl);b.querySelectorAll("button").forEach(x=>x.setAttribute("aria-pressed",x.dataset.l===lang))});res.innerHTML="";map.closePopup();renderLegend()}
|
||
applyLang();
|
||
const FAVO=/citybox|franq/i;
|
||
const rank=d=>(FAVO.test(d.hotel)?0:2)+(d.prec!=="adres"?1:0);
|
||
const allOrder=items.slice().sort((a,b)=>rank(a)-rank(b));
|
||
function declutter(){
|
||
const order=allOrder.filter(d=>!d.hidden);
|
||
const els=order.map(d=>d.m.getTooltip().getElement());
|
||
els.forEach(e=>{if(e){e.classList.remove("hd");e.style.marginLeft="";e.style.marginTop=""}});
|
||
if(map.getZoom()<15)return;
|
||
const o=document.getElementById("map").getBoundingClientRect();
|
||
const dots=order.map(d=>{const p=map.latLngToContainerPoint(d.ll),r=d.prec==="adres"?8:6;
|
||
return{left:o.left+p.x-r,right:o.left+p.x+r,top:o.top+p.y-r,bottom:o.top+p.y+r}});
|
||
const rects=els.map(e=>e?e.getBoundingClientRect():null),placed=[];
|
||
const hit=(r,q)=>r.left<q.right+2&&r.right+2>q.left&&r.top<q.bottom+1&&r.bottom+1>q.top;
|
||
const dotClash=(c,own)=>dots.some((q,j)=>j!==own&&hit(c,q));
|
||
/* a label must sit closer to its own dot than to any other dot, so it is never ambiguous which dot it names */
|
||
const dist=(c,q)=>{const x=(q.left+q.right)/2,y=(q.top+q.bottom)/2;return Math.hypot(Math.max(c.left-x,0,x-c.right),Math.max(c.top-y,0,y-c.bottom))};
|
||
const ownest=(c,own)=>{const d=dist(c,dots[own]);return dots.every((q,j)=>j===own||dist(c,q)>d+3)};
|
||
const options=i=>{const r=rects[i],w=r.width,h=r.height,G=(order[i].prec==="adres"?8:6)+2;
|
||
return[[0,0],[-(w+2*G),0],[0,-(h/2+G)],[0,h/2+G],[-(w+2*G),-(h/2+G)],[-(w+2*G),h/2+G],[-(w/2+G),-(h/2+G)],[-(w/2+G),h/2+G]]
|
||
.map(([dx,dy])=>({dx,dy,left:r.left+dx,right:r.right+dx,top:r.top+dy,bottom:r.bottom+dy})).filter(c=>!dotClash(c,i)&&ownest(c,i))};
|
||
const put=(i,c)=>{const p=placed.find(x=>x.i===i);if(p)p.c=c;else placed.push({i,c})};
|
||
els.forEach((e,i)=>{const r=rects[i];if(!e||!r||!r.width)return;
|
||
const opts=options(i);
|
||
const free=opts.find(c=>!placed.some(p=>hit(c,p.c)));
|
||
if(free){put(i,free);return}
|
||
/* repair: move one blocking label to another free spot, then take its place */
|
||
for(const c of opts){
|
||
const blockers=placed.filter(p=>hit(c,p.c));
|
||
if(blockers.length!==1)continue;
|
||
const p=blockers[0],alt=options(p.i).find(a=>!hit(a,c)&&!placed.some(x=>x!==p&&hit(a,x.c)));
|
||
if(alt){p.c=alt;put(i,c);return}
|
||
}
|
||
e.classList.add("hd");
|
||
});
|
||
placed.forEach(p=>{const e=els[p.i];if(p.c.dx)e.style.marginLeft=(p.c.dx+6)+"px";if(p.c.dy)e.style.marginTop=p.c.dy+"px"});
|
||
}
|
||
const setLab=()=>{const c=document.getElementById("map").classList;c.toggle("zl",map.getZoom()>=15);c.toggle("zs",map.getZoom()<14);c.toggle("zh",map.getZoom()<12);declutter()};
|
||
map.on("zoomend",setLab);off[0]=off[3]=off[4]=true;applyFilter();setLab();
|
||
map.on("moveend zoomend",updateCounts);updateCounts();
|
||
</script>
|
||
</body>
|
||
</html>
|