Chuyển tới nội dung chính

RoutePlanner

An interactive route planning component with traffic-aware suggestions.

📋 Overview

PropertyValue
Filesrc/components/RoutePlanner.tsx
TypeReact Functional Component
AuthorUIP Team
Version1.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

PropTypeRequiredDefaultDescription
onRouteSelect(route: Route) => voidYes-Selection handler
trafficDataTrafficDataNo-Live traffic data
originLatLngNo-Start location
destinationLatLngNo-End location
showAlternativesbooleanNotrueShow alt routes

📊 Route Information

FieldDescription
DistanceTotal route distance
DurationEstimated travel time
Traffic DelayCurrent delay
IncidentsNumber of incidents

See the complete components reference for all available components.