import type React from "react"; import maplibregl from "maplibre-gl"; import { Map, Marker, useMap } from "react-map-gl"; import { IconButton } from "@app/components/IconButton.js"; import { useDevice } from "@core/providers/useDevice.js"; import { Hashicon } from "@emeraldpay/hashicon-react"; import { MapPinIcon } from "@heroicons/react/24/outline"; export const MapPage = (): JSX.Element => { const { nodes, waypoints } = useDevice(); const { current: map } = useMap(); return (
Title
{nodes.map((n) => (
{n.data.user?.longName}
} size="sm" onClick={() => { if (n.data.position?.latitudeI) { map?.flyTo({ center: [ n.data.position.longitudeI / 1e7, n.data.position.latitudeI / 1e7, ], zoom: 10, }); } }} />
))}
{waypoints.map((wp) => (
))} {nodes.map((n) => { if (n.data.position?.latitudeI) { return ( ); } })}
); };