Prototype envoi géolocalisations

This commit is contained in:
2024-12-11 01:30:21 +01:00
parent db7a0b970d
commit bdd53eb8bb
10 changed files with 140 additions and 32 deletions

View File

@ -1,4 +1,4 @@
import { useLocation } from "@/hooks/useLocation"
import { useLastOwnLocation } from "@/hooks/useLocation"
import { circle } from "@turf/circle"
import { type Map as MaplibreGLMap } from "maplibre-gl"
import { RLayer, RMap, RMarker, RNavigationControl, RSource, useMap } from "maplibre-react-components"
@ -21,7 +21,7 @@ export default function Map() {
}
function UserLocation() {
const userLocation = useLocation()
const userLocation = useLastOwnLocation()
const [firstUserPositionFetched, setFirstUserPositionFetched] = useState(false)
const map: MaplibreGLMap = useMap()
if (userLocation != null && !firstUserPositionFetched) {