Retrieve high-accuracy geolocation coordinates using the OS Fused Location Provider.
Retrieve high-accuracy GPS coordinates using native OS location providers with built-in permission prompts. Unlike browser navigator.geolocation, this uses the device's Fused Location Provider for faster, more accurate results.
import nativine from 'nativine';
const location = await nativine.location.getCurrent();
// location -> { latitude: 37.7749, longitude: -122.4194 }
latitude — Decimal latitude coordinate.longitude — Decimal longitude coordinate.The OS will automatically prompt the user for location permission if not already granted.