GreggHume
Posted on May 30, 2022
Here is an example of how to use the "@googlemaps/markerclusterer":
// ...other imports and then,
import { MarkerClusterer, GridAlgorithm } from "@googlemaps/markerclusterer";
// ... your other map code here
/* Note:
GridAlgorithm seems to be better then the default or
standard algorithm which is SuperClusterAlgorithm
*/
const algorithm = new GridAlgorithm({
gridSize: 60
});
new MarkerClusterer({map, markers, algorithm});
💖 💪 🙅 🚩
GreggHume
Posted on May 30, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.