I'm using a component named "trip" and this component tries to recover some information, like 'rider id', 'tax' and 'distance' between driver and rider.
When Geolocalization function is passing to the component, it doesn't recover all the objects. I think that Cordova Plugin doesn't ok.
Runtime Error Firebase.set failed: First argument contains undefined in property 'deals.xk7ePu6qC8ZrPeJ0jPxZ7K9kBw33.fee'
Race requisition:
makeDeal(driverId, origin, destination, distance, fee, currency, note, paymentMethod, promocode, discount) { let user = this.authService.getUserData(); return this.db.object('deals/' + driverId).set({ passengerId: user.uid, currency: currency, origin: origin, destination: destination, distance: distance, fee: fee, note: note, paymentMethod: paymentMethod, status: DEAL_STATUS_PENDING, createdAt: Date.now(), promocode: promocode, discount: discount }); }
Search the API for the location, id, of the nearby drivers, and calculate the distance:
getDriver(id) { return this.db.object('drivers/' + id); }
Can anyone help me?
What I have tried:
I tried to increase to "high accuracy" in location settings and I've set the permissions to try to solve this issue.