UNPKG

gros-bras-shared

Version:

This holds all shared files such as interfaces or helpers used by Gros Bras, both frontoffices and baackoffices, and backend etc...

10 lines (9 loc) 532 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.googleDistance = void 0; var axios = require("axios"); var googleDistance = function (origin, destination, gmapKey) { var url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=".concat(origin.lat, ",").concat(origin.lng, "&destinations=").concat(destination.lat, ",").concat(destination.lng, "&departure_time=now&key=").concat(gmapKey); return axios.default.get(url); }; exports.googleDistance = googleDistance;