convert-coords

0.2.0 • Public • Published

Convert Coordinates

This module takes a nested object in the form of two objects, lat and long, each of which is containing a pair of lat. and/or long. values demarcating a section on a map. The names of the keys are unknown to the module, only that each sub object contains two lat. or two long. values.

It returns an object like so:

{
  lat: {
    northBorder: 45.9,
    southBorder: 47.7
  },
  long: {
    eastBorder: -123.45,
    westBorder: -123.83
  }
}

This allows the incoming coordinates to be used regardless of the names of the keys used.

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i convert-coords

    Weekly Downloads

    3

    Version

    0.2.0

    License

    ISC

    Unpacked Size

    208 kB

    Total Files

    17

    Last publish

    Collaborators

    • goodwid