Amarula.Content.Location (amarula v0.3.0)

View Source

A received location (content of a %Amarula.Msg{type: :location}, and the :location of an event).

  • :latitude / :longitude — coordinates (degrees).
  • :name / :address — place label and street address (nil if absent).
  • :url — an attached link.
  • :live?true for a live (updating) location.

Summary

Functions

Normalize a %Proto.Message.LocationMessage{} into a %Amarula.Content.Location{}.

Types

t()

@type t() :: %Amarula.Content.Location{
  address: String.t() | nil,
  latitude: float() | nil,
  live?: boolean(),
  longitude: float() | nil,
  name: String.t() | nil,
  url: String.t() | nil
}

Functions

from_proto(m)

@spec from_proto(struct()) :: t()

Normalize a %Proto.Message.LocationMessage{} into a %Amarula.Content.Location{}.