Table of Contents

Class MegaTracker

命名空間
easyar

提供雲定位功能。

MegaTracker

備註

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the MegaTracker class.

方法

landmarkFilter

Mega Landmark 過濾功能 開始時你需要手動調用 MegaLandmarkFilter.FilterBySpotId 。在Filter返回Found之前Tracker將不會開始追蹤。

get landmarkFilter(): MegaLandmarkFilter;

傳回值

reset()

重置。清除所有狀態。

reset(): void;

傳回值

setEnableLocalization(enableLocalization)

設定是否啟用定位。不啟用定位時,伺服器返回的定位結果不會輸出。預設為true。

setEnableLocalization(enableLocalization: boolean): void;

參數

enableLocalization

傳回值

setEnableStatelessLocalization(enableStatelessLocalization)

設定是否啟用無狀態定位。啟用無狀態定位時,定位時不會使用上一次定位結果。預設為false。

setEnableStatelessLocalization(enableStatelessLocalization: boolean): void;

參數

enableStatelessLocalization

傳回值

setProximityLocation(proximityLocationData)

更新當前的臨近位置資訊。如果傳入 null,則表示清除當前的鄰近位置定位。

setProximityLocation(proximityLocationData: ProximityLocationData | null): void;

參數

proximityLocationData

临近位置数据。

傳回值

{void}

setRequestTimeParameters(requestTimeParams)

設定請求時間參數。 timeoutMilliseconds為連接逾時時間, 預設為6000,最小為5000。 requestIntervalMilliseconds為期望的請求間隔時間,預設為1000,最小為300,值越大整體誤差越大。

setRequestTimeParameters(requestTimeParams: MegaRequestTimeParameters): void;

參數

requestTimeParams

傳回值

updateToken(apiToken)

更新API Token, 僅以createWithToken方式建立後可調用。 以create方式建立後調用無效。

updateToken(apiToken: string): void;

參數

apiToken

傳回值