The map uses a custom Leaflet Icon system defined inDocumentation 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.
js/iconos.js. Icons fall into two categories: thematic PNG icons for specific service categories (health, education, commerce, etc.) built on the shared iconoComun base prototype, and colour-coded pin markers that reuse the standard Leaflet marker shape in different colours for tourism and other point types. Both categories are exposed as factory functions with the signature (feature, latlng) so they can be passed directly to pointToLayer in any L.geoJson() call.
Built-in icon factories
All thematic icons share the same base prototype, which sets the shadow image and all anchor measurements consistently across the map:js/iconos.js
iconoParaTren, uses a smaller 20×20 px icon size for metro/tramway stops:
js/iconos.js
pointToLayer when creating a L.geoJson() layer:
| Factory function | Icon file | Used for |
|---|---|---|
crearIconoAsistencia | img/Asistencia.png | Health centres, hospitals, clinics |
crearIconoEnseñanza | img/Enseñanza.png | Schools, kindergartens, universities |
crearIconoComercio | img/Comercio.png | Commerce, pharmacies, bars, restaurants |
crearIconoCultura | img/Cultura.png | Museums, theatres, libraries |
crearIconoCulto | img/Culto.png | Places of worship |
crearIconoEsparcimiento | img/Esparcimiento.png | Sports, parks, recreation |
crearIconoOficina | img/Oficina.png | Municipal offices, banks |
crearIconoServicios | img/Servicios.png | ATMs, gas stations, WiFi, green points |
crearIconoPilas | img/pilas_r2.png | Battery recycling points |
crearIconoPanel | img/paneles_3.png | Solar panels |
crearIconoTren | img/tren.png (20×20 px) | Metro/tramway stops |
crearIconoSeguridad | img/institucseguridad_r2.png | Police stations, security posts |
crearIconoEscul | img/escultura_3.png | Sculptures and public art |
crearIconoedi | img/edificios.png | Heritage buildings |
crearIconositios | img/sitios.png | Heritage sites and building complexes |
crearIconoMast | img/mastil_r2.png | Flag masts (private) |
crearIconoMastp | img/banderita_r2.png | Flag masts (public) |
crearIconoPersi | img/persianas_r2.png | Security shutters |
crearIconoVerde | img/marker-icon-2x-green.png | Recycling plant, spa |
crearIconoRojo | img/marker-icon-2x-red.png | Wineries, rural posts |
crearIconoAzul | img/marker-icon-2x-blue.png | Adventure tourism |
crearIconoAmarillo | img/marker-icon-2x-yellow.png | Lodgings |
crearIconoNaranja | img/marker-icon-2x-orange.png | Senior residences, dams |
crearIconoNegro | img/marker-icon-2x-black.png | General-purpose black pin |
crearIconoDorado | img/marker-icon-2x-gold.png | General-purpose gold pin |
crearIconoGris | img/marker-icon-2x-grey.png | General-purpose grey pin |
crearIconoVioleta | img/marker-icon-2x-violet.png | General-purpose violet pin |
crearIconoComercio:
js/iconos.js
Creating a custom icon
To add a new icon for a dataset that doesn’t fit an existing category, follow this two-step pattern insidejs/iconos.js:
js/iconos.js
img/ directory, then use the factory in any layer declaration in index.html:
index.html
iconoComun with a custom iconSize before creating the instance:
js/iconos.js
Polygon and line styles
Polygon and line layers do not usepointToLayer. Instead, call setStyle() on the L.geoJson() result to apply a uniform visual style, or use eachLayer() to drive the style dynamically from feature properties.
Static style applied once — the pattern used throughout index.html for layers like barrios, espverdes, and the node district polygons:
index.html
js/popups.js
L.map() is created in index.html:
index.html
The
setStyle() method accepts any Leaflet Path options: color (stroke colour), weight (stroke width in pixels), opacity (stroke opacity), fillColor (fill colour, defaults to the stroke color if omitted), fillOpacity, and dashArray (e.g. "5, 10" for a dashed line). All values can be overridden at any time by calling setStyle() again on the layer variable.