visgl / visgl/deck.gl

[Feat] Single `beforeId` for whole `MapboxOverlay`

Open
#8,116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Target Use Case

I am trying to switch from DeckGL as the root component in React, to using MapboxOverlay, in an app with exclusively flat layers (no 3D visualisations).

The intended ordering of layers is (bottom to top):

  • MapLibre GL base layers
  • all deck.gl data visualisation layers
  • MapLibre GL label layers

Currently, as documented, one can set beforeId on individual Deck layers. However, that potentially requires modifying a lot of application code, and coupling it with information about the basemap (the id of the first text layer might be determined dynamically).

Additionally, beforeId isn't actually a Layer prop, so adding it to layers in a TypeScript project presumably involves silencing warnings.

Proposal

In the described scenario where all deck layers should just be sandwiched between the basemap and the map labels, it would be very useful to be able to specify a single beforeId on the MapboxOverlay instead. It would then be used for all layers if they don't have their own 'beforeId' prop defined.

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 at the MapboxOverlay implementation and its documented per-layer beforeId behavior. Trace how overlay layers are inserted relative to MapLibre layers, then define completion as an overlay-level beforeId applying to layers without their own override while preserving individual beforeId values.

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
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.