update map with nodes dynamic

This commit is contained in:
2025-11-19 10:24:15 +02:00
parent 8dfc46cabe
commit cbbc87cc29
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ interface RawNode {
function DynamicMapContainer() { function DynamicMapContainer() {
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [nodes, setNodes] = useState<GeoNode[]>([]); const [nodes, setNodes] = useState<GeoNode[]>([]);
const API_URL = "https://gridproxy.grid.tf/nodes?healthy=true"; const API_URL = "https://gridproxy.grid.tf/nodes?healthy=true&size=99999";
useEffect(() => { useEffect(() => {
async function fetchNodeData() { async function fetchNodeData() {

View File

@@ -34,7 +34,7 @@ export default function WorldMap({
// Projects lat/lng to the SVG's 800x400 viewBox coordinates // Projects lat/lng to the SVG's 800x400 viewBox coordinates
const projectPoint = (lat: number, lng: number) => { const projectPoint = (lat: number, lng: number) => {
const x = (lng + 180) * (800 / 360); const x = (lng + 180) * (800 / 360);
const y = (90 - lat) * (400 / 180); const y = (90 - lat) * (400 / 180) + 45;
return { x, y }; return { x, y };
}; };