Nodes are the waypoints that make up the UniMaps campus graph. Every node carries a geographic coordinate pair (latitude and longitude), a floor number, and a type that describes what the location represents — a corridor, a classroom, a restroom, or a stairwell. Clients use the node list to render the campus map, the search endpoint to let users find a destination by name, and the nearest-node endpoint to snap a GPS position to the graph before routing.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Jcofles/Proyecto-web/llms.txt
Use this file to discover all available pages before exploring further.
Node object
Unique identifier for the node. Used as
origen / destino in routing requests.Human-readable name of the location, e.g.
"Cafeteria" or "Entrada Universidad".Decimal latitude (WGS 84). Ranges from
-90 to 90.Decimal longitude (WGS 84). Ranges from
-180 to 180.Foreign key referencing
nodo_tipos. Use GET /api/nodo-tipos to resolve to a name.
Common values: 1 = salon, 2 = pasillo, 3 = baño, 4 = escaleras.Floor level.
1 = ground floor. Increments upward.List all nodes
Returns the complete in-memory set of campus nodes. The current graph contains 51 nodes spanning the main campus path from the university entrance to the cafeteria.The full response includes all 51 nodes. The snippet above shows representative entries only.
Search nodes by name
Performs a case-insensitive substring search over node names. Useful for autocomplete and destination pickers in the frontend.Search query. Must be at least 2 characters. Matched against
nombre using case-insensitive substring comparison.Find nearest node
Accepts a GPS coordinate and returns the campus node closest to that position. Distance is computed with the Haversine formula (Earth radius = 6 371 000 m). Use this endpoint to snap a user’s live location to the graph before calling the routing endpoint.Decimal latitude of the user’s current position. Must be between
-90 and 90.Decimal longitude of the user’s current position. Must be between
-180 and 180.Echo of the coordinates sent in the request body.
The node object of the closest campus waypoint, augmented with a
distancia field (meters, rounded to 2 decimal places).Create a node
Persists a new node to thenodos database table. The in-memory static graph used by routing is not affected; restart or re-seed to include new nodes in route calculations.
Display name of the new node. Maximum 255 characters.
Decimal latitude. Must be between
-90 and 90.Decimal longitude. Must be between
-180 and 180.ID of a valid
nodo_tipos record. Use GET /api/nodo-tipos to enumerate valid values.Floor level (
1 = ground floor).Node type reference
tipo_id | Name | Description |
|---|---|---|
| 1 | salon | Classroom or lecture hall |
| 2 | pasillo | Corridor or outdoor walkway |
| 3 | baño | Restroom |
| 4 | escaleras | Staircase connecting multiple floors |