location.GeocodedAddress
One place at a position. Each part is null when the platform has none.
Usage
Request a current position
This type is used by location.reverseGeocode
import { Text, location, permissions } from 'kuito';
const { status } = await permissions.request('location');
if (status === 'granted') {
const here = await location.current({ accuracy: 'high' });
const [place] = await location.reverseGeocode(here.coords);
}
function Here() {
// Locates while Here is mounted; the fixes land in location.position.
location.watch({ distanceInterval: 20 });
return <Text>{`${location.position.value?.coords.latitude ?? '…'}`}</Text>;
}Type declaration
export type GeocodedAddress = Address;Members 12
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | — |
streetNumber | string | Yes | — |
street | string | Yes | — |
district | string | Yes | — |
city | string | Yes | — |
subregion | string | Yes | — |
region | string | Yes | — |
postalCode | string | Yes | — |
country | string | Yes | — |
isoCountryCode | string | Yes | — |
timezone | string | Yes | — |
formattedAddress | string | Yes | The address as one line. Android only. |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.