useGeolocation ​
Hook that returns the current geolocation
typescript
import { useGeolocation } from '@elysiumorg/solid-use';Usage ​
typescript
const { loading, error, timestamp, accuracy, latitude, longitude, altitude, altitudeAccuracy, heading, speed } = useGeolocation();
Demo ​
Api ​
Parameters
| Name | Type | Default | Note | 
|---|---|---|---|
| params.enableHighAccuracy? | boolean | - | Enable high accuracy | 
| params.maximumAge? | number | - | Maximum age | 
| params.timeout? | number | - | Timeout |