Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.19 KB

File metadata and controls

51 lines (40 loc) · 1.19 KB

Region

Type

t

This type needs to be created, as well as consumed. When the type is returned, individual keys may be accessed using the ## accessor.

type t = {
  .
  "latitude": float,
  "longitude": float,
  "latitudeDelta": float,
  "longitudeDelta": float,
};
create:
  (
    ~latitude: float,
    ~longitude: float,
    ~latitudeDelta: float,
    ~longitudeDelta: float
  ) =>
  t

latitude and longitude are self explanatory while latitudeDelta and longitudeDelta may not. In Apple Developer documentation, latitudeDelta is explained as:

The amount of north-to-south distance (measured in degrees) to display on the map. Unlike longitudinal distances, which vary based on the latitude, one degree of latitude is always approximately 111 kilometers (69 miles).

A visual explanation may be found on stackoverflow.

animated

This can be created using the createAnimated method, given an object of type t.

createAnimated: t => animated