GeocodedAddress
One place at a position. Each part is null when the platform has none.
Utilização
Request a current position
Este tipo é usado por 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>;
}Declaração do tipo
export type GeocodedAddress = Address;Membros 12
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
name | string | Sim | — |
streetNumber | string | Sim | — |
street | string | Sim | — |
district | string | Sim | — |
city | string | Sim | — |
subregion | string | Sim | — |
region | string | Sim | — |
postalCode | string | Sim | — |
country | string | Sim | — |
isoCountryCode | string | Sim | — |
timezone | string | Sim | — |
formattedAddress | string | Sim | The address as one line. Android only. |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.