Skip to main content

MappingOptions

Class

Used with MappingSession to describe the session to be created.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Index

Extends

Properties

geoPositionEnabled

geoPositionEnabled: boolean

Toggles the acquisition of geolocation metadata during a mapping session.

Default Value

false

location

location: LocationAsset

Location hint for mapping. Leave unset or use LocationAsset.getAROrigin() for mapping in the current AR session frame. (planned future extension) Use a pre-existing location for incremental mapping.

Default Value

null

locationCloudStorageModule

locationCloudStorageModule: LocationCloudStorageModule

Must be present to provide a sharing model for the location. Map storage is private to the user, or shared via ConnectedLensSession on the the module (Spectacles only).

Default Value

null

policy

policy: string

Use case for mapping. Default "auto".

Since

Lens Scripting Version 229

Default Value

null

scope

scope: MappingScope

If All, the checkpoint will contain all seen and tracked areas. If New, it will only contain areas seen and tracked after the MappingSession was constructed. The option is used to define which parts of the map should be included in a checkpoint. For small maps, including only the data visible at an instance, use New. For complete maps encompassing all visited areas, use All.

Default: All

Default Value

MappingSession.MappingScope.All

Methods

getTypeName()

static getTypeName(): TypeName<MappingOptions>

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

TypeName<MappingOptions>

Overrides

ScriptObject.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

ScriptObject.getTypeName


isOfType()

isOfType(type): boolean

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

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

ScriptObject.isOfType


isSame()

isSame(other): boolean

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

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

ScriptObject.isSame