mapbox / mapbox/mapbox-gl-js

Prevent small GeoJSON line features from disappearing at low zoom levels

Open
#8,635 13 comments 4 reactions 1 assignee View on GitHub

@rreusser is already working on this.

Since Sep 8, 2021.

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

Description

## Motivation

For features in a line layer, when zoomed out past a certain point (guessing when lines reach ~1 px or less in length), the lines disappear entirely, even if they have a width and rounded endcaps.

For many use cases, such as showing a highlight for particular features, we would still like to be able to see that these features are present, as it's misleading otherwise.

## Design Alternatives

Rendering the endcaps of the line would solve the visibility problem, showing a circle or a square instead of nothing.
For compatibility with the existing behavior (which is desired behavior for other use cases),
an opt-in layout property could be used to enable this.

Not sure about naming or implementation as I'm not an expert on the codebase, although I could certainly look into it :)

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.