Posizione
Richiesta permesso di localizzazione e recupero della posizione GPS.
Accessibile tramite appo.location.
Definizione del Tipo
Prop
Type
Utilizzo
Richiesta Permesso
const status = await appo.location.requestPermission();
// stato: 'granted' | 'denied' | 'undetermined'Ottenere la Posizione Attuale
if (status === 'granted') {
const position = await appo.location.getCurrentPosition();
console.log(position.latitude, position.longitude);
// Opzionale: position.altitude, position.accuracy, position.timestamp
}Tipi Correlati
Prop
Type
Fallback nel Browser
| Metodo | Fallback |
|---|---|
requestPermission() | Restituisce 'denied' |
getCurrentPosition() | Lancia un Error |