RoutePlanner
An interactive route planning component with traffic-aware suggestions.
π Overviewβ
| Property | Value |
|---|---|
| File | src/components/RoutePlanner.tsx |
| Type | React Functional Component |
| Author | UIP Team |
| Version | 1.0.0 |
π― Purposeβ
- Plan routes between locations
- Consider real-time traffic conditions
- Provide alternative routes
- Estimate travel times
π Usageβ
import { RoutePlanner } from '@/components/RoutePlanner';
function NavigationPage() {
return (
<RoutePlanner
onRouteSelect={handleRouteSelect}
trafficData={liveTrafficData}
/>
);
}
π¦ Propsβ
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
onRouteSelect | (route: Route) => void | Yes | - | Selection handler |
trafficData | TrafficData | No | - | Live traffic data |
origin | LatLng | No | - | Start location |
destination | LatLng | No | - | End location |
showAlternatives | boolean | No | true | Show alt routes |