Module location

Source
Expand description

Location handling.

Delta Chat handles two kind of locations.

There are two kinds of locations:

  • Independent locations, also known as Points of Interest (POI).
  • Path locations.

Locations are sent as KML attachments. Independent locations are sent in message.kml attachments and path locations are sent in location.kml attachments.

StructsΒ§

Kml
KML document.
Location
Location record.

EnumsΒ§

KmlTag πŸ”’

FunctionsΒ§

delete_all
Deletes all locations from the database.
delete_expired πŸ”’
Deletes expired locations.
delete_orphaned_poi_locations πŸ”’
Deletes POI locations that don’t have corresponding message anymore.
delete_poi_location πŸ”’
Deletes location if it is an independent location.
get_kml
Returns location.kml contents.
get_kml_timestamp πŸ”’
get_message_kml
Returns a KML document containing a single location with the given timestamp and coordinates.
get_range
Searches for locations in the given time range, optionally filtering by chat and contact IDs.
is_marker πŸ”’
is_sending_locations_to_chat
Returns whether chat_id or any chat is sending locations.
location_loop πŸ”’
maybe_send_locations πŸ”’
Returns number of seconds until the next time location streaming for some chat ends automatically.
save πŸ”’
Saves given locations to the database.
send_locations_to_chat
Enables location streaming in chat identified by chat_id for seconds seconds.
set
Sets current location of the user device.
set_kml_sent_timestamp
Sets the timestamp of the last time location was sent in the chat.
set_msg_location_id
Sets the location of the message.