Used to track a real-world location in a Lens.

//@input Component.DeviceLocationTrackingComponent locationTrackingComponent

// Get whether or not the landmarker is being tracked
var isLocationTracking = script.locationTrackingComponent.isTracking();

// Print current status.
if (isLocationTracking) {
print("Location is being tracked");
} else {
print("Location is not being tracked");
}

Hierarchy (View Summary, Expand)

Constructors

Properties

distanceToLocation: number

Returns the distance, in meters, to the location. If the distance is unavailable, -1 is returned.

enabled: boolean

If disabled, the Component will stop enacting its behavior.

location: LocationAsset

The location that the tracker is tracking. Useful for dynamically controlling the target location being tracked.

locationProximityStatus: LocationProximityStatus

Returns the user's current LocationProximityStatus. Useful for telling if a user is close enough to the location to track it.

onLocationDataDownloaded: () => void

A function that gets called when location data is downloaded.

onLocationDataDownloadFailed: () => void

A function that gets called when location data fails to download.

onLocationFound: () => void

A function that gets called when location is found.

onLocationLost: () => void

A function that gets called when location is lost. Note this will also happen when the user flips the camera.

sceneObject: SceneObject

The scene object this component is on.

uniqueIdentifier: string

Methods

  • Destroys the component.

    Returns void

  • Returns the name of this object's type.

    Returns string

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

  • Returns whether the location landmarker is currently being tracked.

    Returns boolean

MMNEPVFCICPMFPCPTTAAATR