Skip to content

Instantly share code, notes, and snippets.

@armand1m
Last active June 18, 2019 14:14
Show Gist options
  • Save armand1m/9261840b073e840214c22c8a0e68dab8 to your computer and use it in GitHub Desktop.
Save armand1m/9261840b073e840214c22c8a0e68dab8 to your computer and use it in GitHub Desktop.
snippet on how to use geocoder
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