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

返回