Last active
June 18, 2019 14:14
-
-
Save armand1m/9261840b073e840214c22c8a0e68dab8 to your computer and use it in GitHub Desktop.
snippet on how to use geocoder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const NodeGeocoder = require('node-geocoder'); | |
const { geocode } = NodeGeocoder({ | |
provider: 'google', | |
apiKey: 'YOUR_API_KEY', | |
}); | |
(async () => { | |
const location = await geocode('29 champs elysée paris'); | |
/** A list of matching locations is returned */ | |
console.log(JSON.stringify(location)); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment