Skip to content

$fn.getCurrentPosition()

Obtains the current location of the smartphone device.

Arguments

None

Return value

TypeDescription
GeolocationCoordinatesDevice Location

Sample

const position = $fn.getCurrentPosition();
const latitude = position.latitude;
const longitude = position.longitude;