Function leptos_use::use_geolocation
source · pub fn use_geolocation(
) -> UseGeolocationReturn<impl Fn() + Clone, impl Fn() + Clone>
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();
§Server-Side Rendering
On the server all signals returns will always contain None
and the functions do nothing.