Bring Your Own Data: Clusters and Polygons

20k clustered random points and random polygons around London, rendered with the CustomGeoJSONModule. Both layers are clickable.

View on GitHub
SDK 1.0.0-rc.7

Two datasets generated in the browser share one module. Circles merge into counted bubbles as you zoom out, over translucent rectangles.

  • CustomGeoJSONModule.create takes a named source per dataset, and cluster options make the merging a matter of configuration. The layers read group size off point_count.
  • show names its target source, so the second dataset lands beside the first without a second module.
  • events.points delivers the clicked feature per source, plus the raw rendered features a merged bubble needs.

Related examples