Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/app/docs/_components/examples/cluster-example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { useState } from "react";
import { Map, MapClusterLayer, MapPopup, MapControls } from "@/registry/map";
import { PinIcon } from "lucide-react";

interface EarthquakeProperties {
mag: number;
Expand Down Expand Up @@ -30,6 +31,14 @@ export default function ClusterExample() {
properties: feature.properties,
});
}}
renderPoint={(props) => {
console.log(props);
return (
<>
<PinIcon className="h-4 w-4" />
</>
);
}}
/>

{selectedPoint && (
Expand Down
2 changes: 1 addition & 1 deletion src/app/docs/clusters/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function ClustersPage() {
<DocsSection title="Basic Example">
<p>
Click on clusters to zoom in. Click individual points to see details
in a popup.
in a popup. You can also provide a custom renderer to the <DocsCode>MapClusterLayer</DocsCode> component to render a custom icon for each point.
</p>
</DocsSection>

Expand Down
Loading