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

CitizenReportMap

A specialized map component for displaying and interacting with citizen reports.

📋 Overview

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

🎯 Purpose

  • Display citizen reports on interactive map
  • Allow location selection for new reports
  • Cluster markers for better visualization
  • Filter and highlight reports

🚀 Usage

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

function ReportsPage() {
return (
<CitizenReportMap
reports={reportList}
onLocationSelect={handleLocationSelect}
onReportClick={handleReportClick}
/>
);
}

📦 Props

PropTypeRequiredDefaultDescription
reportsCitizenReport[]Yes-List of reports
onLocationSelect(latlng: LatLng) => voidNo-Location pick handler
onReportClick(report: CitizenReport) => voidNo-Report click handler
selectionModebooleanNofalseEnable location pick
filtersReportFiltersNo-Active filters

🎨 Features

  • Clustering - Groups nearby markers
  • Color coding - By report type and status
  • Popup details - Quick view of report info
  • Location picker - Click to set report location

See the complete components reference for all available components.