Skip to main content

Documentation 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.

The map includes two utility controls: L.control.polylineMeasure() for measuring distances along drawn polylines, and L.control.browserPrint() for printing or exporting the current map view to paper or PDF. Both are initialised in js/funcionesMapa.js and attach themselves to the default map control area.

Distance Measurement (Leaflet.PolylineMeasure)

The measurement tool is provided by scripts/Leaflet.PolylineMeasure.js and lets users draw a multi-segment line directly on the map to measure cumulative distances. How to use it:
  1. Click the ruler icon that appears in the map controls to activate the tool.
  2. Click on the map to place the first point of the measurement line.
  3. Continue clicking to add intermediate waypoints — the running distance updates after each click.
  4. Double-click to finish the polyline and lock in the final measurement.
  5. Distances are shown in metres for short distances and switch to kilometres automatically.
Initialisation from js/funcionesMapa.js:
js/funcionesMapa.js
L.control.polylineMeasure().addTo(map);
No additional options are passed, so the plugin runs with its built-in defaults: metric units, a clear-all button, and the ability to draw multiple independent measurement lines on the same map session.

Printing the Map (leaflet.browser.print)

The print control is provided by scripts/leaflet.browser.print.js and adds a printer icon to the map. Clicking it opens a print-mode menu. The full configuration from js/funcionesMapa.js is:
js/funcionesMapa.js
L.control.browserPrint({
    title: 'Impresión de pantalla',
    printLayer: L.tileLayer(
        'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
        godoycruz
    ),
    closePopupsOnPrint: false,
    printModes: [
        L.BrowserPrint.Mode.Auto("A4", { title: "Auto" }),
        L.BrowserPrint.Mode.Custom("A3", { title: "Selecionar" })
    ],
    manualMode: false
}).addTo(map);
Two modes are available from the print menu:
ModePaper sizeBehaviour
AutoA4Automatically scales and fits the current map viewport to A4 paper. No user interaction required beyond selecting the mode.
Custom (Selecionar)A3Displays a draggable rectangle on the map. The user resizes and repositions it to select the exact area to print, then confirms. The selected area is rendered at A3 size.
The printLayer option sets the ESRI World Imagery satellite tile layer as the background used when rendering the printed output — regardless of which base map is currently active in the browser. Overlay layers (GeoJSON features, markers, etc.) are still included on top of this background.
When the print dialog opens, choose Save as PDF in your browser’s destination/printer selector to generate a PDF file instead of sending to a physical printer. This is the recommended way to export a georeferenced snapshot of the map.

Build docs developers (and LLMs) love