Location
interface Location extends HybridObjectRepresents the physical Location, in real world
coordinates (latitude, longitude).
Location tags can be embedded into captured Photos
via EXIF tags, or into captured Videos via MP4/QuickTime
flags.
VisionCamera core does not provide a way to get a user's
location. Instead, use the react-native-vision-camera-location
module.
See
Example
Embedding a Location in a Photo's EXIF tags:
const photoOutput = ...
const location = ...
await photoOutput.capturePhoto({
location: location
}, {})Properties
altitude
readonly altitude: numberRepresents the vertical altitude.
horizontalAccuracy
readonly horizontalAccuracy: numberRepresents the accuracy of the horizontal
coordinates (latitude and
longitude) in meters.
isMock
readonly isMock: booleanRepresents whether this Location
is a mocked location, e.g. from a testing
environment or spoofed.
latitude
readonly latitude: numberRepresents the horizontal latitude.
longitude
readonly longitude: numberRepresents the horizontal longitude.
timestamp
readonly timestamp: numberRepresents the timestamp this
Location was captured at,
as a UNIX timestamp in milliseconds
since 1970.
verticalAccuracy
readonly verticalAccuracy: numberRepresents the accuracy of the vertical
coordinate (altitude) in meters.