processLocation
processLocation(location: MXOLocation): Promise<MXOResult<null>>
Example of usage:
const location = {
latitude : 145.432,
longitude : 567.998,
horizontalAccuracy : 933.876,
timestamp : 555.681
}
MedalliaMXO.processLocation(location)
.then(mxoResult => {
if (mxoResult.value && mxoResult.value.apiName) {
// error case
console.error(mxoResult.value)
} else {
// success case
console.log("The location is sent")
}
})
.catch(error => {
console.error(error)
})
try {
const location : MXOLocation = {
latitude : 145.432,
longitude : 567.998,
horizontalAccuracy : 933.876,
timestamp : 555.681
}
const {value} = await MedalliaMXO.processLocation(location)
if (value && value.apiName) {
// error case
console.error(value)
} else {
// success case
console.log("The location is sent")
}
} catch (error) {
console.error(error)
}