Client-Side Clustering in Mapbox GL JS: When the Browser Should Do the Aggregation
Mapbox GL JS can cluster thousands of points entirely in the browser with cluster: true — no server required. Here's a working setup, the click-to-expand pattern, and the dataset size where you must switch to server-side aggregation.