Last active
December 12, 2019 21:13
-
-
Save heri/7254abcde45377e96c6004700d6d7788 to your computer and use it in GitHub Desktop.
This file contains 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
var my_city = "Montreal"; | |
var getJSON = require("async-get-json"); | |
var geLatLng = await getJSON("https://api.opencagedata.com/geocode/v1/json?key=50adaa7181d24a7581a62fd3d9c0a2e0&q=" + my_city); | |
var latLng = geLatLng.results[0].geometry["lng"] + "," + geLatLng.results[0].geometry["lat"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment