pub fn use_geolocation() -> UseGeolocationReturn<impl Fn() + Clone + Send + Sync, impl Fn() + Clone + Send + Sync>
Expand description
Reactive Geolocation API.
It allows the user to provide their location to web applications if they so desire. For privacy reasons, the user is asked for permission to report location information.
§Demo
§Usage
let UseGeolocationReturn {
coords,
located_at,
error,
resume,
pause,
} = use_geolocation();
§SendWrapped Return
The returned closures pause
and resume
are sendwrapped functions. They can
only be called from the same thread that called use_geolocation
.
§Server-Side Rendering
On the server all signals returns will always contain None
and the functions do nothing.