Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LocationService

The location service provides access to the current location. The stage entity provides information about the location represented by the current reality viewer. The physical-stage entity provides information about the user's current physical location. Either entity must be subscribed to via ContextService.subscribe, before their pose relative to the FIXED frame can be retrieved.

Hierarchy

  • LocationService

Index

Constructors

constructor

Properties

Private contextService

contextService: ContextService

physicalStage

physicalStage: Entity = this.contextService.entities.add(new Entity({id: PHYSICAL_STAGE_ENTITY_ID,name: 'Physical Stage'}))

A reference frame representing the physical location of the user, defining an East-North-Up coordinate system.

Optional physicalStageCartographic

physicalStageCartographic: Cartographic

Private sessionService

sessionService: SessionService

stage

stage: Entity = this.contextService.entities.add(new Entity({id: STAGE_ENTITY_ID,name: 'Stage',position: new ConstantPositionProperty(Cartesian3.ZERO, this.physicalStage),orientation: new ConstantProperty(Quaternion.IDENTITY)}))

An entity representing the floor plane, defining an East-North-Up coordinate system. This entity must be subscribed to in order to receive pose updates relative to the FIXED frame.

Optional stageCartographic

stageCartographic: Cartographic

Accessors

physicalStageHorizontalAccuracy

  • get physicalStageHorizontalAccuracy(): number | undefined
  • Returns number | undefined

physicalStageVerticalAccuracy

  • get physicalStageVerticalAccuracy(): number | undefined
  • Returns number | undefined

stageHorizontalAccuracy

  • get stageHorizontalAccuracy(): number | undefined
  • Returns number | undefined

stageVerticalAccuracy

  • get stageVerticalAccuracy(): number | undefined
  • Returns number | undefined

Methods

Private _updateCartographic

  • _updateCartographic(entity?: Entity, cartographic?: Cartographic): Cartographic | undefined
  • Parameters

    • Optional entity: Entity
    • Optional cartographic: Cartographic

    Returns Cartographic | undefined

setGeolocationOptions

  • setGeolocationOptions(options: object): void
  • Parameters

    • options: object

      Returns void

    subscribeGeopose

    • subscribeGeopose(options?: object): Promise<void>
    • Parameters

      • Optional options: object

        Returns Promise<void>

      unsubscribeGeopose

      • unsubscribeGeopose(): void
      • Returns void

      Generated using TypeDoc