Hi! im tring to call google distancematrix service from ionic httpnative with this code:
this.httpNative.get(https://maps.googleapis.com/maps/api/distancematrix/json?origins=Roma,RM&destinations=Pisa,PI,Italy&departure_time=now&key=xxxxxxx", {},{}).then(data => {
this.sResult = JSON.stringify(data);
this.jsonDistance = JSON.parse(this.sResult);
})
.catch(error => {
console.log(error.status);
console.log(error.error);
console.log(error.headers);
when i run the project whit the command “ionic cordova run android” on a usb device, i have the “undefined” error in console.
Can you help me, or link a solution?
Thanks a lot