-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.html
More file actions
604 lines (539 loc) · 28.1 KB
/
map.html
File metadata and controls
604 lines (539 loc) · 28.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Datacenter Connectivity kaart - Nextpertise</title>
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.css" />
<!-- Leaflet JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.js"></script>
<!-- Barlow font -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Barlow:wght@400;600;700;800&display=swap" rel="stylesheet" />
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Barlow', sans-serif !important;
}
:root {
--np-blue: #0070BA;
--np-green: #4CAF50;
--np-blue-light: rgba(0, 112, 186, 0.15);
--np-green-light: rgba(76, 175, 80, 0.15);
--np-blue-dark: #005a96;
--np-green-dark: #388E3C;
}
html, body {
height: 100%;
font-family: 'Barlow', sans-serif;
background: #f0f4f8;
}
/* ── View toggle (fixed top-right) ── */
.view-toggle {
position: fixed;
top: 16px;
right: 16px;
z-index: 2000;
display: flex;
background: #ffffff;
border-radius: 8px;
padding: 3px;
gap: 2px;
box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.view-toggle button {
display: flex;
align-items: center;
gap: 6px;
border: none;
background: transparent;
padding: 7px 14px;
border-radius: 6px;
font-size: 13px;
font-weight: 600;
color: #6b7a99;
cursor: pointer;
transition: all 0.15s;
}
.view-toggle button.active {
background: var(--np-blue);
color: #ffffff;
}
.view-toggle button svg {
flex-shrink: 0;
}
/* ── Views ── */
.view-container {
display: flex;
flex-direction: column;
height: 100vh;
}
.view-container.hidden {
display: none;
}
/* ── Map ── */
#map {
width: 100%;
height: 100%;
}
/* ── List view ── */
.list-container {
flex: 1;
overflow-y: auto;
padding: 20px 24px;
}
.list-count {
font-size: 12px;
color: #6b7a99;
margin-bottom: 14px;
font-weight: 600;
}
.locations-table {
width: 100%;
border-collapse: collapse;
background: #ffffff;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}
.locations-table thead {
background: #f8fafc;
}
.locations-table th {
padding: 11px 16px;
text-align: left;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.07em;
text-transform: uppercase;
color: #6b7a99;
border-bottom: 1px solid #e2e8f0;
cursor: pointer;
white-space: nowrap;
user-select: none;
}
.locations-table th:hover {
color: #1a2233;
}
.sort-indicator {
display: inline-block;
margin-left: 4px;
opacity: 0.5;
font-size: 10px;
}
.sort-indicator.active {
opacity: 1;
color: var(--np-blue);
}
.locations-table tbody tr {
border-bottom: 1px solid #f0f4f8;
transition: background 0.1s;
}
.locations-table tbody tr:last-child {
border-bottom: none;
}
.locations-table tbody tr:hover {
background: #f8fafc;
}
.locations-table td {
padding: 12px 16px;
font-size: 13px;
color: #1a2233;
vertical-align: middle;
}
.table-name {
font-weight: 600;
}
.table-address {
color: #6b7a99;
font-size: 12px;
}
.table-badge {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.05em;
padding: 3px 9px;
border-radius: 20px;
white-space: nowrap;
}
.table-badge-dot {
width: 7px;
height: 7px;
border-radius: 50%;
flex-shrink: 0;
}
.table-badge.dwdm { background: var(--np-blue-light); color: var(--np-blue-dark); }
.table-badge.ethernet { background: var(--np-green-light); color: var(--np-green-dark); }
.table-badge.dwdm .table-badge-dot { background: var(--np-blue); }
.table-badge.ethernet .table-badge-dot { background: var(--np-green); }
.table-flag {
font-size: 16px;
margin-right: 4px;
}
/* ── Leaflet popup overrides ── */
.leaflet-popup-content-wrapper {
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
padding: 0;
overflow: hidden;
}
.leaflet-popup-content {
margin: 0;
min-width: 220px;
}
.leaflet-popup-tip-container {
display: none;
}
.popup-inner {
padding: 16px 18px;
}
.popup-header {
display: flex;
align-items: flex-start;
gap: 10px;
margin-bottom: 10px;
}
.popup-type-dot {
width: 10px;
height: 10px;
border-radius: 50%;
flex-shrink: 0;
margin-top: 4px;
}
.popup-type-dot.dwdm { background: var(--np-blue); }
.popup-type-dot.ethernet { background: var(--np-green); }
.popup-name {
font-size: 14px;
font-weight: 700;
color: #1a2233;
line-height: 1.3;
font-family: 'Barlow', sans-serif;
}
.popup-address {
font-size: 12px;
color: #6b7a99;
margin-bottom: 10px;
padding-left: 20px;
font-family: 'Barlow', sans-serif;
}
.popup-badge {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
padding: 3px 8px;
border-radius: 20px;
margin-left: 20px;
margin-bottom: 6px;
font-family: 'Barlow', sans-serif;
}
.popup-badge.dwdm { background: var(--np-blue-light); color: var(--np-blue-dark); }
.popup-badge.ethernet { background: var(--np-green-light); color: var(--np-green-dark); }
/* ── Map legend ── */
.map-legend {
background: #ffffff;
border-radius: 12px;
padding: 14px 18px;
box-shadow: 0 2px 16px rgba(0,0,0,0.13);
font-family: 'Barlow', sans-serif;
min-width: 190px;
}
.map-legend-title {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #6b7a99;
margin-bottom: 10px;
}
.map-legend-item {
display: flex;
align-items: center;
gap: 10px;
font-size: 13px;
font-weight: 500;
color: #1a2233;
margin-bottom: 8px;
}
.map-legend-item:last-child {
margin-bottom: 0;
}
.map-legend-dot {
width: 14px;
height: 14px;
border-radius: 50%;
flex-shrink: 0;
border: 2px solid rgba(0,0,0,0.15);
}
.map-legend-dot.dwdm { background: var(--np-blue); border-color: var(--np-blue-dark); }
.map-legend-dot.ethernet { background: var(--np-green); border-color: var(--np-green-dark); }
</style>
</head>
<body>
<!-- View toggle -->
<div class="view-toggle">
<button id="btn-map" class="active" onclick="switchView('map')">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polygon points="3 6 9 3 15 6 21 3 21 18 15 21 9 18 3 21"/><line x1="9" y1="3" x2="9" y2="18"/><line x1="15" y1="6" x2="15" y2="21"/></svg>
Kaart
</button>
<button id="btn-list" onclick="switchView('list')">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>
Lijst
</button>
</div>
<!-- Map View -->
<div id="view-map" class="view-container">
<div id="map"></div>
</div>
<!-- List View -->
<div id="view-list" class="view-container hidden">
<div class="list-container">
<div class="list-count" id="list-count"></div>
<table class="locations-table">
<thead>
<tr>
<th onclick="sortTable('name')">Naam <span class="sort-indicator active" id="sort-name">▲</span></th>
<th onclick="sortTable('city')">Stad <span class="sort-indicator" id="sort-city">▲</span></th>
<th onclick="sortTable('country')">Land <span class="sort-indicator" id="sort-country">▲</span></th>
<th onclick="sortTable('address')">Adres <span class="sort-indicator" id="sort-address">▲</span></th>
<th onclick="sortTable('type')">Product Type <span class="sort-indicator" id="sort-type">▲</span></th>
</tr>
</thead>
<tbody id="table-body"></tbody>
</table>
</div>
</div>
<script>
const COUNTRY_FLAGS = { NL:'🇳🇱' };
const datacenters = [
// ── DWDM, Ethernet ──────────────────────────────────
{ name: 'Bytesnet Rotterdam', address: 'Schuttevaerweg 48', city: 'Rotterdam', country: 'NL', lat: 51.930144, lng: 4.414046, type: 'dwdm' },
{ name: 'Cellnex Datacenter Alphen aan den Rijn', address: 'Energieweg 4', city: 'Alphen aan den Rijn', country: 'NL', lat: 52.136933, lng: 4.646501, type: 'dwdm' },
{ name: 'Cellnex Datacenter Amsterdam', address: 'Barbara Strozzilaan 251', city: 'Amsterdam', country: 'NL', lat: 52.336273, lng: 4.886635, type: 'dwdm' },
{ name: 'Cellnex Datacenter Hilversum', address: 'Witte Kruislaan 47-A', city: 'Hilversum', country: 'NL', lat: 52.242621, lng: 5.164383, type: 'dwdm' },
{ name: 'Cellnex Datacenter IJsselstein', address: 'Hoge Biezendijk 21', city: 'IJsselstein', country: 'NL', lat: 52.002407, lng: 5.050569, type: 'dwdm' },
{ name: 'Cellnex Datacenter Rotterdam', address: 'Anthony Fokkerweg 40', city: 'Rotterdam', country: 'NL', lat: 51.875343, lng: 4.449031, type: 'dwdm' },
{ name: 'ColoCenter Zoetermeer', address: 'Heliumstraat 200', city: 'Zoetermeer', country: 'NL', lat: 52.033382, lng: 4.496007, type: 'dwdm' },
{ name: 'Digital Realty AMS10 (Interxion)', address: 'Pudongweg 25', city: 'Rozenburg', country: 'NL', lat: 52.2747, lng: 4.742199, type: 'dwdm' },
{ name: 'Digital Realty AMS11 (Interxion)', address: 'Koolhovenlaan 35-45', city: 'Schiphol-Rijk', country: 'NL', lat: 52.2849, lng: 4.766573, type: 'dwdm' },
{ name: 'Digital Realty AMS17 Amsterdam', address: 'Science Park 120', city: 'Amsterdam', country: 'NL', lat: 52.356353, lng: 4.951609, type: 'dwdm' },
{ name: 'Digital Realty AMS3 (Interxion)', address: 'Cessnalaan 1-33', city: 'Schiphol-Rijk', country: 'NL', lat: 52.284088, lng: 4.771295, type: 'dwdm' },
{ name: 'Digital Realty AMS5 (Interxion)', address: 'Tupolevlaan 101', city: 'Schiphol-Rijk', country: 'NL', lat: 52.280066, lng: 4.754277, type: 'dwdm' },
{ name: 'Digital Realty AMS6 (Interxion)', address: 'Koolhovenlaan 25', city: 'Schiphol-Rijk', country: 'NL', lat: 52.285321, lng: 4.765982, type: 'dwdm' },
{ name: 'Digital Realty AMS7 (Interxion)', address: 'Cessnalaan 50', city: 'Schiphol-Rijk', country: 'NL', lat: 52.281669, lng: 4.766306, type: 'dwdm' },
{ name: 'Digital Realty AMS8 (Interxion)', address: 'Pudongweg 37', city: 'Rozenburg', country: 'NL', lat: 52.276161, lng: 4.743312, type: 'dwdm' },
{ name: 'Digital Realty AMS9 (Interxion)', address: 'Science Park 121', city: 'Amsterdam', country: 'NL', lat: 52.356105, lng: 4.952727, type: 'dwdm' },
{ name: 'Equinix AM1 - Amsterdam', address: 'Luttenbergweg 4', city: 'Amsterdam', country: 'NL', lat: 52.299929, lng: 4.943121, type: 'dwdm' },
{ name: 'Equinix AM11 - Amsterdam', address: 'Lemelerbergweg 28', city: 'Amsterdam', country: 'NL', lat: 52.303846, lng: 4.93928, type: 'dwdm' },
{ name: 'Equinix AM2 - Amsterdam', address: 'Luttenbergweg 4', city: 'Amsterdam', country: 'NL', lat: 52.299929, lng: 4.943121, type: 'dwdm' },
{ name: 'Equinix AM3 - Amsterdam', address: 'Science Park 610', city: 'Amsterdam', country: 'NL', lat: 52.354686, lng: 4.958827, type: 'dwdm' },
{ name: 'Equinix AM4 - Amsterdam', address: 'Science Park 610', city: 'Amsterdam', country: 'NL', lat: 52.354686, lng: 4.958827, type: 'dwdm' },
{ name: 'Equinix AM5 - Amsterdam', address: 'Schepenbergweg 42', city: 'Amsterdam', country: 'NL', lat: 52.293351, lng: 4.945054, type: 'dwdm' },
{ name: 'Equinix AM6 - Amsterdam', address: 'Duivendrechtsekade 80A', city: 'Amsterdam', country: 'NL', lat: 52.337204, lng: 4.934929, type: 'dwdm' },
{ name: 'Equinix AM7 - Amsterdam', address: 'Kuiperbergweg 13', city: 'Amsterdam', country: 'NL', lat: 52.303078, lng: 4.938009, type: 'dwdm' },
{ name: 'Eurofiber Datacenter Brabant (Dataplace)', address: 'Gragtmansstraat 1B', city: 'Waalwijk', country: 'NL', lat: 51.695715, lng: 5.037861, type: 'dwdm' },
{ name: 'Eurofiber Datacenter Nedzone (Dataplace)', address: 'Drukkerij 6', city: 'Steenbergen', country: 'NL', lat: 51.587535, lng: 4.305055, type: 'dwdm' },
{ name: 'Eurofiber Datacenter Rotterdam (Dataplace)', address: 'van Coulsterweg 6', city: 'Alblasserdam', country: 'NL', lat: 51.845913, lng: 4.679147, type: 'dwdm' },
{ name: 'Eurofiber Datacenter Utrecht (Dataplace)', address: 'Koningin Wilhelminaweg 471', city: 'Groenekan', country: 'NL', lat: 52.122761, lng: 5.143087, type: 'dwdm' },
{ name: 'Global Switch Amsterdam', address: 'Johan Huizingalaan 759', city: 'Amsterdam', country: 'NL', lat: 52.343984, lng: 4.828711, type: 'dwdm' },
{ name: 'KPN DC2 Amsterdam', address: 'Barbara Strozzilaan 251', city: 'Amsterdam', country: 'NL', lat: 52.336411, lng: 4.887411, type: 'dwdm' },
{ name: 'Mediagateway Hilversum', address: 'Koos Postemalaan 2', city: 'Hilversum', country: 'NL', lat: 52.241526, lng: 5.169722, type: 'dwdm' },
{ name: 'NIKHEF Amsterdam', address: 'Science Park 105', city: 'Amsterdam', country: 'NL', lat: 52.356394, lng: 4.950837, type: 'dwdm' },
{ name: 'NorthC Aalsmeer', address: 'Lakenblekerstraat 13', city: 'Aalsmeer', country: 'NL', lat: 52.259795, lng: 4.774186, type: 'dwdm' },
{ name: 'NorthC Almere', address: 'Rondebeltweg 62', city: 'Almere', country: 'NL', lat: 52.364353, lng: 5.268793, type: 'dwdm' },
{ name: 'NorthC Amsterdam 1', address: 'Kabelweg 48 A', city: 'Amsterdam', country: 'NL', lat: 52.392977, lng: 4.849211, type: 'dwdm' },
{ name: 'NorthC Delft', address: 'Heertjeslaan 1', city: 'Delft', country: 'NL', lat: 51.987103, lng: 4.377522, type: 'dwdm' },
{ name: 'NorthC Nieuwegein', address: 'Frieslandhaven 6', city: 'Nieuwegein', country: 'NL', lat: 52.018332, lng: 5.104366, type: 'dwdm' },
{ name: 'NorthC Oude Meer', address: 'Fokkerweg 300', city: 'Oude Meer', country: 'NL', lat: 52.29257, lng: 4.788162, type: 'dwdm' },
{ name: 'NorthC Rotterdam Waalhaven', address: 'Anthony Fokkerweg 40', city: 'Rotterdam', country: 'NL', lat: 51.875375, lng: 4.448346, type: 'dwdm' },
{ name: 'NorthC Rotterdam Zestienhoven 1', address: 'Tempelhof 5-11', city: 'Rotterdam', country: 'NL', lat: 51.953104, lng: 4.448025, type: 'dwdm' },
{ name: 'Smartdc Rotterdam', address: 'Van Nelleweg 1', city: 'Rotterdam', country: 'NL', lat: 51.923689, lng: 4.432138, type: 'dwdm' },
{ name: 'Spaanse Kubus Rotterdam', address: 'Vlaardingweg 62 - 415', city: 'Rotterdam', country: 'NL', lat: 51.930359, lng: 4.414322, type: 'dwdm' },
{ name: 'Switch Datacenters AMS2 Woerden', address: 'Polanerbaan 1', city: 'Woerden', country: 'NL', lat: 52.0818, lng: 4.892822, type: 'dwdm' },
// ── Ethernet ─────────────────────────────────────────
{ name: 'BIT-1', address: 'Kelvinstraat 63', city: 'Ede', country: 'NL', lat: 52.030762, lng: 5.624974, type: 'ethernet' },
{ name: 'BIT-2', address: 'Galileilaan 19', city: 'Ede', country: 'NL', lat: 52.027212, lng: 5.623903, type: 'ethernet' },
{ name: 'Bytesnet Groningen', address: 'De Bunders 1', city: 'Groningen', country: 'NL', lat: 53.244613, lng: 6.527313, type: 'ethernet' },
{ name: 'Cellnex Hoogersmilde', address: 'Van Veenstraat 26', city: 'Hoogersmilde', country: 'NL', lat: 52.902797, lng: 6.403537, type: 'ethernet' },
{ name: 'Cellnex Lelystad', address: 'Oostvaardersdijk 2', city: 'Lelystad', country: 'NL', lat: 52.5051101, lng: 5.422272, type: 'ethernet' },
{ name: 'Cellnex Roermond', address: 'Op de Meuleberg', city: 'Roermond', country: 'NL', lat: 51.183723, lng: 5.976598, type: 'ethernet' },
{ name: 'Cellnex Roosendaal', address: 'Melis Stokelaan 25', city: 'Roosendaal', country: 'NL', lat: 51.522857, lng: 4.460736, type: 'ethernet' },
{ name: 'Cellnex Zwolle', address: 'Bergkloosterweg 62', city: 'Zwolle', country: 'NL', lat: 52.532012, lng: 6.135752, type: 'ethernet' },
{ name: 'Colt Roosendaal', address: 'Argonweg 9', city: 'Roosendaal', country: 'NL', lat: 51.539367, lng: 4.506562, type: 'ethernet' },
{ name: 'Datacenter Groningen', address: 'Beneluxweg 4', city: 'Zuidbroek', country: 'NL', lat: 53.166848, lng: 6.864589, type: 'ethernet' },
{ name: 'Datacenter Noord Holland', address: 'Professor van der Waalsstraat 1', city: 'Alkmaar', country: 'NL', lat: 52.624958, lng: 4.769753, type: 'ethernet' },
{ name: 'Datacenter.com', address: 'Keienbergweg 22', city: 'Amsterdam', country: 'NL', lat: 52.309522, lng: 4.936011, type: 'ethernet' },
{ name: 'DFDC Den Haag THG1', address: 'Moezel 5', city: 'The Hague', country: 'NL', lat: 52.064706, lng: 4.387171, type: 'ethernet' },
{ name: 'Digital Realty AMS18 Amsterdam', address: 'H.J.E. Wenckebachweg 127', city: 'Amsterdam', country: 'NL', lat: 52.332165, lng: 4.923265, type: 'ethernet' },
{ name: 'EdgeConneX Amsterdam (EDCAMS01)', address: 'Koolhovenlaan 12', city: 'Amsterdam', country: 'NL', lat: 52.286093, lng: 4.768444, type: 'ethernet' },
{ name: 'EFX', address: 'Prof Dr Dorgelolaan 40', city: 'Eindhoven', country: 'NL', lat: 51.445601, lng: 5.494271, type: 'ethernet' },
{ name: 'Equans Maastricht', address: 'Amerikalaan 35', city: 'Maastricht-Airport', country: 'NL', lat: 50.928065, lng: 5.781152, type: 'ethernet' },
{ name: 'Equinix AM8 - Amsterdam', address: 'Gyroscoopweg 2E - 2F', city: 'Amsterdam', country: 'NL', lat: 52.396814, lng: 4.838579, type: 'ethernet' },
{ name: 'Equinix EN1 - Enschede', address: 'Auke Vleerstraat 1', city: 'Enschede', country: 'NL', lat: 52.236979, lng: 6.84964, type: 'ethernet' },
{ name: 'Equinix ZW1 - Zwolle', address: 'Telfordstraat 3', city: 'Zwolle', country: 'NL', lat: 52.488492, lng: 6.142697, type: 'ethernet' },
{ name: 'Eurofiber Datacenter Amsterdam', address: 'Parellaan 9', city: 'Hoofddorp', country: 'NL', lat: 52.290393, lng: 4.686739, type: 'ethernet' },
{ name: 'Eurofiber Datacenter Arnhem (Dataplace)', address: 'Tivolilaan 251', city: 'Arnhem', country: 'NL', lat: 51.987004, lng: 5.934036, type: 'ethernet' },
{ name: 'Eurofiber Datacenter Hoofddorp (Dataplace)', address: 'Parellaan 9', city: 'Hoofddorp', country: 'NL', lat: 52.290377, lng: 4.687071, type: 'ethernet' },
{ name: 'Global-e Datacenter', address: 'Haansbergseweg 12', city: 'Rijen', country: 'NL', lat: 51.579078, lng: 4.929288, type: 'ethernet' },
{ name: 'Global-e Datacenter', address: 'Haansbergseweg 12', city: 'Rijen', country: 'NL', lat: 51.579078, lng: 4.929288, type: 'ethernet' },
{ name: 'Greenhouse Datacenters Naaldwijk', address: 'Industriestraat 53', city: 'Naaldwijk', country: 'NL', lat: 52.001423, lng: 4.209292, type: 'ethernet' },
{ name: 'Greenhouse Datacenters Naaldwijk', address: 'Industriestraat 53', city: 'Naaldwijk', country: 'NL', lat: 52.001434, lng: 4.209414, type: 'ethernet' },
{ name: 'InterDC', address: 'Josinkstraat 28', city: 'Enschede', country: 'NL', lat: 52.220249, lng: 6.864464, type: 'ethernet' },
{ name: 'InterDC Doetinchem', address: 'Gildenbroederslaan 1', city: 'Doetinchem', country: 'NL', lat: 51.954184, lng: 6.300252, type: 'ethernet' },
{ name: 'InterDC Enschede Marssteden', address: 'Marssteden 110', city: 'Enschede', country: 'NL', lat: 52.216301, lng: 6.820988, type: 'ethernet' },
{ name: 'InterDC Hengelo', address: 'Sherwood Rangers 1', city: 'Hengelo', country: 'NL', lat: 52.267645, lng: 6.791128, type: 'ethernet' },
{ name: 'Iron Mountain Data Centers AMS-1', address: 'J.W. Lucasweg 35', city: 'Haarlem', country: 'NL', lat: 52.391851, lng: 4.665119, type: 'ethernet' },
{ name: 'IT-lockers', address: 'Science Park 5212-5218', city: 'Son', country: 'NL', lat: 51.500663, lng: 5.455931, type: 'ethernet' },
{ name: 'KoloDC NL1 Dronten', address: 'De Linge 26', city: 'Dronten', country: 'NL', lat: 52.543666, lng: 5.705215, type: 'ethernet' },
{ name: 'KoloDC NL2 Meppel', address: 'Ketelskamp 10', city: 'Meppel', country: 'NL', lat: 52.717803, lng: 6.200156, type: 'ethernet' },
{ name: 'KoloDC NL3 Apeldoorn', address: 'Laan van de Ram 39', city: 'Apeldoorn', country: 'NL', lat: 52.247082, lng: 6.00116, type: 'ethernet' },
{ name: 'KoloDC NL4 Amsterdam (Maincubes)', address: 'Capronilaan 2', city: 'Schiphol-Rijk', country: 'NL', lat: 52.282173, lng: 4.771856, type: 'ethernet' },
{ name: 'nLighten AMS1', address: 'Gyroscoopweg 134-140', city: 'Amsterdam', country: 'NL', lat: 52.400302, lng: 4.842072, type: 'ethernet' },
{ name: 'NorthC Eindhoven 1', address: 'High Tech Campus 53', city: 'Eindhoven', country: 'NL', lat: 51.407849, lng: 5.458766, type: 'ethernet' },
{ name: 'NorthC Eindhoven 1', address: 'High Tech Campus 53', city: 'Eindhoven', country: 'NL', lat: 51.407417, lng: 5.458918, type: 'ethernet' },
{ name: 'NorthC Eindhoven 2', address: 'De Schakel 35', city: 'Eindhoven', country: 'NL', lat: 51.475669, lng: 5.40654, type: 'ethernet' },
{ name: 'NorthC Groningen 1', address: 'Liverpoolweg 10', city: 'Groningen', country: 'NL', lat: 53.207695, lng: 6.474052, type: 'ethernet' },
{ name: 'Penta Infra Leeuwarden LEE01', address: 'François Haverschmidtwei 3', city: 'Leeuwarden', country: 'NL', lat: 53.204849, lng: 5.765145, type: 'ethernet' },
{ name: 'Previder PDC1 Hengelo', address: 'Expolaan 50', city: 'Hengelo', country: 'NL', lat: 52.284103, lng: 6.767578, type: 'ethernet' },
{ name: 'Previder PDC2 Hengelo', address: 'Barnsteenstraat 15', city: 'Hengelo', country: 'NL', lat: 52.243834, lng: 6.767264, type: 'ethernet' },
{ name: 'QTS Eemshaven', address: 'Huibertgatweg 2', city: 'Eemshaven', country: 'NL', lat: 53.436824, lng: 6.859166, type: 'ethernet' },
{ name: 'QTS Groningen GRO1', address: 'Zernikelaan 16', city: 'Groningen', country: 'NL', lat: 53.246095, lng: 6.52862, type: 'ethernet' },
{ name: 'Qupra DC', address: 'Nieuwe Hemweg 26', city: 'Amsterdam', country: 'NL', lat: 52.395257, lng: 4.86353, type: 'ethernet' },
{ name: 'RAM-IT', address: 'Ptolemaeuslaan 69', city: 'Utrecht', country: 'NL', lat: 52.069236, lng: 5.078797, type: 'ethernet' },
{ name: 'Rekenhal', address: 'Nettelbosje 1', city: 'Groningen', country: 'NL', lat: 53.238044, lng: 6.536082, type: 'ethernet' },
{ name: 'Systemec Venlo', address: 'Marinus Dammeweg 25', city: 'Venlo', country: 'NL', lat: 51.378696, lng: 6.160082, type: 'ethernet' },
];
// ── State ────────────────────────────────────────────────────────────────
let currentView = 'map';
let sortCol = 'name';
let sortAsc = true;
// ── Map setup ────────────────────────────────────────────────────────────
const NL_BOUNDS = [[50.0, 2.0], [54.5, 8.5]];
const map = L.map('map', {
center: [52.4, 5.3],
zoom: 8,
minZoom: 8,
maxBounds: NL_BOUNDS,
maxBoundsViscosity: 1.0,
zoomControl: true,
attributionControl: true,
});
map.setView([52.4, 5.3], 8);
L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/">CARTO</a>',
subdomains: 'abcd',
maxZoom: 19,
}).addTo(map);
// ── Legend control ───────────────────────────────────────────────────────
const legend = L.control({ position: 'bottomleft' });
legend.onAdd = function () {
const div = L.DomUtil.create('div', 'map-legend');
div.innerHTML = `
<div class="map-legend-title">Product Type</div>
<div class="map-legend-item">
<span class="map-legend-dot dwdm"></span>
DWDM, Ethernet
</div>
<div class="map-legend-item">
<span class="map-legend-dot ethernet"></span>
Ethernet
</div>`;
return div;
};
legend.addTo(map);
function makeIcon(type) {
const color = type === 'dwdm' ? '#0070BA' : '#4CAF50';
const border = type === 'dwdm' ? '#005a96' : '#388E3C';
const svg = `
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<circle cx="9" cy="9" r="7" fill="${color}" stroke="${border}" stroke-width="1.5"/>
<circle cx="9" cy="9" r="3" fill="white" opacity="0.5"/>
</svg>`;
return L.divIcon({ html: svg, className: '', iconSize: [18,18], iconAnchor: [9,9], popupAnchor: [0,-12] });
}
function makePopup(dc) {
const typeLabel = dc.type === 'dwdm' ? 'DWDM, Ethernet' : 'Ethernet';
return `
<div class="popup-inner">
<div class="popup-header">
<div class="popup-type-dot ${dc.type}"></div>
<div class="popup-name">${dc.name}</div>
</div>
<div class="popup-address">${dc.address}, ${dc.city}</div>
<span class="popup-badge ${dc.type}">${typeLabel}</span>
</div>`;
}
// Add all markers to the map
datacenters.forEach(dc => {
const marker = L.marker([dc.lat, dc.lng], { icon: makeIcon(dc.type) });
marker.bindPopup(makePopup(dc), { maxWidth: 280 });
marker.addTo(map);
});
// ── View toggle ──────────────────────────────────────────────────────────
function switchView(view) {
currentView = view;
document.getElementById('view-map').classList.toggle('hidden', view !== 'map');
document.getElementById('view-list').classList.toggle('hidden', view !== 'list');
document.getElementById('btn-map').classList.toggle('active', view === 'map');
document.getElementById('btn-list').classList.toggle('active', view === 'list');
if (view === 'map') {
setTimeout(() => map.invalidateSize(), 50);
} else {
renderTable();
}
}
// ── Table rendering ──────────────────────────────────────────────────────
function sortTable(col) {
if (sortCol === col) {
sortAsc = !sortAsc;
} else {
sortCol = col;
sortAsc = true;
}
['name','city','country','address','type'].forEach(c => {
const el = document.getElementById('sort-' + c);
el.classList.toggle('active', c === sortCol);
if (c === sortCol) el.textContent = sortAsc ? '▲' : '▼';
else el.textContent = '▲';
});
renderTable();
}
function renderTable() {
const sorted = [...datacenters].sort((a, b) => {
const va = a[sortCol].toLowerCase();
const vb = b[sortCol].toLowerCase();
return sortAsc ? va.localeCompare(vb, 'nl') : vb.localeCompare(va, 'nl');
});
document.getElementById('list-count').textContent = `${sorted.length} locatie${sorted.length !== 1 ? 's' : ''}`;
const tbody = document.getElementById('table-body');
tbody.innerHTML = sorted.map(dc => {
const typeLabel = dc.type === 'dwdm' ? 'DWDM, Ethernet' : 'Ethernet';
const flag = COUNTRY_FLAGS[dc.country] || '';
return `
<tr>
<td class="table-name">${dc.name}</td>
<td>${dc.city}</td>
<td><span class="table-flag">${flag}</span>${dc.country}</td>
<td class="table-address">${dc.address}</td>
<td>
<span class="table-badge ${dc.type}">
<span class="table-badge-dot"></span>
${typeLabel}
</span>
</td>
</tr>`;
}).join('');
}
</script>
</body>
</html>