Skip to content

feat(TileLayer): Add overdraw prop#10091

Open
felixpalmer wants to merge 2 commits intomasterfrom
felix/tile-layer-overdraw
Open

feat(TileLayer): Add overdraw prop#10091
felixpalmer wants to merge 2 commits intomasterfrom
felix/tile-layer-overdraw

Conversation

@felixpalmer
Copy link
Copy Markdown
Collaborator

Background

The extent prop in TileLayer controls whether tiles are fetched & drawn when the viewport zoom is below minZoom, but there is no mechanism to control this for zooms above maxZoom.

Change List

  • Add overdraw prop (default true to maintain current behavior)
  • When overdraw = false Tileset2D doesn't load any tiles in viewport
  • Update website example to demonstrate how these props interact


- Default: 0

#### `overdraw` (boolean, optional) {#overdraw}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good name? overzoom?

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 12, 2026

Coverage Status

coverage: 91.011% (-0.001%) from 91.012%
when pulling 41e46ba on felix/tile-layer-overdraw
into cad5eeb on master.

@Pessimistress
Copy link
Copy Markdown
Collaborator

It has always been a point of confusion because minZoom and maxZoom sounds symmetrical, but they work differently. There are two behaviors - visibility and fetching - that the users may want to control in underzoom/overzoom. I personally think we should have four props for each of these.

@felixpalmer
Copy link
Copy Markdown
Collaborator Author

felixpalmer commented Mar 26, 2026

@Pessimistress so would you be in favour of:

  • minZoom: min zoom level at which tiles are fetched
  • maxZoom: max zoom level at which tiles are fetched
  • minDisplay: min zoom level at which tiles are displayed
  • maxDisplay: max zoom level at which tiles are displayed
  • extent: clipping region for tile fetches

minDisplay & maxDisplay are new, while the other keep the current behavior. We then don't need overdraw at all

@chrisgervang
Copy link
Copy Markdown
Collaborator

How about naming the new props:

  • visibleMinZoom: min zoom level at which tiles are visible
  • visibleMaxZoom: max zoom level at which tiles are visible

Along the same lines as the visible prop for layers and reads naturally ("visible at min zoom")

@ibgreen
Copy link
Copy Markdown
Collaborator

ibgreen commented Mar 27, 2026

No big objections other as long as we put in some effort on the prop naming, to make this as orthogonal, expandable and intuitive as we can.

FWIW

  • I have sometimes wanted a minZoom/maxZoom prop (or visibleMinZoom, visibleMaxZoom or ...) prop on all layers.
  • One use case is that as one zooms in one can change between a more aggregated view (perhaps a point layer) and then a detailed layer (e.g. a HexagonLayer) as one gets close, but there are other use cases as well.
  • I expect this can be done with the layerFilter mechanism but that is a bit clunky (centralized and non-declarative).

Just mill for the grist if we are ideating about such props.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants