Skip to content

Commit

Permalink
Fix for markercluster getcrsrd link
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasm0 committed Jul 18, 2024
1 parent 969b7b0 commit a8ad536
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stories/pages/React/MarkerCluster/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ import data from '@/pages/MarkerCluster/data.json?raw';

This is a simple implementation of the [Mapbox](https://www.mapbox.com/) [Supercluster library](https://github.com/mapbox/supercluster) in a React component.

**Warning** This component won't work for markers with the same coordinates value. They will render on top of the previously rendered marker. For handling markers with the same coordinates, there is an [advanced variant of this component](./?path=/story/react-markerclusterspider--default) where the clustered markers can be configured to display in a 'spider' or spiral.
**Warning** This component won't work for markers with the same coordinates value. They will render on top of the previously rendered marker. For handling markers with the same coordinates, there is an [advanced variant of this component](./?path=/docs/react-markerclusterspiderfy--docs) where the clustered markers can be configured to display in a 'spider' or spiral.

## How to implement

To implement marker clustering with Leaflet, there are 8 files:

1. The React component
* [MarkerCluster.tsx](#--markerclustertsx)
* *This is based on the [BaseMap component example](./?path=/docs/react-baselayer--docs) so includes a dependency on [`utils/getCrsRd`](./?path=/docs/react-baselayer--docs#1-getcrsrdts).*
* *This is based on the [BaseMap component example](./?path=/docs/react-baselayer--docs) so includes a dependency on [`utils/getCrsRd`](./?path=/docs/react-baselayer--docs#--getcrsrdts).*
2. Normalizing external data
* [utils/toGeoJSON.ts](#--utilstogeojsonts)
*(This is only required for this demo to work; it helps format the external `data.json` array into GeoJSON format.)*
Expand Down

0 comments on commit a8ad536

Please sign in to comment.