gps
This commit is contained in:
parent
60ec4ef25e
commit
3000cb89ca
1 changed files with 16 additions and 0 deletions
16
frontend/src/lib/gps.worker.ts
Normal file
16
frontend/src/lib/gps.worker.ts
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
|
||||||
|
if (!("geolocation" in navigator)) {
|
||||||
|
/* geolocation is not available */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const watchID = navigator.geolocation.watchPosition((position) => {
|
||||||
|
console.log(position.coords.latitude, position.coords.longitude);
|
||||||
|
});
|
||||||
|
|
||||||
|
onmessage = () => {
|
||||||
|
console.log("Props");
|
||||||
|
};
|
||||||
|
|
||||||
|
export { };
|
Loading…
Reference in a new issue