location.GeocodedAddress
One place at a position. Each part is null when the platform has none.
Verwendung
Request a current position
Dieser Typ wird verwendet von 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>;
}Typdeklaration
export type GeocodedAddress = Address;Mitglieder 12
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
name | string | Ja | — |
streetNumber | string | Ja | — |
street | string | Ja | — |
district | string | Ja | — |
city | string | Ja | — |
subregion | string | Ja | — |
region | string | Ja | — |
postalCode | string | Ja | — |
country | string | Ja | — |
isoCountryCode | string | Ja | — |
timezone | string | Ja | — |
formattedAddress | string | Ja | The address as one line. Android only. |
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.