Click here to Skip to main content
14,268,111 members
Rate this:
Please Sign up or sign in to vote.
See more:
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:,       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); } // get driver position   getDriverPosition(locality, vehicleType, id) { return this.db.object('localities/' + locality + '/' + vehicleType + '/' + id); }    getActiveDriver(locality, vehicleType) { return this.db.list('localities/' + locality + '/' + vehicleType); }

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.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100