mapbox / mapbox/mapbox-gl-js

Prototype "bucket merging" for Circle layer

Open
#7,449 4 comments 0 reactions 1 assignee View on GitHub

@ChrisLoer is already working on this.

Since Oct 19, 2018.

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

Description

Layers that aren't clipped at tile boundaries (e.g. Circle and Symbol) can't guarantee consistent draw-order sorting of features that cross the tile boundary. See https://github.com/mapbox/mapbox-gl-js/issues/7111.

One of our proposals for addressing this problem is to try to merge all of the tiles for a layer into a single "mega tile" so that all of the features can be drawn in a single draw call. This would give us the technical capability to control the draw order across all tiles, although we'd still need a separate mechanism to actually determine which order to use (e.g. sorting based on y-position would work fine, but the current approach of "sort based on order in the data" wouldn't work outside of a single-tile context).

As a first step, we plan to prototype "bucket merging" for circle layers: our goal is to figure out the performance characteristics of this approach. The approach will require re-uploading the entire "global" buffer every time any tile changes, and it will also require converting tile coordinates into some kind of global coordinate system -- we need to see if we can keep those costs low enough to make this functionality performant.

cc @ansis @tmpsantos @chloekraw

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.