Places clustering playground

Tune how charging and fuel stations cluster, how the count badge looks and what it counts

View on GitHub
SDK 1.0.0

Nearby stations merge into counted clusters while zoomed out, a click on one zooms in until it splits, and every panel change redraws them on the places already shown.

  • The pin-clustered marker type of PlacesModule sorts clusters for you. A cluster of one category keeps its icon with a corner badge, and a mixed one gets a centred count.
  • A cluster isn’t a place, so it reaches the module-wide events, where events.where picks it out by its cluster property.
  • cluster sets the clustering options and the badge look in one config, instead of four layer overrides. Its source.properties sums a number onto each cluster for the badge to print, which extraFeatureProps attaches to each place.
  • The panel starts at the defaults that placesKnobCatalogue publishes, which you can read with no map loaded.

Related examples