Google Geocode NodeJS
// npm install request --save
var request = require("request");
exports.FindByKeyWord = function (req, res, next) {
var API_KEY = "SOMEDATA";
var BASE_URL = "https://maps.googleapis.com/maps/api/geocode/json?address=";
var address = "1600 Amphitheatre Parkway, Mountain View, CA";
var url = BASE_URL + address + "&key=" + API_KEY;
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {
res.json(body);
}
else {
// The request failed, handle it
}
});
};
Inquisitive Impala