Lens Scripting API

    Class GeoPosition

    The location of the device.

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    altitude: number

    Represents the position's elevation from sea level in meters. Value will be zero if not available.

    heading: number

    Represents the direction towards which the device is facing. This value, specified in degrees, indicates how far off from heading true north the device is. 0 degrees represents true north, and the direction is determined clockwise. The recommended alternative to this field is to use onNorthAlignedOrientationUpdate which provides more accurate and frequent updates.

    Spectacles Not supported, use onNorthAlignedOrientationUpdate instead

    horizontalAccuracy: number

    The accuracy of the latitude and longitude properties, expressed in meters.

    isHeadingAvailable: boolean

    Indicates whether the device is able to provide heading information.

    Spectacles Not supported, use onNorthAlignedOrientationUpdate instead

    latitude: number

    The position's latitude in decimal degrees.

    locationSource: string

    Represents the location source of the provided location

    Value Description
    NOT_AVAILABLE Unknown source. Non-wearables users will always receive this option
    GNSS_RECEIVER Uses built-in antenna to acquire a location. Not expected to work indoors or in challenging scenarios where reception is poor.
    WIFI_POSITIONING_SYSTEM Provides rough location in indoor and challenging scenarios. Useful for urban environments with no GPS reception.
    FUSED_LOCATION Provides a fused location between several location sources. Accuracy is dependent on the accuracy of the sources. Update frequency coincides with rendering rate. Ideal for navigation scenarios. Enable this source by selecting Navigation Location Accuracy.
    longitude: number

    The position's longitude in decimal degrees.

    timestamp: Date

    Represents the date and time when the location coordinates were acquired.

    verticalAccuracy: number

    The accuracy of the altitude property, expressed in meters.

    Methods

    • 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

    MMNEPVFCICPMFPCPTTAAATR