max-min-coordinate

1.0.1 • Public • Published

max-min-coordinate Build Status

Find the maximum and the minimum value of coordinate X and Y in an array

Latitude is the Y-axis, longitude is the X-axis.

Install

$ npm install max-min-coordinate

Usage

const m = require('max-min-coordinate');
const coordinates = [44.2324, 12.5513, 341.1434, -334.2315, 44.1322, 44.8886];
 
m.getMaxLongitude(coordinates);
//=> 44.8886
 
m.getMinLongitude(coordinates);
//=> -334.2315
 
m.getMaxLatitude(coordinates);
//=> 341.1434
 
m.getMinLatitude(coordinates);
//=> 44.1322

API

getMaxLongitude(input: [object Array]) : number

input

Type: Array

Get the maximum value of longitude in an array.

getMinLongitude(input: [object Array]) : number

input

Type: Array

Get the minimum value of longitude in an array.

getMaxLatitude(input: [object Array]) : number

input

Type: Array

Get the maximum value of latitude in an array.

getMinLatitude(input: [object Array]) : number

input

Type: Array

Get the minimum value of latitude in an array.

License

MIT © JeffMinsungKim

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i max-min-coordinate

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    5.04 kB

    Total Files

    4

    Last publish

    Collaborators

    • jeffminsungkim