PatternZones
A map layer component for visualizing detected traffic patterns as zones.
π Overviewβ
| Property | Value |
|---|---|
| File | src/components/PatternZones.tsx |
| Type | React Functional Component |
| Author | UIP Team |
| Version | 1.0.0 |
π― Purposeβ
- Display detected traffic patterns
- Show recurring congestion zones
- Visualize peak hour patterns
- Highlight anomaly areas
π Usageβ
import { PatternZones } from '@/components/PatternZones';
function MapComponent() {
return (
<MapContainer>
<PatternZones
patterns={patternData}
visible={showPatterns}
onPatternClick={handlePatternClick}
/>
</MapContainer>
);
}
π¦ Propsβ
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
patterns | Pattern[] | Yes | - | Pattern data |
visible | boolean | No | true | Layer visibility |
onPatternClick | (p: Pattern) => void | No | - | Click handler |
opacity | number | No | 0.4 | Zone opacity |
showLabels | boolean | No | true | Show zone labels |
π¨ Pattern Typesβ
| Pattern | Color | Description |
|---|---|---|
| Peak Hour | π΄ Red | Rush hour congestion |
| Recurring | π Orange | Daily patterns |
| Weekend | π£ Purple | Weekend patterns |
| Anomaly | π‘ Yellow | Unusual patterns |
π Related Componentsβ
- SpeedZones - Speed visualization
- AnalyticsDashboard - Analytics
- TrafficMap - Map container
See the complete components reference for all available components.