The map usesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Observatorio-GC/Nodos/llms.txt
Use this file to discover all available pages before exploring further.
L.control.groupedLayers() from the leaflet.groupedlayercontrol plugin. This renders an expandable panel in the top-right of the map with sections for base maps and thematic overlay groups. Users can switch between base maps via radio buttons and toggle individual thematic overlays on or off using checkboxes, all without reloading the page.
Initialisation
The grouped layer control is added to the map injs/funcionesMapa.js after both the baseMaps and groupedOverlays objects are defined in index.html:
js/funcionesMapa.js
index.html just before the external script is loaded:
index.html
baseMaps structure
Three tile-layer base maps are offered. Only one can be active at a time; they appear as radio buttons at the top of the control panel.index.html
groupedOverlays structure
Thematic overlays are organised into named groups. Each group renders as a collapsible section inside the control panel, and each layer within it renders as an independent checkbox. The full map ships with twelve groups; a representative excerpt is shown below:index.html
Depa, nodosCentro1, etc.) is a Leaflet layer object — typically a L.geoJSON layer — created earlier in index.html.
Overlay add/remove events
Some overlays have an accompanying legend panel rendered in the page HTML. When one of these layers is toggled,js/funcionesMapa.js listens to the map’s overlayadd and overlayremove events and shows or hides the matching legend element by constructing its DOM id from the layer name.
js/funcionesMapa.js
onOverlayRemove mirrors this logic, setting display to 'none' instead of 'block'. The pattern "ref_" + idlayer maps each layer name to the id attribute of its legend <div> in index.html.
Scale control
A default Leaflet scale bar is added at the bottom-left of the map:js/funcionesMapa.js
Mouse position display
Live cursor coordinates are shown via theL.Control.MousePosition plugin, which reads from scripts/L.Control.MousePosition.js and is initialised in index.html:
index.html