telegram.Location

class telegram.Location(*args, **kwargs)[source]

Bases: telegram.TelegramObject

This object represents a point on the map.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their longitude and latitude are equal.

Parameters
  • longitude (float) – Longitude as defined by sender.

  • latitude (float) – Latitude as defined by sender.

  • horizontal_accuracy (float, optional) – The radius of uncertainty for the location, measured in meters; 0-1500.

  • live_period (int, optional) – Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only.

  • heading (int, optional) – The direction in which user is moving, in degrees; 1-360. For active live locations only.

  • proximity_alert_radius (int, optional) – Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.

  • **kwargs (dict) – Arbitrary keyword arguments.

longitude[source]

Longitude as defined by sender.

Type

float

latitude[source]

Latitude as defined by sender.

Type

float

horizontal_accuracy[source]

Optional. The radius of uncertainty for the location, measured in meters.

Type

float

live_period[source]

Optional. Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only.

Type

int

heading[source]

Optional. The direction in which user is moving, in degrees. For active live locations only.

Type

int

proximity_alert_radius[source]

Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.

Type

int