SimpleLegend
A simplified legend component for basic map symbology.
📋 Overview
| Property | Value |
|---|---|
| File | src/components/SimpleLegend.tsx |
| Type | React Functional Component |
| Author | UIP Team |
| Version | 1.0.0 |
🎯 Purpose
- Display simple map legend
- Minimal footprint design
- Quick reference for colors
- Non-interactive display
🚀 Usage
import { SimpleLegend } from '@/components/SimpleLegend';
function MapComponent() {
return (
<MapContainer>
<SimpleLegend
items={legendItems}
position="bottomleft"
/>
</MapContainer>
);
}
📦 Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
items | LegendItem[] | Yes | - | Legend items |
position | MapPosition | No | 'bottomleft' | Position |
title | string | No | - | Legend title |
🔧 Legend Item
interface LegendItem {
label: string;
color: string;
shape?: 'circle' | 'square' | 'line';
}
📖 Related Components
- MapLegend - Full legend
- TrafficMap - Map container
See the complete components reference for all available components.