Mas Agua’s mapping feature allows you to visualize geographic locations with interactive markers that display real-time data from InfluxDB variables.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CspmIT/mas-agua-front/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The mapping system enables you to:- Create interactive maps centered on specific coordinates
- Add markers at precise latitude/longitude positions
- Associate InfluxDB variables with each marker for real-time data display
- Edit and manage existing maps
- View maps with live data updates
Accessing Maps Management
Creating a New Map
Configure Initial View
The map initializes with default coordinates:
- Latitude: -30.716256365145455
- Longitude: -62.005196197872266
- Zoom level: 14
Add Your First Marker
In the marker configuration panel at the top:
- Nombre del marcador: Enter a descriptive name for the marker
- Latitud: Enter the latitude coordinate (required)
- Longitud: Enter the longitude coordinate (required)
- Seleccione una variable: Choose an InfluxDB variable to display at this location
- Click “Agregar Marcador”
Add Additional Markers
Repeat the process to add more markers. Each marker must have:
- A unique name (duplicate names are not allowed)
- Valid latitude coordinate
- Valid longitude coordinate
- An associated InfluxDB variable
Adjust Map View
Pan and zoom the map to frame all your markers optimally. The current view state (position, zoom, bearing, pitch) will be saved.
You must add at least one marker before saving a map. The system validates this requirement.
Understanding Marker Configuration
Each marker stores:Editing Existing Maps
Open Map Editor
From
/maps, find your map in the table and click “Editar”. This navigates to /map/edit?id={mapId}.Review Current Configuration
The editor loads:
- Current map name in the header
- All existing markers on the map
- Saved view state (position and zoom)
Modify Markers
- Add new markers using the configuration panel
- Drag existing markers if
draggable={true}is enabled - Update marker variables and names as needed
Viewing Maps with Live Data
Map Component Architecture
The mapping system uses several components:- MapBase (src/modules/Map/Components/MapBase.jsx): Core map rendering component
- Pin (src/modules/Map/Components/Pin.jsx): Individual marker component
- ControlPanel (src/modules/Map/Components/ControlPanel.jsx): Map controls overlay
MapBase Props
Key configuration options:Variable Selection
The variable selector uses theSelectVars component:
Browse Available Variables
The selector displays all available InfluxDB variables configured in your system.
Best Practices
Marker Placement
- Use precise coordinates (6+ decimal places for meter-level accuracy)
- Verify coordinates before saving (use online tools like Google Maps)
- Group related markers on the same map
- Use descriptive marker names that indicate location or equipment
Map Organization
- Create separate maps for different geographic areas or systems
- Use consistent naming conventions for markers
- Set appropriate default zoom levels to show all markers
- Center maps to display all important markers in the default view
Variable Assignment
- Associate each marker with its most relevant variable
- Ensure variables are actively receiving data before deployment
- Use variables with appropriate update frequencies for your use case
- Consider variable units and display formatting
Advanced Features
View State Configuration
The view state controls map camera:Marker Validation
The system validates:- Unique marker names per map
- Required fields (name, lat, lng, variable)
- Valid coordinate ranges
- Variable existence
Troubleshooting
Marker not appearing- Check that latitude/longitude are valid numbers
- Verify coordinates are within expected ranges (-90 to 90 for lat, -180 to 180 for lng)
- Ensure marker was successfully added to the markers array
- Each marker name must be unique within a map
- Choose a different name or edit the existing marker
- Maps require at least one marker
- Add markers before attempting to save
- Verify the map ID in the URL is correct
- Check browser console for errors
- Ensure backend API is accessible
- Confirm the variable is active and receiving data
- Check InfluxDB connection
- Verify variable permissions and access
- Ensure all required fields are filled
- Check for validation errors in form fields
- Verify you have edit permissions
Use Cases
Infrastructure Monitoring- Map pump stations with flow rate variables
- Track tank levels across multiple locations
- Monitor pressure at distribution points
- Display temperature sensors across a facility
- Track water quality at multiple sampling points
- Monitor rainfall at different zones
- Show equipment status at various sites
- Display real-time metrics from remote sensors
- Monitor distributed control systems

