coordinates2address

Turn coordinates easily to street address with google maps api

Usage no npm install needed!

<script type="module">
  import coordinates2address from 'https://cdn.skypack.dev/coordinates2address';
</script>

README

coordinates2address

Turn coordinates easily to street address with google maps api

Installation

npm i --save coordinates2address

How to use

Options

  • address: true will return single address
  • address: false will return array of addresses
  const { getLocation } = require('coordinates2address')


 
  // google maps apikey
  const apiKey = '*********';
  
  getLocation(40.730610, -73.935242, {apiKey, address: true})
  
  .then((response) => {
  
     // This will return 38-40 Railroad Ave, Long Island City, NY 11101, USA
    console.log(response)

  });