-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added supercluster lib, initializing variables for handling clustering * Setting mapRef to the loaded instance of GoogleMap * Extract zoom and center to state variables, added functions to handle bounds and zoom changes * Slowly adding clustering logic * Clusters being calculated, yay * Render clusters * Dynamically change supercluster radius * Merge remote * Delete route on closing InfoWindow
- Loading branch information
1 parent
28842f2
commit 8a1808b
Showing
6 changed files
with
197 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Clustering venues | ||
|
||
Venues are dynamically clustered on the map with a cluster radius depending on the zoom level. | ||
|
||
To calculate clusters the [supercluster](https://github.com/mapbox/supercluster) packaged is used. | ||
|
||
Clustering mechanism is inspired by this blog post: https://bitsbydenis.medium.com/react-google-maps-marker-clustering-34219f22fed8 | ||
|
||
Here's a sample app behind this post: https://github.com/deni1688/carsharing-map/blob/master/src/App.tsx | ||
|
||
## Misc | ||
|
||
### Missing GeoJSON type | ||
|
||
https://github.com/mapbox/supercluster#typescript | ||
|
||
~~~ | ||
npm install @types/supercluster --save-dev | ||
~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## 7. Read about refs in React | ||
|
||
https://react.dev/learn/referencing-values-with-refs |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.