From 4c93226b771188fcbce4efba916170c63eeca453 Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Thu, 27 Apr 2023 18:51:13 +0300 Subject: [PATCH] update readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f3f17a0..b6ae429 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,17 @@ A very fast JavaScript library for geospatial point clustering for browsers and Node. ```js -const index = new Supercluster({ - radius: 40, - maxZoom: 16 -}); +const index = new Supercluster({radius: 40, maxZoom: 16}); index.load(points); -index.getClusters([-180, -85, 180, 85], 2); + +const clusters = index.getClusters([-180, -85, 180, 85], 2); ``` Clustering 6 million points in Leaflet: -![clusters2](https://cloud.githubusercontent.com/assets/25395/11857351/43407b46-a40c-11e5-8662-e99ab1cd2cb7.gif) +![clustering demo on an interactive Leaflet map](https://cloud.githubusercontent.com/assets/25395/11857351/43407b46-a40c-11e5-8662-e99ab1cd2cb7.gif) + +Supercluster was built to power clustering in [Mapbox GL JS](https://www.mapbox.com/mapbox-gljs). Read about how it works [on the Mapbox blog](https://blog.mapbox.com/clustering-millions-of-points-on-a-map-with-supercluster-272046ec5c97). ## Install