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