View Source LibLatLon.Bounds (LibLatLon v0.7.0)

Convenient storage for geo bounds.

Link to this section Summary

Types

t()

The Bouds struct has two fields (from and to).

Link to this section Types

@type t() :: %LibLatLon.Bounds{from: LibLatLon.Coords.t(), to: LibLatLon.Coords.t()}

The Bouds struct has two fields (from and to).

  • from denoting the northeast boundary, and
  • to denoting the southwest boundary.

Example

GoogleMaps API returns the same structure from geocoding requests:

%{...
  "geometry" => %{
    "bounds" => %{
      "northeast" => %{"lat" => 41.3884209, "lng" => 2.1982486},
      "southwest" => %{"lat" => 41.3874997, "lng" => 2.1970767}
    }
    ...