Location

interface Location extends HybridObject

Represents 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: number

Represents the vertical altitude.


horizontalAccuracy

readonly horizontalAccuracy: number

Represents the accuracy of the horizontal coordinates (latitude and longitude) in meters.


isMock

readonly isMock: boolean

Represents whether this Location is a mocked location, e.g. from a testing environment or spoofed.


latitude

readonly latitude: number

Represents the horizontal latitude.


longitude

readonly longitude: number

Represents the horizontal longitude.


timestamp

readonly timestamp: number

Represents the timestamp this Location was captured at, as a UNIX timestamp in milliseconds since 1970.


verticalAccuracy

readonly verticalAccuracy: number

Represents the accuracy of the vertical coordinate (altitude) in meters.