God's Eye View Map Layers: Complete Registry of All 16 Data Layers
God's Eye View provides 16 distinct map layers ranging from live AIS vessel tracking and commercial flights to submarine cables and military installations, all defined in the central LAYER_STATE_REGISTRY located in src/data/layerState.js.
God's Eye View is an open-source geospatial visualization platform that aggregates real-time and static data sources into an interactive 3D globe. The available God's Eye View map layers are not hardcoded throughout the application but centralized in a single registry that defines each layer's identifier, URL token, and configuration disposition.
Understanding the Layer Registry Architecture
In src/data/layerState.js, the LAYER_STATE_REGISTRY array serves as the single source of truth for all available data layers. Each entry in this registry is an object containing three critical properties:
id: The canonical layer name used throughout the UI and programmatic APIs (e.g.,flights,traffic).token: A single-character string used for compact URL encoding (e.g.,ffor flights,tfor traffic).disposition: A string indicating the layer's configuration capabilities, determining whether it supports additional options like 3D models or radio filters.
The disposition field supports three values:
enabled-only: Simple on/off toggle with no additional configuration.enabled+options: Supports supplementary settings such as 3D model toggles or volume controls.enabled+mirrored-options: Specialized disposition for layers requiring mirrored UI controls (currently used only for the military layer).
Complete List of God's Eye View Map Layers
The current registry defines 16 distinct data layers organized by their disposition capabilities.
Standard Data Layers (enabled-only)
These 11 layers provide immediate data visualization without additional configuration options:
ais-live-vessels(token:a): Live Automatic Identification System vessel tracks displaying real-time maritime traffic.bikeshare(token:b): Real-time bike-share station locations and availability.earthquakes(token:e): Recent seismic events and earthquake data.local-dams(token:q): Known dam locations and infrastructure.local-datacenters(token:d): Data center facility locations.local-firms(token:w): Corporate facilities and business locations.military-awareness(token:g): General military-awareness overlay providing situational context.military-installations(token:i): Known military installation locations.rocket-launches(token:x): Upcoming and recent rocket launch events.telegeography-submarine-cables(token:u): Submarine telecommunications cable routes.traffic(token:t): Road traffic flow visualization.
Interactive Layers with Options (enabled+options)
These four layers support additional configuration parameters beyond simple visibility:
cctv(token:c): CCTV camera feeds with coverage mode options for adjusting visual range indicators.flights(token:f): Commercial aircraft tracking with 3D model display options.radio(token:r): Radio stream playback with filter and volume control options.satellites(token:s): Satellite orbital tracks with catalog selection options.
Specialized Military Layer (enabled+mirrored-options)
military(token:m): Military aircraft tracking utilizing mirrored UI controls for specialized interface requirements.
Programmatic Layer Control
The codebase provides specific APIs for manipulating these layers at runtime through the LayerStateCoordinator class and related utilities.
Enabling Layers via LayerStateCoordinator
To programmatically activate a layer, instantiate LayerStateCoordinator and manipulate the enabledLayerIds array:
// Assume dataManager is already instantiated
const coordinator = new LayerStateCoordinator(dataManager);
await coordinator.start(); // initialise from stored prefs or defaults
const state = coordinator.getDurableState();
// Turn on the "traffic" layer
state.enabledLayerIds.push('traffic');
coordinator._commitExplicit(state); // persist & apply
Encoding Layer State for Sharing
The encodeLayerStateParams function compresses the current layer configuration into URL-compatible tokens:
import { encodeLayerStateParams } from './data/layerState.js';
const params = new URLSearchParams();
encodeLayerStateParams(params, coordinator.getDurableState());
// Example result: "?v=2&l=a.b.c.t&lo=c.f.e.1_s.c.0"
const shareUrl = `https://example.com/view?${params}`;
UI Integration and Toggle Handlers
For React-based UI components, layers can be toggled using the DataManager API as implemented in src/ui/layerPanel.js:
function toggleLayer(layerId) {
dataManager.toggleLayerVisibility(layerId, { origin: 'user' });
}
Key Implementation Files
Beyond the registry itself, several files handle layer-specific logic:
src/data/layerState.js: Central registry and encoding/decoding logic for all map layers.src/ui/layerPanel.js: React component rendering the layer list and handling user toggles.src/scenes/recipes.js: Predefined scene configurations that reference specific layer combinations (e.g., enablingflightsandtrafficsimultaneously).src/data/traffic.js: Implementation details for the traffic visualization layer referenced by thetrafficID.
Summary
- God's Eye View defines 16 map layers in the
LAYER_STATE_REGISTRYatsrc/data/layerState.js. - Each layer has a unique ID (e.g.,
satellites), a single-character token (e.g.,s), and a disposition determining configuration options. - Three disposition types exist:
enabled-only(11 layers),enabled+options(4 layers), andenabled+mirrored-options(1 layer). - Programmatic control uses the
LayerStateCoordinatorclass for state management andencodeLayerStateParamsfor URL serialization. - Layer implementations are modular, with specific logic residing in dedicated files like
src/data/traffic.js.
Frequently Asked Questions
Where are the map layers defined in God's Eye View?
All map layers are defined in the LAYER_STATE_REGISTRY array within src/data/layerState.js. This single registry serves as the authoritative source for layer metadata including IDs, URL tokens, and disposition types.
What is the difference between layer ID and token?
The layer ID is a descriptive string used programmatically and in the UI (e.g., ais-live-vessels), while the token is a single-character abbreviation (e.g., a) used for compact URL encoding when sharing layer states via encodeLayerStateParams.
Which God's Eye View map layers support additional configuration options?
Four layers support the enabled+options disposition: cctv (coverage modes), flights (3D model toggle), radio (filter and volume), and satellites (catalog selection). The military layer uses a specialized enabled+mirrored-options disposition for mirrored UI controls.
How can I programmatically toggle a layer's visibility?
Use the DataManager.toggleLayerVisibility() method with the layer ID, or manipulate the enabledLayerIds array through LayerStateCoordinator followed by _commitExplicit() to persist changes. The LayerStateCoordinator approach is preferred for batch operations or state synchronization.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →