fix([2fd88f42]): correct import statement for MarkerClusterGroup in MapDisplay.tsx
This commit is contained in:
@@ -5,6 +5,7 @@ import { HeatmapLayer } from 'react-leaflet-heatmap-layer-v3';
|
|||||||
import 'leaflet/dist/leaflet.css';
|
import 'leaflet/dist/leaflet.css';
|
||||||
import 'leaflet.heat';
|
import 'leaflet.heat';
|
||||||
import type { HeatmapPoint, MapMode } from '../App';
|
import type { HeatmapPoint, MapMode } from '../App';
|
||||||
|
import MarkerClusterGroup from 'react-leaflet-cluster';
|
||||||
|
|
||||||
interface MapDisplayProps {
|
interface MapDisplayProps {
|
||||||
heatmapData: HeatmapPoint[];
|
heatmapData: HeatmapPoint[];
|
||||||
@@ -28,13 +29,6 @@ const MapDisplay: React.FC<MapDisplayProps> = ({ heatmapData, radiusMultiplier,
|
|||||||
return '#66bd63'; // Green
|
return '#66bd63'; // Green
|
||||||
};
|
};
|
||||||
|
|
||||||
import MarkerClusterGroup from 'react-leaflet-cluster';
|
|
||||||
|
|
||||||
// ... (imports and interface definitions)
|
|
||||||
|
|
||||||
const MapDisplay: React.FC<MapDisplayProps> = ({ heatmapData, radiusMultiplier, viewMode }) => {
|
|
||||||
// ... (helper functions and state)
|
|
||||||
|
|
||||||
const renderPoints = () => (
|
const renderPoints = () => (
|
||||||
<MarkerClusterGroup>
|
<MarkerClusterGroup>
|
||||||
{heatmapData.map((point, idx) => (
|
{heatmapData.map((point, idx) => (
|
||||||
@@ -62,10 +56,6 @@ const MapDisplay: React.FC<MapDisplayProps> = ({ heatmapData, radiusMultiplier,
|
|||||||
</MarkerClusterGroup>
|
</MarkerClusterGroup>
|
||||||
);
|
);
|
||||||
|
|
||||||
// ... (rest of the component)
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const renderHeatmap = () => (
|
const renderHeatmap = () => (
|
||||||
<HeatmapLayer
|
<HeatmapLayer
|
||||||
points={heatmapData}
|
points={heatmapData}
|
||||||
@@ -98,4 +88,4 @@ const MapDisplay: React.FC<MapDisplayProps> = ({ heatmapData, radiusMultiplier,
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default MapDisplay;
|
export default MapDisplay;
|
||||||
Reference in New Issue
Block a user