feat([2fd88f42]): display attributes in point tooltip
This commit is contained in:
@@ -16,6 +16,7 @@ export interface HeatmapPoint {
|
||||
lat: number;
|
||||
lon: number;
|
||||
count: number;
|
||||
attributes_summary?: Record<string, string[]>;
|
||||
}
|
||||
|
||||
export type MapMode = 'points' | 'heatmap';
|
||||
|
||||
@@ -43,6 +43,11 @@ const MapDisplay: React.FC<MapDisplayProps> = ({ heatmapData, radiusMultiplier,
|
||||
<Tooltip>
|
||||
PLZ: {point.plz} <br />
|
||||
Count: {point.count}
|
||||
{point.attributes_summary && Object.entries(point.attributes_summary).map(([attr, values]) => (
|
||||
<div key={attr}>
|
||||
<strong>{attr}:</strong> {values.join(', ')}
|
||||
</div>
|
||||
))}
|
||||
</Tooltip>
|
||||
</CircleMarker>
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user