Commit e4a3a4d5 authored by Miurangi Masakorala's avatar Miurangi Masakorala

Changes added to pharmacy controler

parent c638e04e
......@@ -68,13 +68,13 @@ const getDistanceToBusStation = async (req, res) => {
var config = {
method: 'get',
url: `https://maps.googleapis.com/maps/api/place/nearbysearch/json?keyword=bus station&location=${latitude},${longitude}&radius=10000&type=bus station&keyword=&key=${process.env.API_KEY_SECRET}`,
url: `https://maps.googleapis.com/maps/api/place/nearbysearch/json?keyword=bus station&location=${latitude},${longitude}&radius=6000&type=bus station&keyword=&key=${process.env.API_KEY_SECRET}`,
headers: { }
};
axios(config)
.then(function (response) {
console.log("23232xcc",response.data.results)
//console.log("23232xcc",response.data.results)
let newlongitude = response.data.results[0].geometry.location.lat;
let newlatitude = response.data.results[0].geometry.location.lng;
console.log("Nearest Bus station latitude: ",newlatitude);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment