Protected
_clientProtected
_sourceThe heading in degrees, where 0 degrees represents true north.
Returns the horizontal accuracy of the location data.
Returns the latitude of the current location.
Returns the time period during which the location data is considered "live".
The live period in seconds.
Returns the longitude of the current location.
Returns the proximity alert radius for the location.
The proximity alert radius in meters.
Calculates the bearing (in degrees) between this location and another location.
The other location to calculate the bearing to
The bearing in degrees, where 0 degrees is due north
Calculates the distance between this location and another location specified as a parameter. The Haversine formula is used, which takes into account the curvature of the Earth's surface.
The other location to calculate the distance to
The distance between the two locations in meters
Checks if this location has an accuracy radius that is smaller than or equal to a specified maximum value.
A location is considered accurate if it has a horizontal_accuracy
property that is defined and is less than or equal to the specified maximum value.
The maximum accuracy radius in meters
True if this location is accurate, false otherwise
Checks if this location is within a specified radius around another location.
The center location to measure the distance from
The radius in meters
True if this location is within the radius around the center location, false otherwise
Converts the source object to a context object of a given type.
client.updates.on("message", message => {
const user = message.user.toContext<CustomUserContext>();
// Now user works correctly with your context
})
Generic type parameter for the context object.
The context object.
Generated using TypeDoc
Returns the heading of the device when the location data was recorded.