Preparing search index...

    Class AnchorLocationModule

    Look up the real-world geographic position of an anchor. Requires location permission. Spectacles only.

    Lens Scripting Version 376

    Hierarchy (View Summary)

    • Asset
      • AnchorLocationModule
    Index

    Properties

    name: string

    The name of the Asset in Lens Studio.

    ""
    
    uniqueIdentifier: string

    Lens Scripting Version 176

    Methods

    • Exposes User Data

      Get the real-world latitude/longitude of an anchor. Requires the user's location permission.

      Parameters

      Returns Promise<GeoPosition>

      Lens Scripting Version 376

      const anchorLocationModule = require('LensStudio:AnchorLocationModule');
      const geoPosition = await anchorLocationModule.getGeoPosition(anchor);
      print(geoPosition.latitude + ", " + geoPosition.longitude);
    • Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

      Returns string

      Lens Scripting Version 376

    • 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