Class MegaTracker
- Namespace
- easyar
Provides cloud localization.
Remarks
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.
Methods
landmarkFilter
For the Mega Landmark filtering feature, you need to manually call MegaLandmarkFilter.FilterBySpotId at startup. The Tracker will not start tracking until Filter returns Found.
get landmarkFilter(): MegaLandmarkFilter;
Returns
reset()
Resets. Clears all states.
reset(): void;
Returns
setEnableLocalization(enableLocalization)
Sets whether localization is enabled. When localization is not enabled, localization results returned by the server are not output. The default is true.
setEnableLocalization(enableLocalization: boolean): void;
Parameters
enableLocalization
Returns
setEnableStatelessLocalization(enableStatelessLocalization)
Sets whether stateless localization is enabled. When stateless localization is enabled, the previous localization result is not used during localization. The default is false.
setEnableStatelessLocalization(enableStatelessLocalization: boolean): void;
Parameters
enableStatelessLocalization
Returns
setProximityLocation(proximityLocationData)
Updates the current nearby location information. If null is passed, the current nearby location localization is cleared.
setProximityLocation(proximityLocationData: ProximityLocationData | null): void;
Parameters
proximityLocationDataNearby location data.
Returns
{void}
setRequestTimeParameters(requestTimeParams)
Sets request time parameters. timeoutMilliseconds is the connection timeout, default 6000 and minimum 5000. requestIntervalMilliseconds is the expected request interval, default 1000 and minimum 300; larger values produce larger overall error.
setRequestTimeParameters(requestTimeParams: MegaRequestTimeParameters): void;
Parameters
requestTimeParams
Returns
updateToken(apiToken)
Updates the API Token. Can be called only after creation with createWithToken. Calling it after creation with create has no effect.
updateToken(apiToken: string): void;
Parameters
apiToken