Skip to main content

bn.onLocationChange

onLocationChange(cb): void

description Subscribe the event of real-time location changes,used with bn.startLocationUpdate

Parameters

NameTypeDescription
cbOnLocationChangeCallbackcallback function

Returns

void


OnLocationChangeCallback#

Ƭ OnLocationChangeCallback: (result: LocationDetail) => void

Type declaration

▸ (result): void

Parameters

NameType
resultLocationDetail

Returns

void


Interface: LocationDetail#

NameTypeDescription
accuracynumberAccuracy of position
altitudenumberHeight, unit m
horizontalAccuracynumberHorizontal precision, unit m
latitudenumberLatitude, range -90 ~ 90. The negative number indicates latitude south. use gcj02 NBS coordinate system
longitudenumberLongitude, range -180 ~ 180. The negative numbers indicates west longitude. use gcj02 NBS coordinate system
speednumberSpeed, unit m/s
verticalAccuracynumberVertical accuracy, unit m(return 0 when unable to get)