View Source LibLatLon.Bounds (LibLatLon v0.8.0)

Convenient storage for geo bounds.

Summary

Types

t()

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

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}
    }
    ...