This commit is contained in:
2026-03-18 20:36:29 -04:00
parent a6ef226bec
commit c400623c25
3 changed files with 118 additions and 1056 deletions
+98 -1032
View File
File diff suppressed because it is too large Load Diff
+3 -7
View File
@@ -19,16 +19,12 @@
"leaflet.heat": "^0.2.0",
"next": "^16.0.7",
"react": "19.2.0",
"react-dom": "19.2.0",
"react-hot-toast": "^2.6.0",
<<<<<<< HEAD
"react-leaflet": "^5.0.0"
=======
"react-dom": "19.2.0", "react-hot-toast": "^2.6.0",
"react-leaflet": "^5.0.0",
"react-select": "^5.10.2",
"recharts": "^3.8.0"
>>>>>>> Lino
},
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@types/js-cookie": "^3.0.6",
+17 -17
View File
@@ -6,7 +6,7 @@ import "leaflet/dist/leaflet.css";
import "leaflet.heat";
import { useEffect } from "react";
// 🔷 Ajustar vista automáticamente
// Ajustar vista automáticamente
function AjustarVista({ bounds }) {
const map = useMap();
@@ -22,25 +22,25 @@ function HeatLayer() {
useEffect(() => {
// ESCALADOS A 4768x3368
// A 4768x3368
const edificios = {
A1: [[1400, 3060], [1470, 3060], [1470, 3360], [1400, 3360]],
A2: [[1570, 3130], [1570, 3190], [1850, 3190], [1850, 3130]],
A3: [[1640, 2650], [1705, 2650], [1705, 2950], [1640, 2950]],
A4: [[1235, 2260], [1235, 2360], [1610, 2360], [1610, 2260]],
A5: [[2250, 2480], [2580, 2480], [2580, 2580], [2250, 2580]],
A6: [[1390, 2385], [1480, 2385], [1480, 2655], [1390, 2655]],
A7: [[2080, 2080], [2250, 2080], [2250, 2480], [2080, 2480]],
A8: [[1820, 2280], [2100, 2280], [2100, 2380], [1820, 2380]],
A9: [[1950, 1880], [2250, 1880], [2250, 1980], [1950, 1980]],
A10: [[1730, 1780], [1900, 1780], [1900, 2130], [1730, 2130]],
A11: [[1700, 1580], [2050, 1580], [2050, 1710], [1700, 1710]],
A12: [[2050, 1280], [2250, 1280], [2250, 1780], [2050, 1780]],
A13: [[1530, 680], [1700, 680], [1700, 1050], [1530, 1050]],
A14: [[1700, 630], [2050, 630], [2050, 750], [1700, 750]],
A4: [[1268, 2765], [1268, 2830], [1540, 2830], [1540, 2765]],
A5: [[995, 2405], [1295, 2405], [1295, 2470], [995, 2470]],
A6: [[1390, 2385], [1450, 2385], [1450, 2655], [1390, 2655]],
A7: [[1234, 2014], [1296, 2014], [1296, 2317], [1234, 2317]],
A8: [[1390, 2055], [1700, 2055], [1700, 2118], [1390, 2118]],
A9: [[1730, 1550], [1980, 1550], [1980, 1640], [1730, 1640]],
A10: [[1580, 1660], [1580, 1960], [1660, 1960], [1580, 1660]],
A11: [[1525, 1370], [1825, 1370], [1825, 1440], [1525, 1440]],
A12: [[1750, 1140], [1750, 1520], [1910, 1520], [1910, 1140]],
A13: [[1380, 680], [1380, 1020], [1480, 1020], [1480, 680]],
A14: [[1320, 480], [1680, 480], [1680, 580], [1320, 580]],
A15: [[2027, 2580], [2087, 2580], [2087, 2900], [2027, 2900]],
CEDTEC: [[900, 2900], [1100, 2900], [1100, 3200], [900, 3200]],
BIBLIOTECA: [[1200, 1600], [1500, 1600], [1500, 1900], [1200, 1900]],
BIBLIOTECA: [[1600, 2200], [1900, 2200], [1900, 2500], [1600, 2500]],
POSGRADO: [[1100, 1525], [860, 1525], [860, 1325], [1100, 1325]]
};
@@ -87,9 +87,9 @@ function HeatLayer() {
.addTo(map);
});
// 🔥 DEBUG PRO (CLICK PARA COORDENADAS EXACTAS)
// DEBUG PRO (CLICK PARA COORDENADAS EXACTAS)
map.on("click", function (e) {
console.log("📍 Coordenadas exactas:", e.latlng);
console.log(" Coordenadas exactas:", e.latlng);
});
return () => {
@@ -105,7 +105,7 @@ export default function MapaCalor() {
const bounds = [
[0, 0],
[3368, 4768] // 🔥 DIMENSIÓN REAL
[3368, 4768]
];
return (