apple / apple/embedding-atlas

Layer control instead of drop-down

Open
#138 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.9k
Forks
326
Avg merge
14h 48m
Merged PRs (30d)
7

Description

I think it might be good to introduce a proper "layer control". This is what it's called in GIS but the concept is the same here. Let me explain:

Image

Currently you can toggle between:

  • "points"
  • "density"

However, this is misleading as "density" also displays points.
Also, if you select a text column, labels will show always and you cannot turn them off.

Proposal:

Instead of the dropdown, what GIS uses for this is a simple multiselect (ignore Canada Base section):

Image

Image source: https://github.com/drecchia/maplibre-layer-control

This would solve a few problems:

  • the naming would be fixed, as the density setting would then only control density and not points
  • users could hide the points in density view
  • I'd propose an additional option "labels", where users can turn them on or off and - as we already discussed in https://github.com/apple/embedding-atlas/issues/14 - potentially add a slider here to set the label density on various zoom levels.

As a side note: you could also include the base layer in this control, i.e. the black/white background plane and add a simple color picker if users prefer a differently colored background. But this might be out of scope for you.

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 locating the current points/density dropdown and the label-rendering controls described in the issue; review the related discussion in issue 14. Done should mean a layer control can independently toggle points, density, and labels, while the optional base-layer and label-density ideas are confirmed as in or out of scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.