Route Features¶
The Route API provides a comprehensive set of features to customize and optimize your routing calculations. Each feature addresses specific routing requirements and use cases.
🎯 Available Features¶
Core Routing Features¶
| Feature | Description | Use Case |
|---|---|---|
| Waypoints | Add intermediate stops | Multi-stop deliveries, tours |
| Alternatives | Multiple route options | Comparison, flexibility |
| Minimize Criteria | Distance or duration optimization | Cost vs speed balance |
Vehicle-Specific Features¶
| Feature | Description | Use Case |
|---|---|---|
| Vehicle Specifications | Dimensions, axle count, hazardous goods | Truck routing, commercial vehicles |
Route Customization¶
| Feature | Description | Use Case |
|---|---|---|
| Feature Avoidance | Avoid tunnels, ferries, tolls, etc. | Safety, cost control, restrictions |
| Toll Calculations | Calculate toll costs | Budget planning, cost estimation |
💡 Feature Combinations¶
Delivery Optimization¶
Combine waypoints + minimize duration for fast multi-stop deliveries.
{
"origin": [41.0082, 28.9784],
"waypoints": [[41.01, 28.98], [41.012, 28.982]],
"destination": [41.015, 28.985],
"minimize": "duration"
}
Cost-Effective Routing¶
Combine minimize distance + avoid tolls for economical routes.
{
"origin": [41.0082, 28.9784],
"destination": [41.015, 28.985],
"minimize": "distance",
"avoid_features": ["toll_road"]
}
Commercial Truck Routing¶
Combine vehicle specs + feature avoidance for safe truck routes.
{
"mode": "truck",
"origin": [41.0082, 28.9784],
"destination": [41.015, 28.985],
"vehicle": {
"length": 1200,
"height": 350,
"hazardous_goods": ["flammable"]
},
"avoid_features": ["tunnel"]
}
Route Comparison with Cost Analysis¶
Combine alternatives + toll calculations for informed decisions.
{
"origin": [41.0082, 28.9784],
"destination": [41.015, 28.985],
"alternatives": 3,
"tolls": true,
"currency": "EUR"
}
🔧 Best Practices¶
Start Simple¶
Begin with basic origin-destination routing, then add features as needed.
Test Combinations¶
Different feature combinations can yield significantly different results.
Consider Use Case¶
Match features to your specific business requirements and constraints.
Monitor Performance¶
More features may increase calculation time - balance needs vs speed.
📊 Feature Support by Mode¶
| Feature | Car Mode | Truck Mode |
|---|---|---|
| Waypoints | ✅ | ✅ |
| Alternatives | ✅ | ✅ |
| Minimize Criteria | ✅ | ✅ |
| Vehicle Specs | ⚠️ Basic | ✅ Full Support |
| Feature Avoidance | ✅ | ✅ |
| Toll Calculations | ✅ | ✅ |
🚀 Next Steps¶
Explore individual feature documentation to learn about: - Detailed parameters and options - Usage examples and code samples - Best practices and recommendations - Common pitfalls and solutions
Understanding and effectively combining Route API features enables you to build sophisticated routing solutions tailored to your specific needs.