Skip to main content

AccidentMarkers

Map markers component for displaying accident locations with severity indicators.

πŸ“‹ Overview​

PropertyValue
Filesrc/components/AccidentMarkers.tsx
TypeReact Functional Component
AuthorUIP Team
Version1.0.0

🎯 Purpose​

  • Display accident locations on the map
  • Color-coded severity indicators (critical, high, medium, low)
  • Clickable markers with popup details
  • Real-time updates for new accidents

πŸš€ Usage​

import { AccidentMarkers } from '@/components/AccidentMarkers';

function MapComponent() {
return (
<MapContainer>
<AccidentMarkers
accidents={accidentList}
onMarkerClick={handleAccidentClick}
/>
</MapContainer>
);
}

πŸ“¦ Props​

PropTypeRequiredDefaultDescription
accidentsAccident[]Yes-List of accidents
onMarkerClick(accident: Accident) => voidNo-Click handler
showPopupbooleanNotrueShow popup on click
filterSeveritystring[]No[]Filter by severity

🎨 Severity Colors​

SeverityColorIcon
CriticalπŸ”΄ RedAlertCircle
High🟠 OrangeAlertTriangle
Medium🟑 YellowAlert
Low🟒 GreenInfo

See the complete components reference for all available components.