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

CitizenReportMarkers

Map markers component for rendering citizen report locations with type-specific icons.

📋 Overview

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

🎯 Purpose

  • Render report markers on map
  • Type-specific icons and colors
  • Status indicators (pending, verified, resolved)
  • Interactive popups with report details

🚀 Usage

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

function MapComponent() {
return (
<MapContainer>
<CitizenReportMarkers
reports={reportList}
onMarkerClick={handleClick}
/>
</MapContainer>
);
}

📦 Props

PropTypeRequiredDefaultDescription
reportsCitizenReport[]Yes-Report data
onMarkerClick(report: CitizenReport) => voidNo-Click handler
showPopupsbooleanNotrueEnable popups
filterStatusstring[]No-Filter by status

🎨 Report Type Icons

TypeIconColor
Accident🚗Red
Congestion🚦Orange
Hazard⚠️Yellow
Roadwork🚧Blue
Flooding💧Cyan
Other📍Gray

See the complete components reference for all available components.