Skip to main content

get_location

Function get_location 

Source
pub fn get_location() -> Result<String, i32>
Expand description

Get the device’s geolocation as a "lat,lon" string (currently a mock location).

Gated by an in-browser permission prompt on first use per origin. Errors: PERMISSION_PENDING while the prompt is showing (retry on a later frame), -1 once blocked — by the user or by an app manifest that doesn’t declare geolocation.