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.