lml-main
Version:
This is now a mono repository published into many standalone packages.
20 lines • 693 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var lodash_1 = require("lodash");
// TODO - this needs to be depracated as soon as the job service
// service has been updated to use the new format
exports.formatAddressOldToNew = function (location) {
var latitude = lodash_1.get(location, 'position.coordinates[1]', 0);
var longitude = lodash_1.get(location, 'position.coordinates[0]', 0);
return {
address: location.address,
position: {
type: 'Point',
coordinates: {
latitude: latitude,
longitude: longitude,
},
},
};
};
//# sourceMappingURL=format.js.map