// Mapa real de Argentina con todas las provincias // Datos cargados desde components/argentina-paths.js (window.PROVINCES) const Cobertura = ({ theme = "light" }) => { const isDark = theme === "dark"; const bg = isDark ? "#0f0f0f" : "#F5F5F2"; const fg = isDark ? "#fff" : "#0A0A0A"; const muted = isDark ? "#9a9a9a" : "#555"; const mapFill = isDark ? "#1a1a1a" : "#E8E8E3"; const mapStroke = isDark ? "rgba(255,255,255,0.12)" : "rgba(0,0,0,0.18)"; const mapHover = "#00B127"; const [hoveredProv, setHoveredProv] = React.useState(null); const [provTip, setProvTip] = React.useState(null); // { name, x, y } en coords SVG const svgRef = React.useRef(null); const svgPoint = (e) => { const svg = svgRef.current; if (!svg) return { x: 0, y: 0 }; const pt = svg.createSVGPoint(); pt.x = e.clientX; pt.y = e.clientY; const ctm = svg.getScreenCTM(); if (!ctm) return { x: 0, y: 0 }; const p = pt.matrixTransform(ctm.inverse()); return { x: p.x, y: p.y }; }; const provinces = window.PROVINCES || []; // Provincias donde tenemos presencia activa (highlight) const ACTIVE_PROVINCES = new Set([ "AR-B", // Buenos Aires "AR-C", // CABA "AR-Q", // Neuquén "AR-S", // Santa Fe "AR-X", // Córdoba "AR-M", // Mendoza "AR-A", // Salta "AR-U", // Chubut "AR-Z", // Santa Cruz "AR-T", // Tucumán "AR-N" // Misiones ]); // Marcadores sobre el viewBox real del SVG (361.5 x 792.6) // Coordenadas centroide aproximadas de cada provincia destacada const points = [ // Oficina central { id: "ESC", name: "Belén de Escobar", x: 268, y: 261, main: true, note: "Oficina central" }, // Buenos Aires province { id: "DS", name: "Dock Sud", x: 274, y: 268, note: "Buenos Aires" }, { id: "RJ", name: "Rojas", x: 240, y: 260, note: "Buenos Aires" }, { id: "BB", name: "Bahía Blanca", x: 220, y: 348, note: "Buenos Aires" }, { id: "BAR", name: "Baradero", x: 258, y: 250, note: "Buenos Aires" }, { id: "ROS", name: "Rosario", x: 235, y: 232, note: "Santa Fe · Centro" }, { id: "ROSGM", name: "Rosario · General Motors", x: 232, y: 226, note: "Planta GM Alvear" }, { id: "SN", name: "San Nicolás", x: 248, y: 242, note: "Buenos Aires" }, // Río Negro { id: "RC", name: "Río Colorado", x: 178, y: 350, note: "Río Negro" }, { id: "PM", name: "Pichi Mahuida", x: 172, y: 355, note: "Río Negro" }, { id: "CCH", name: "Choele Choel", x: 150, y: 372, note: "Río Negro" }, { id: "CHI", name: "Chichinales", x: 122, y: 378, note: "Río Negro" }, { id: "GR", name: "General Roca", x: 110, y: 380, note: "Río Negro" }]; return (
{/* Left text */}
06 — Cobertura

Presencia
en toda
Argentina

Desde nuestra base en Belén de Escobar (Buenos Aires), ejecutamos proyectos en todo el territorio nacional. Equipos propios, logística coordinada y soporte continuo.

Oficina central
Belén de Escobar
Buenos Aires, Argentina
{/* Map */}
{/* Provincias */} {provinces.map((p) => { const isActive = ACTIVE_PROVINCES.has(p.id); const isHover = hoveredProv === p.id; return ( { setHoveredProv(p.id); setProvTip({ name: p.name, ...svgPoint(e) }); }} onMouseMove={(e) => setProvTip({ name: p.name, ...svgPoint(e) })} onMouseLeave={() => { setHoveredProv(null); setProvTip(null); }}> ); })} {/* Puntos (primero todos los círculos) */} {points.map((p) => setHoveredProv("pt-" + p.id)} onMouseLeave={() => setHoveredProv(null)}> {p.main && } )} {/* Tooltips (al final, para que queden por delante de todos los puntos) */} {points.map((p) => { const isHovered = hoveredProv === "pt-" + p.id; if (!isHovered) return null; return ( {p.name} {p.note} ); })} {/* Tooltip de provincia (sigue el mouse) */} {provTip && ( {provTip.name} )}
{/* Legend */}
Oficina central
Proyecto activo
); }; window.Cobertura = Cobertura;