Module location

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_expired πŸ”’
Deletes expired locations.
delete_orphaned_poi πŸ”’
Deletes POI locations that don’t have corresponding message anymore.
delete_poi πŸ”’
Deletes location if it is an independent location.
get_chats_with_location_streaming πŸ”’
Returns a list of chats in which location streaming is enabled.
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
Returns whether any chat is sending locations.
is_sending_to_chat
Returns whether chat_id is sending locations.
location_loop πŸ”’
maybe_send πŸ”’
Returns number of seconds until the next time location streaming for some chat ends automatically.
save πŸ”’
Saves given locations to the database.
send_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.
stop_sending
Stop sending locations in all chats.