Geminix.V1beta.LatLng (geminix v0.2.0)

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.

Fields:

  • :latitude (number/0) - The latitude in degrees. It must be in the range [-90.0, +90.0].
  • :longitude (number/0) - The longitude in degrees. It must be in the range [-180.0, +180.0].

Summary

Functions

Create a Geminix.V1beta.LatLng.t/0 from a map returned by the Gemini API.

Types

t()

@type t() :: %Geminix.V1beta.LatLng{
  __meta__: term(),
  latitude: number(),
  longitude: number()
}

Functions

from_map(schema \\ %__MODULE__{}, map)

@spec from_map(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Create a Geminix.V1beta.LatLng.t/0 from a map returned by the Gemini API.

Sometimes, this function should not be applied to the full response body, but instead it should be applied to the correct part of the map in the response body. This depends on the concrete API call.