import { TelegramLocation } from '../../../types'; import { Context } from '../../core'; export declare class LocationContext extends Context { /** Longitude of the current location. */ longitude: number; /** Returns the latitude of the current location. */ latitude: number; /** Returns the horizontal accuracy of the location data. */ horizontalAccuracy: number | undefined; /** Returns the time period during which the location data is considered "live". */ livePeriod: number | undefined; /** Returns the heading of the device when the location data was recorded. */ heading: number | undefined; /** Returns the proximity alert radius for the location. */ proximityAlertRadius: number | undefined; /** * 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. * @param other The other location to calculate the distance to * @returns The distance between the two locations in meters */ distanceTo(other: TelegramLocation): number; /** * Calculates the bearing (in degrees) between this location and another location. * @param other The other location to calculate the bearing to * @returns The bearing in degrees, where 0 degrees is due north */ bearingTo(other: TelegramLocation): number; /** * Checks if this location is within a specified radius around another location. * @param center The center location to measure the distance from * @param radius The radius in meters * @returns True if this location is within the radius around the center location, false otherwise */ isWithinRadius(center: TelegramLocation, radius: number): boolean; /** Link to Google Maps that shows the current location. */ toGoogleMapsLink: string; /** * Checks if this location is a live location that can be updated. * A location is considered live if it has a `live_period` property greater than 0. * @returns True if this is a live location, false otherwise */ isLive: boolean; /** * 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. * @param maxAccuracy The maximum accuracy radius in meters * @returns True if this location is accurate, false otherwise */ isAccurate(maxAccuracy: number): boolean; }