Skip to content

motleyagency/find-lat-lng-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

find-lat-lng-cli Build Status

Find latitudes and longitudes for an array of addresses

Finds latitudes and longitudes for an array of addresses via Google Maps GeoCoding API

Install

$ npm install --global find-lat-lng-cli

Usage

You'll need a Google Maps API-key as an environment variable GOOGLE_MAPS_API_KEY

$ export GOOGLE_MAPS_API_KEY={YOUR_API_KEY} 
 
# then

$ find-lat-lng --help

  Usage
    $ find-lat-lng input [output]

    Options
      --debug, -d  Add debug information

  Example
    $ find-lan-lng-cli input.json
    [
      { address: 'Lonnrotinkatu 5, Helsinki', lat: 60.166924, lng: 24.939788},
      { address: 'Lonnrotinkatu 4, Helsinki', lat: 60.167142, lng: 24.940959},
      ...
    ]

Your input file should be a list of addresses:

[
  "Lonnrotinkatu 4, Helsinki",
  "Lonnrotinkatu 5, Helsinki",
]

If output file was provided, the script will output the data to the file instead of STDOUT.

Usage with npx

You can also use npx:

$ npx cross-env GOOGLE_MAPS_API_KEY={YOUR_API_KEY} npx find-lat-lng-cli input.json output.json

Options

-d, --verbose

Verbose output to see errors if you need to troubleshoot.

Related

License

MIT © Pete Nykänen

About

CLI for find-lat-lng module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published