Overview
The location sharing feature allows passengers and drivers to share their real-time location during active trips. This enables:- Passengers to see driver’s approaching location
- Drivers to navigate to passenger pickup location
- Real-time trip tracking for safety
Location Sharing URL
The location sharing module is available at:Generate Sharing Token
The exact endpoint for generating location sharing tokens depends on your backend implementation. Typically, this would be part of the trip creation or assignment process.
Sharing Token Structure
Update Driver Location
Request Body
integer
required
Driver ID
number
required
Current latitude
number
required
Current longitude
Request Example
Dart
Location Tracking Best Practices
Update Frequency
Recommended settings:- Distance filter: 10-20 meters
- Time interval: 5-10 seconds
- Accuracy: High (for active trips)
Battery Optimization
Real-Time Location Display
Passenger View (Track Driver)
Share Location Link
Generate a shareable link for real-time location tracking:Privacy and Security
Token Expiration
WebSocket Integration (Future)
For real-time updates with lower latency, consider implementing WebSocket support:
Error Handling
See Also
- Trip Status - Monitor trip progress
- Driver Profile - Manage driver information
- Geocoding - Convert coordinates to addresses