In this section
- MapLibre Worker Bridge render · gridatlas / atlas/releases/202608292311-atlas-v9/202608292311-maplibre-worker-bridge.js lines 1–223
- Releases — Atlas V9 Page render · gridatlas / atlas/releases/202608292311-atlas-v9/index.html lines 1–271
MapLibre Worker Bridge
A JavaScript file in the atlas folder of GridAtlas that reads grid 400kV, grid 275kV and grid 220kV, using SHA-256 from the data-GridAtlas repository. Served with the page at https://gridatlas.globalgrid2050.com/atlas/releases/202608292311-atlas-v9/.
rendergridatlas / atlas/releases/202608292311-atlas-v9/202608292311-maplibre-worker-bridge.js · lines 1–223 of 223 · version 2026-08-29 23:11 · Entry point · pattern queryOnDemand (shared by 5 files)
- What it does
- It loads grid 400kV, grid 275kV, grid 220kV and grid 132kV. Defines 11 functions or classes, including invariant, requestPath, mapReadyKey, legacyStem, sha256Hex. Side effects: changes the web page (DOM); uses storage (browser storage, DuckDB or Parquet).
- Why it exists in the grid workflow
- Domain stage upstream_foresight (path word 'atlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
- Inputs & outputs
- In: data source: data-gridatlas data; GeoJSON file grid_400kv.geojson; GeoJSON file grid_275kv.geojson; GeoJSON file grid_220kv.geojson; GeoJSON file grid_132kv.geojson; GeoJSON file grid_66kv.geojson; GeoJSON file grid_substations.geojson; GeoJSON file power_plants.geojson.
- Downstream impact
- Used directly by 1 file: Releases — Atlas V9 Page (gridatlas, https://gridatlas.globalgrid2050.com/atlas/releases/202608292311-atlas-v9/). Reached from 95 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); Homepage V030 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v030.html). It is itself an entry point, published at https://gridatlas.globalgrid2050.com/atlas/releases/202608292311-atlas-v9/.
- What it achieves
- It maps ready key (`mapReadyKey`), gets manifest (`getManifest`) and gets runtime (`getRuntime`). Defines `invariant`, `requestPath`, `mapReadyKey` and 8 more.
- Why it matters
- Loaded by the Atlas V9 page at https://gridatlas.globalgrid2050.com/atlas/releases/202608292311-atlas-v9/.
- Application
- gridatlas · atlas/releases/202608292311-atlas-v9 · script
- Uses
- Data GridAtlas — Data GridAtlas Page (estate URL)
- Used by
- loaded by Releases — Atlas V9 Page (script src)
- Produces
- invariant, requestPath, mapReadyKey, legacyStem, sha256Hex, getManifest, getRuntime, resolvePartition, rowObject, queryOnDemand, task
- Defines here
- invariant, requestPath, mapReadyKey, legacyStem, sha256Hex, getManifest, getRuntime, resolvePartition, rowObject, queryOnDemand, task
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 atlas/releases/202608292311-atlas-v9/202608292311-maplibre-worker-bridge.js:1-223 · blob a09ad4d3d465ed06323567291d9133916d56674e · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom, storage · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
(() => {
'use strict';
const GENERATION = '202608292311';
const DATA_BASE = 'https://ventusltd.github.io/data-gridatlas/202608291237-data-gridatlas/';
const MANIFEST_URL = `${DATA_BASE}data/manifest.json`;
const MANIFEST_SHA256 = '3246dbdaa042ae8352ec9b7128cb6c2fe65e4f1aba0534302510661828df2526';
const DUCKDB_MODULE = 'https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.29.0/+esm';
const CRITICAL_RELEASE_PATH = 'data/grid_400kv.geojson';
const CRITICAL_RUNTIME_URL = '../cartridges/5f5fbec83f9ce307b47ddc6e7277743f0bba1a2445b0f3ca50a9a1806146e993/grid_400kv.geojson';
const MAP_READY_PATHS = new Set([
'data/grid_400kv.geojson',
'data/grid_275kv.geojson',
'data/grid_220kv.geojson',
'data/grid_132kv.geojson',
'data/grid_66kv.geojson',
'data/grid_substations.geojson',
'data/power_plants.geojson',
'data/industrial_offtakers.geojson',
'data/datacentres.geojson',
'data/airports.geojson',
'data/railways.geojson'
]);
const nativeFetch = window.fetch.bind(window);
const sourceCache = new Map();
let manifestPromise = null;
let runtimePromise = null;
const state = {
schema: 'gridatlas.maplibre-worker-fetch-bridge.v1',
generation: GENERATION,
data_release: '202608291237-data-gridatlas',
architecture: {
map_ready_same_origin_geojson: true,
critical_400kv_maplibre_worker_source: true,
critical_400kv_window_prefetch: false,
critical_400kv_main_thread_json_parse: false,
preload_browser_duckdb: false,
serialized_preload_queue: false,
topology_pre_snapped: true,
analytical_search_duckdb_retained: true
},
critical_source: {
release_copy_path: CRITICAL_RELEASE_PATH,
runtime_url: CRITICAL_RUNTIME_URL,
cache_identity: 'CONTENT_ADDRESSED_STABLE_URL',
delivery: 'MAPLIBRE_WORKER_DIRECT_URL',
eager_window_prefetch: false,
window_fetch_hits: 0
},
map_ready_requests: 0,
map_ready_paths: [...MAP_READY_PATHS],
parquet_requests: 0,
duckdb_runtime_started: false,
duckdb_runtime_started_at_ms: null,
intercepted_on_demand: 0,
loaded_on_demand: {},
failures: []
};
window.__GRIDATLAS_MAP_READY__ = state;
function invariant(condition, message) {
if (!condition) throw new Error(message);
}
function requestPath(input) {
try {
const raw = typeof input === 'string' ? input : input?.url;
return new URL(raw, window.location.href).pathname;
} catch {
return '';
}
}
function mapReadyKey(pathname) {
const marker = '/data/';
const index = pathname.toLowerCase().lastIndexOf(marker);
if (index < 0) return '';
return `data/${decodeURIComponent(pathname.slice(index + marker.length)).toLowerCase()}`;
}
function legacyStem(pathname) {
const name = decodeURIComponent(pathname.split('/').pop() || '').toLowerCase();
if (name === 'repd_master.json') return 'repd_master_v8_oracle';
if (name === 'heavy_emitters_uk.json') return 'heavy_emitters_uk';
if (name.endsWith('.geojson')) return name.slice(0, -8);
return '';
}
async function sha256Hex(bytes) {
const digest = await crypto.subtle.digest('SHA-256', bytes);
return [...new Uint8Array(digest)]
.map(value => value.toString(16).padStart(2, '0'))
.join('');
}
async function getManifest() {
manifestPromise ||= (async () => {
const response = await nativeFetch(MANIFEST_URL, { cache: 'no-store' });
invariant(response.ok, `manifest HTTP ${response.status}`);
const bytes = await response.arrayBuffer();
invariant(await sha256Hex(bytes) === MANIFEST_SHA256, 'data manifest SHA-256 mismatch');
const manifest = JSON.parse(new TextDecoder().decode(bytes));
invariant(manifest?.schema === 'data-gridatlas.v8-transplant-manifest.v1', 'data manifest schema mismatch');
invariant(manifest?.closure?.sources === 56, 'V8 source closure mismatch');
invariant(manifest?.closure?.layers === 60, 'V8 layer closure mismatch');
invariant(manifest?.closure?.features === 541282, 'V8 feature closure mismatch');
return manifest;
})();
return manifestPromise;
}
async function getRuntime() {
runtimePromise ||= (async () => {
state.duckdb_runtime_started = true;
state.duckdb_runtime_started_at_ms = performance.now();
const duckdb = await import(DUCKDB_MODULE);
const bundle = await duckdb.selectBundle(duckdb.getJsDelivrBundles());
invariant(bundle?.mainModule && bundle?.mainWorker, 'DuckDB-WASM bundle unavailable');
const workerUrl = URL.createObjectURL(new Blob([
`importScripts(${JSON.stringify(bundle.mainWorker)});`
], { type: 'text/javascript' }));
const worker = new Worker(workerUrl);
const logger = new duckdb.ConsoleLogger(duckdb.LogLevel.WARNING);
const database = new duckdb.AsyncDuckDB(logger, worker);
try {
await database.instantiate(bundle.mainModule, bundle.pthreadWorker);
} finally {
URL.revokeObjectURL(workerUrl);
}
return { database, worker };
})();
return runtimePromise;
}
async function resolvePartition(pathname) {
const stem = legacyStem(pathname);
invariant(stem, `unsupported V8 data path: ${pathname}`);
const expected = `partitions/${stem}.parquet`.toLowerCase();
const manifest = await getManifest();
const artifact = (manifest.artifacts || []).find(
item => String(item.path || '').toLowerCase() === expected
);
invariant(artifact, `no V9 Parquet partition for V8 source ${pathname}`);
invariant(/^[a-f0-9]{64}$/.test(artifact.sha256 || ''), `bad partition digest for ${artifact.path}`);
return artifact;
}
function rowObject(row) {
return row && typeof row.toJSON === 'function' ? row.toJSON() : row;
}
async function queryOnDemand(pathname) {
if (sourceCache.has(pathname)) return sourceCache.get(pathname);
const task = (async () => {
const artifact = await resolvePartition(pathname);
const parquetUrl = `${DATA_BASE}data/${artifact.path}`;
const { database } = await getRuntime();
const connection = await database.connect();
state.parquet_requests += 1;
try {
const escaped = parquetUrl.replaceAll("'", "''");
const table = await connection.query(`
SELECT source_id, feature_index, feature_id, geometry_json, properties_json
FROM read_parquet('${escaped}')
ORDER BY feature_index
`);
const features = table.toArray().map(raw => {
const row = rowObject(raw);
return {
type: 'Feature',
id: row.feature_id || `${row.source_id}:${row.feature_index}`,
geometry: JSON.parse(String(row.geometry_json)),
properties: JSON.parse(String(row.properties_json || '{}'))
};
});
state.loaded_on_demand[pathname] = {
parquet: artifact.path,
rows: features.length,
sha256: artifact.sha256
};
return { type: 'FeatureCollection', features };
} finally {
await connection.close();
}
})();
sourceCache.set(pathname, task);
try {
return await task;
} catch (error) {
sourceCache.delete(pathname);
state.failures.push({ pathname, message: String(error?.message || error) });
throw error;
}
}
window.fetch = async function gridAtlasMaplibreWorkerFetch(input, init = undefined) {
const pathname = requestPath(input);
const readyKey = mapReadyKey(pathname);
if (MAP_READY_PATHS.has(readyKey)) {
state.map_ready_requests += 1;
if (readyKey === CRITICAL_RELEASE_PATH) state.critical_source.window_fetch_hits += 1;
return nativeFetch(input, { ...(init || {}), cache: 'force-cache' });
}
if (!legacyStem(pathname)) return nativeFetch(input, init);
state.intercepted_on_demand += 1;
if (init?.signal?.aborted) throw new DOMException('Aborted', 'AbortError');
const payload = await queryOnDemand(pathname);
if (init?.signal?.aborted) throw new DOMException('Aborted', 'AbortError');
return new Response(JSON.stringify(payload), {
status: 200,
headers: {
'Content-Type': 'application/geo+json; charset=utf-8',
'Cache-Control': 'private, max-age=3600',
'X-GridAtlas-Data-Plane': 'V9-PARQUET-DUCKDB-ON-DEMAND'
}
});
};
})();Releases — Atlas V9 Page
A web page in GridAtlas that draws grid 400kV, grid 275kV, grid 220kV and grid 132kV. Published at https://gridatlas.globalgrid2050.com/atlas/releases/202608292311-atlas-v9/.
rendergridatlas / atlas/releases/202608292311-atlas-v9/index.html · lines 1–271 of 271 · version 2026-08-29 23:11 · Entry point
- What it does
- It draws grid 400kV, grid 275kV, grid 220kV and grid 132kV. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage upstream_foresight (path word 'atlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: 400kV, 275kV, 220kV, 132kV, 66kV, 11kV. README: "`atlas/index.html` is the stable composer."
- Inputs & outputs
- In: GeoJSON file grid_400kv.geojson; GeoJSON file grid_275kv.geojson; GeoJSON file grid_220kv.geojson; GeoJSON file grid_132kv.geojson; GeoJSON file grid_66kv.geojson; GeoJSON file grid_11kv_ukpn.geojson; GeoJSON file grid_substations.geojson; GeoJSON file power_plants.geojson. Out: web page. Voltage levels named: 400kV, 275kV, 220kV, 132kV, 66kV, 11kV.
- Downstream impact
- Used directly by 8 files: GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); Homepage V030 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v030.html); Homepage V031 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v031.html); Homepage V032 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v032.html); and 4 more. Reached from 87 other entry points, including GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); Homepage V037 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v037.html); Homepage V038 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v038.html). It is itself an entry point, published at https://gridatlas.globalgrid2050.com/atlas/releases/202608292311-atlas-v9/.
- What it achieves
- UK Region v8 (Experimental). Its code works with 100 kW, 11 kV and 132 kV.
- Why it matters
- Loaded by the GlobalGrid2050 Historical Builds map page in GlobalGrid2050 at https://globalgrid2050.com/historical_builds.html and 7 other pages.
- Application
- gridatlas · atlas/releases/202608292311-atlas-v9 · page
- Uses
- Ventus v6 (stylesheet), MapLibre Worker Bridge (script src), Place Postcode Search (script src), Ventus Corev8engine (script src), Pre Snapped Config Adapter (script src), https://cdn.jsdelivr.net/npm/maplibre-gl@3.6.2/dist/maplibre-gl.css, https://cdn.jsdelivr.net/npm/maplibre-gl@3.6.2/dist/maplibre-gl.js
- Used by
- named by URL in GlobalGrid2050 Historical Builds (estate URL), named by URL in Homepage V030 (estate URL), named by URL in Homepage V031 (estate URL), named by URL in Homepage V032 (estate URL), named by URL in Homepage V033 (estate URL), named by URL in Homepage V034 (estate URL), named by URL in Homepage V035 (estate URL), named by URL in Homepage V036 (estate URL)
- Produces
- none declared
- Defines here
- none
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 atlas/releases/202608292311-atlas-v9/index.html:1-271 · blob 0b27ff625f14a5dcccaca4901f481d06cf58e56c · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>GlobalGrid2050 | UK Region v8 (Experimental)</title>
<link href="https://cdn.jsdelivr.net/npm/maplibre-gl@3.6.2/dist/maplibre-gl.css" rel="stylesheet" />
<link href="ventusv8.css" rel="stylesheet" />
</head>
<body>
<div id="fatal-banner">CRITICAL ERROR: SYSTEM DEPENDENCIES FAILED TO LOAD</div>
<button id="btn-fullscreen-exit" onclick="exitFullscreen()">✕ Exit</button>
<div id="fs-curtain-tab">⬇ Layers</div>
<div id="fs-curtain"><div id="fs-curtain-keys"></div></div>
<div id="fs-letterhead">
<div class="ventus-main">Ventus</div>
<div class="ventus-sub">Cables & Connectivity®</div>
</div>
<div class="dashboard">
<div class="hud-header">
<div>
<small style="color:#888">SYSTEM TIME</small><br>
<span class="hud-val" id="clock">--:--:--</span><br>
<span id="date" style="font-size: 11px; color: #888;">--/--/----</span>
</div>
<div class="ventus-brand">
<div class="ventus-main">Ventus</div>
<div class="ventus-sub">Cables & Connectivity®</div>
</div>
<div style="text-align:right"><small style="color:#888">2050 TARGET</small><br><span class="hud-val" id="days" style="color:#ff9d00">-- DAYS</span></div>
</div>
<div class="map-container" id="map-container">
<div id="map"></div>
<div class="custom-map-attrib">
Data © <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener noreferrer">OpenStreetMap contributors</a> | © CARTO | EV data © <a href="https://openchargemap.org" target="_blank" rel="noopener noreferrer">Open Charge Map</a>
</div>
<button id="btn-fullscreen" onclick="enterFullscreen()" title="Fullscreen">⛶</button>
<div class="search-bar-wrapper">
<div style="position:relative">
<input class="search-input" id="search-input" type="text" placeholder="Search project name..." autocomplete="off" />
<div class="search-results" id="search-results"></div>
</div>
<button class="search-btn" id="search-btn">GO</button>
</div>
<div class="map-controls">
<button class="map-ctrl-btn" id="btn-export">⬇ Export CSV</button>
<button class="map-ctrl-btn" id="btn-radius">◎ Radius Search</button>
<button class="map-ctrl-btn" id="btn-radius-area">◵ Radius Area</button>
<button class="map-ctrl-btn" id="btn-zonedraw">⬡ Poly Zone</button>
<button class="map-ctrl-btn" id="btn-status">◑ Status Colours</button>
<button class="map-ctrl-btn" id="btn-measure">📏 Measure</button>
</div>
<div class="radius-popup" id="radius-popup">
<label>Radius from click</label>
<div class="radius-input-row">
<input type="number" id="radius-input" value="10" min="1" max="160" step="1" />
<span class="radius-unit">km</span>
</div>
<div class="radius-hint">1 – 160 km (100 mi) · press Enter to apply</div>
</div>
<div class="radius-popup" id="radius-area-popup">
<label>Measure Area from click</label>
<div class="radius-input-row">
<input type="number" id="radius-area-input" value="1" min="0.001" max="160" step="0.001" />
<span class="radius-unit">km</span>
</div>
<div class="radius-hint">Input radius: 0.001 (1m) to 160 km</div>
</div>
<div class="radius-popup" id="zonedraw-display">
<label class="polyzone-label">🔶 Poly Zone Tool</label>
<div class="radius-input-row">
<input type="number" id="zonedraw-radius-input" value="2" min="0.1" max="160" step="0.1" />
<span class="radius-unit">km</span>
</div>
<div class="radius-hint">Set starting radius, then click map to create zone</div>
<button id="btn-zonedraw-undo" title="Undo last vertex" style="margin-top:8px;background:#ff6600;color:#000;border:none;padding:6px 12px;border-radius:4px;cursor:pointer;font-weight:bold;font-size:12px;">↩ Undo Point</button>
</div>
<div id="measure-display">
<div class="m-row" id="m-line" style="display:none">━━ <span id="m-km"></span> km | <span id="m-m"></span> m | <span id="m-mi"></span> mi</div>
<div class="m-row" id="m-perim" style="display:none">Perimeter: <span id="m-pkm"></span> km | <span id="m-pm"></span> m</div>
<div class="m-row" id="m-area" style="display:none">Area: <span id="m-km2"></span> km² | <span id="m-ha"></span> ha | <span id="m-ac"></span> ac</div>
<div class="m-hint" id="m-hint">Click to add points · Double-click to close polygon</div>
<button id="btn-measure-undo" title="Undo last point">↩ Undo Point</button>
</div>
<div id="polyzone-display">
<div class="m-row" id="pz-area" style="display:none">
<span id="pz-km2"></span> km² · <span id="pz-ha"></span> ha<br>
<span id="pz-ac"></span> ac · <span id="pz-mi2"></span> mi²<br>
<span id="pz-m2"></span> m²<br>
<span style="color:#ffae00">⚽ <span id="pz-pitch"></span> pitches</span>
</div>
<div class="m-row" id="pz-perim" style="display:none">
<span style="color:#555;font-size:9px">perimeter <span id="pz-pkm"></span> km</span>
</div>
<div class="m-hint" id="pz-hint">Click map to drop circle</div>
<button id="btn-polyzone-undo" title="Undo last vertex">↩ Undo Vertex</button>
</div>
<div class="podcast-shoutout">In support of The Future of Solar Photovoltaics podcast<br>& all participants to date</div>
</div>
<div class="scada-wrapper">
<div class="scada-brand">
<div>
<div class="scada-brand-main">Ventus</div>
<div class="scada-brand-sub">Cables & Connectivity®</div>
</div>
<div class="scada-brand-tag">globalgrid2050.com | open infrastructure intelligence</div>
</div>
<div class="status-legend">
<div class="status-dot"><span style="background:#00ff88"></span>Operational</div>
<div class="status-dot"><span style="background:#ffcc00"></span>Under Construction</div>
<div class="status-dot"><span style="background:#ff8800"></span>Consented</div>
<div class="status-dot"><span style="background:#8888ff"></span>Applied</div>
</div>
<div class="scada-keys" id="scada-ui-container"></div>
<div class="disclaimer-box">
This interface is based on publicly available and open source infrastructure data, including public energy datasets such as REPD where applicable. It is presented for analytical and visualisation purposes only and does not include live operational or other non public operational data.
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/maplibre-gl@3.6.2/dist/maplibre-gl.js"></script>
<script src="202608292311-maplibre-worker-bridge.js"></script>
<script src="202608291818-place-postcode-search.js"></script>
<script src="ventus-corev8engine.js"></script>
<script src="202608292126-pre-snapped-config-adapter.js"></script>
<script>
const ukConfig = [
{
group: "Topology (GeoJSON)",
layers: [
{ id: "400", label: "400kV", color: "#0054ff", type: "line", width: 2.5, url: "data/grid_400kv.geojson", snap: true, preload: true },
{ id: "275", label: "275kV", color: "#ff0000", type: "line", width: 2.0, url: "data/grid_275kv.geojson", snap: true, preload: true },
{ id: "220", label: "220kV", color: "#ff9900", type: "line", width: 1.8, url: "data/grid_220kv.geojson", snap: true, preload: true },
{ id: "132", label: "132kV", color: "#00cc00", type: "line", width: 1.5, url: "data/grid_132kv.geojson", snap: true, preload: true },
{ id: "66", label: "66kV", color: "#b200ff", type: "line", width: 1.2, url: "data/grid_66kv.geojson", snap: true, preload: true },
{ id: "11kv", label: "11kV (UKPN)", color: "#ff00ff", type: "point", radius: ['interpolate', ['linear'], ['zoom'], 13.5, 4, 15, 8, 18, 18], url: "data/grid_11kv_ukpn.geojson", minzoom: 13.5, preload: false },
{ id: "subs", label: "Subs", color: "#ffffff", type: "point", radius: ['interpolate', ['linear'], ['zoom'], 5, 3, 10, 5, 14, 10, 18, 22], url: "data/grid_substations.geojson", isSubs: true, preload: true }
]
},
{
group: "Assets (GeoJSON)",
layers: [
{ id: "nuc", label: "Nuclear", color: "#39ff14", type: "point", radius: 4.5, url: "data/power_plants.geojson", filter: ['==', ['get', 'source'], 'nuclear'], preload: true },
{ id: "gas", label: "Gas", color: "#ff4500", type: "point", radius: 4.5, url: "data/power_plants.geojson", filter: ['!=', ['get', 'source'], 'nuclear'], preload: true },
{ id: "ind", label: "Industry", color: "#ff6600", type: "point", radius: 4.5, url: "data/industrial_offtakers.geojson", preload: true },
{ id: "dc", label: "Data Ctrs", color: "#00ffff", type: "point", radius: 4.5, url: "data/datacentres.geojson", preload: true },
{ id: "air", label: "Airports", color: "#ff00ff", type: "point", radius: 4.5, url: "data/airports.geojson", preload: true },
{ id: "rail", label: "Railways", color: "#ffd700", type: "point", radius: 4.5, url: "data/railways.geojson", preload: true }
]
},
{
group: "Supermarkets (GeoJSON)",
layers: [
{ id: "tesco", label: "Tesco", color: "#ee1c2e", type: "point", radius: 4.5, url: "data/supermarkets_tesco.geojson", preload: false },
{ id: "sainsburys", label: "Sainsbury's", color: "#ff8200", type: "point", radius: 4.5, url: "data/supermarkets_sainsburys.geojson", preload: false },
{ id: "asda", label: "Asda", color: "#78be20", type: "point", radius: 4.5, url: "data/supermarkets_asda.geojson", preload: false },
{ id: "morrisons", label: "Morrisons", color: "#ffd700", type: "point", radius: 4.5, url: "data/supermarkets_morrisons.geojson", preload: false },
{ id: "aldi", label: "Aldi", color: "#003087", type: "point", radius: 4.5, url: "data/supermarkets_aldi.geojson", preload: false },
{ id: "lidl", label: "Lidl", color: "#0050aa", type: "point", radius: 4.5, url: "data/supermarkets_lidl.geojson", preload: false },
{ id: "waitrose", label: "Waitrose", color: "#7ab800", type: "point", radius: 4.5, url: "data/supermarkets_waitrose.geojson", preload: false },
{ id: "ms", label: "M&S Food", color: "#009b77", type: "point", radius: 4.5, url: "data/supermarkets_ms.geojson", preload: false },
{ id: "coop", label: "Co-op", color: "#00b1a9", type: "point", radius: 4.5, url: "data/supermarkets_coop.geojson", preload: false },
{ id: "costco", label: "Costco", color: "#005daa", type: "point", radius: 4.5, url: "data/supermarkets_costco.geojson", preload: false },
{ id: "booths", label: "Booths", color: "#6d2077", type: "point", radius: 4.5, url: "data/supermarkets_booths.geojson", preload: false }
]
},
{
group: "Transit (GeoJSON)",
layers: [
{ id: "elizabeth", label: "Elizabeth Line", color: "#60399E", type: "point", radius: 5, url: "data/elizabeth_line.geojson", preload: false },
{ id: "lu", label: "London Underground", color: "#e32017", type: "point", radius: 5, url: "data/london_underground.geojson", preload: false },
{ id: "dlr", label: "DLR", color: "#00afad", type: "point", radius: 5, url: "/uk_metros_trams.geojson", preload: false,
filter: ['all', ['in', 'Docklands', ['get', 'operator']], ['!', ['in', 'London Underground', ['get', 'operator']]]] },
{ id: "metro", label: "UK Metro", color: "#f3a712", type: "point", radius: 5, url: "/uk_metros_trams.geojson", preload: false,
filter: ['any', ['in', 'Tyne', ['get', 'operator']], ['in', 'Metrolink', ['get', 'operator']], ['in', 'Supertram', ['get', 'operator']], ['in', 'Nottingham', ['get', 'operator']], ['in', 'Edinburgh', ['get', 'operator']], ['in', 'Midland Metro', ['get', 'operator']]] },
{ id: "tram", label: "Trams & Light Rail", color: "#84329b", type: "point", radius: 5, url: "/uk_metros_trams.geojson", preload: false,
filter: ['all', ['==', ['get', 'type'], 'Tram / Light Rail'], ['!', ['in', 'London Underground', ['get', 'operator']]]] },
{ id: "mainline_rail", label: "UK Mainline Railways", color: "#ff8800", type: "line", width: 1.5, url: "/uk_mainline_railways.geojson", preload: false },
{ id: "hs2", label: "HS2", color: "#2c6fad", type: "point", radius: 4, url: "data/hs2.geojson", preload: false },
{ id: "eurostar_route", label: "Eurostar (HS1) UK & Europe", color: "#001489", type: "line", width: 2.5, url: "data/eurostar.geojson", filter: ['==', ['get', 'type'], 'route'], preload: false },
{ id: "eurostar_station", label: "Eurostar Stations UK & Europe", color: "#ffd700", type: "point", radius: 5.5, url: "data/eurostar.geojson", filter: ['==', ['get', 'type'], 'eurostar_station'], preload: false }
]
},
{
group: "Leisure & Sports (GeoJSON)",
layers: [
{ id: "stadiums", label: "Major Stadiums", color: "#e5ff00", type: "point", radius: 5.5, url: "data/stadiums.geojson", preload: false }
]
},
{
group: "Global Data Backbone",
layers: [
{ id: "subsea_data_cables", label: "Subsea Data Cables (Fibre) (not all connections available yet)", color: "#00e5ff", type: "line", width: 1.5, url: "data/subsea_data_cables.geojson", preload: false }
]
},
{
group: "Global Supply Chain & Chokepoints",
layers: [
{ id: "global_ports_major", label: "Major Ports (Deep Water/Ferry)", color: "#00bfff", type: "point", radius: ['interpolate', ['linear'], ['get', 'area_ha'], 0, 8, 80, 10, 500, 16], url: "data/global_ports.geojson", filter: ['==', ['get', 'type'], 'Major Cargo/Container Port'], preload: false },
{ id: "global_ports_minor", label: "Inland / Minor Harbours", color: "#0055aa", type: "point", radius: ['interpolate', ['linear'], ['get', 'area_ha'], 0, 2.5, 50, 4.5, 200, 6], url: "data/global_ports.geojson", filter: ['==', ['get', 'type'], 'Minor/Local Harbour'], preload: false },
{ id: "global_hydrocarbons", label: "Global Hydrocarbons (Oil, Gas, LNG)", color: "#ff3300", type: "point", radius: ['interpolate', ['linear'], ['get', 'area_ha'], 0, 4, 100, 8, 1000, 15], url: "data/global_hydrocarbons.geojson", preload: false }
]
},
{
group: "Highway Infrastructure",
layers: [
{ id: "motorways", label: "Motorways", color: "#0054ff", type: "line", width: 2.5, url: "/uk_motorways.geojson", preload: false },
{ id: "trunk_roads", label: "Major A-Roads (Trunk)", color: "#00cc00", type: "line", width: 1.8, url: "/uk_trunk_roads.geojson", preload: false },
{ id: "primary_roads", label: "A-Roads (Primary)", color: "#ff4400", type: "line", width: 1.2, url: "/uk_primary_roads.geojson", preload: false },
{ id: "motorway_services", label: "Motorway Services", color: "#ff00ff", type: "point", radius: 5.5, url: "data/motorway_services.geojson", preload: false }
]
},
{
group: "EV (GeoJSON)",
layers: [
{ id: "ev", label: "EV Rapid (100kW+)", color: "#00ff88", type: "point", radius: 5, url: "data/ev_chargers.geojson", preload: false }
]
},
{
group: "Heavy Industry",
layers: [
{ id: "naei_co2", label: "Major Industrial Sites", color: "#ff4400", type: "point", url: "/heavy_emitters_uk.json", preload: false }
]
},
{
group: "REPD (GeoJSON)",
layers: [
{ id: "solar", label: "Solar PV", color: "#ffff00", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'solar'], preload: false },
{ id: "solar_operational", label: "Solar PV (Operational Only)", color: "#00ff88", type: "point", radius: ['interpolate', ['linear'], ['coalesce', ['get', 'capacity'], 0], 0, 10, 10, 14, 50, 18, 100, 22, 200, 28, 350, 35, 500, 42], url: "/dist/repd_master.json", filter: ['all', ['==', ['get', 'tech'], 'solar'], ['==', ['get', 'status'], 'operational']], preload: false },
{ id: "solar_roof", label: "Solar Roof", color: "#ffcc00", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'solar_roof'], preload: false },
{ id: "wind", label: "Wind", color: "#00ffff", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'wind'], preload: false },
{ id: "wind_onshore_operational", label: "Onshore Wind (Operational Only)", color: "#00ffcc", type: "point", radius: ['interpolate', ['linear'], ['coalesce', ['get', 'capacity'], 0], 0, 8, 10, 12, 50, 16, 100, 20, 200, 26, 350, 32, 500, 38], url: "/dist/repd_master.json", filter: ['all', ['==', ['get', 'raw_tech'], 'Wind Onshore'], ['==', ['get', 'status'], 'operational']], prelo … [line shortened here: 412 characters; full line on GitHub]
{ id: "wind_offshore_operational", label: "Offshore Wind (Operational Only)", color: "#0066ff", type: "point", radius: ['interpolate', ['linear'], ['coalesce', ['get', 'capacity'], 0], 0, 8, 10, 12, 50, 16, 100, 20, 200, 26, 350, 32, 500, 38], url: "/dist/repd_master.json", filter: ['all', ['==', ['get', 'raw_tech'], 'Wind Offshore'], ['==', ['get', 'status'], 'operational']], prel … [line shortened here: 413 characters; full line on GitHub]
{ id: "bess", label: "Battery Storage", color: "#ffae00", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'bess'], preload: false },
{ id: "bess_operational", label: "Battery Storage (Operational Only)", color: "#ff69b4", type: "point", radius: ['interpolate', ['linear'], ['coalesce', ['get', 'capacity'], 0], 0, 8, 10, 12, 50, 16, 100, 20, 200, 26, 350, 32, 500, 38], url: "/dist/repd_master.json", filter: ['all', ['==', ['get', 'tech'], 'bess'], ['==', ['get', 'status'], 'operational']], preload: false },
{ id: "biomass", label: "Biomass & EfW", color: "#39ff14", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'biomass'], preload: false },
{ id: "tidal", label: "Tidal & Wave", color: "#00bfff", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'tidal'], preload: false },
{ id: "hydrogen", label: "Hydrogen", color: "#ffffff", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'hydrogen'], preload: false },
{ id: "hydro", label: "Hydro & Pumped Storage", color: "#00aaff", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'hydro'], preload: false },
{ id: "flywheel", label: "Flywheel", color: "#ff69b4", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'flywheel'], preload: false },
{ id: "act", label: "Advanced Conversion", color: "#ff6600", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'act'], preload: false },
{ id: "geothermal", label: "Geothermal", color: "#ff3300", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'geothermal'], preload: false },
{ id: "caes", label: "Compressed Air Storage", color: "#88aaff", type: "point", radius: 8, url: "/dist/repd_master.json", filter: ['==', ['get', 'tech'], 'caes'], preload: false }
]
}
];
window.initVentusMap({
config: ukConfig,
center: [-3.5, 54.0],
zoom: 4.2
});
</script>
</body>
</html>