npm.io
1.9.0 • Published 4 years ago

@ahmadlamber/getnearestlatitudeandlongitudefromarray

Licence
ISC
Version
1.9.0
Deps
0
Size
9 kB
Vulns
0
Weekly
0

��## Install

npm i @ahmadlamber/getnearestlatitudeandlongitudefromarray

Usage

import GetnearestLatitudeandLongitudefromarray from '@ahmadlamber/getnearestlatitudeandlongitudefromarray'

Functions and Example

 array = [ {
    "timestampMs" : "1389633689564",
    "latitudeE7" : 4233738877,
    "longitudeE7" : 1066510714,
    "accuracy" : 20
  }, {
    "timestampMs" : "1446040136103",
    "latitudeE7" : 3974349226,
    "longitudeE7" : 1157765074,
    "accuracy" : 1212
  }, {
    "timestampMs" : "1502203327757",
    "latitudeE7" : 4094251339,
    "longitudeE7" : 3728135318,
    "accuracy" : 16
  } ]  ; 

var ponit = {
  "latitudeE7" : 4094251339,
    "longitudeE7" : 3728135318,
} 

  var  ruslt = GetnearestLatitudeandLongitudefromarray(array ,ponit  )

// {
//     "Minimumdistanceinklm": 0,
//     "lat": 4094251339,
//     "lng": 3728135318
// }