latlongify

1.0.2 • Public • Published

latlongify

A simple utility to lookup a lat/long pair and tell you:

  • which country it is in
  • which UK county it is in (if in the UK)
  • which US state it is in (if in the USA)
  • the nearest UK town/city (if in the UK)

Installation

npm install --save latlongify

Usage

const latlongify = require('latlongify')
const r = await latlongify.find(52.4226, 0.01) // latitude & longitude
console.log(r)
// {
//   country: { name: 'United Kingdom', code: 'GBR', group: 'Countries' },
//   state: undefined,
//   county: { name: 'Cambridgeshire', group: 'UK Counties' },
//   city: { name: 'Somersham', lat: 52.3823, long: 0.0006 }
// }

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    80
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    80
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i latlongify

Weekly Downloads

80

Version

1.0.2

License

Apache-2.0

Unpacked Size

13.9 MB

Total Files

4

Last publish

Collaborators

  • glynnbird