mapbox / mapbox/mapbox-gl-js

Add cluster expansion zoom for clustered MTS tilesets

Open
#13,548 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature :green_apple:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

## Motivation

Being able to click into clustered points when using a clustered MTS tileset like the `.getClusterExpansionZoom` function supported for a geojson source.

https://docs.mapbox.com/mapbox-gl-js/example/cluster/#:~:text=getClusterExpansionZoom

## Design

Clicking a clustered point would either reveal the next batch of clustering, or if there are no more clusters then reveal the features.

Currently, you either have to zoom straight into the features (potentially bypassing other clusters), or incrementally zoom in which means the customer clicking on the same cluster multiple times. Therefore, the advantage of this approach is improving customer experience when clicking on clusters.

This approach works really well with `.getClusterExpansionZoom` for geojson sources so it would be good to see it available for MTS tilesets as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing getClusterExpansionZoom behavior for GeoJSON sources and the linked clustering example, then compare it with clustered MTS tilesets. Done means defining and implementing equivalent expansion behavior that reveals the next cluster or the underlying features when no clusters remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.