mapbox / mapbox/mapbox-gl-js

Line layer with fill-pattern disappears in combination with raster-dem terrain.

Open
#13,408 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: v3.10.0, works as expected in v3.9.4

**browser**: Chrome, Safari, Firefox.

### Steps to Trigger Behavior

1. Add a `line` layer with `line-pattern` set to an image pattern.
2. The line pattern is visible on the map.
3. Add a `raster-dem` source and enable it with `setTerrain()`.
4. The line pattern disappears.
5. Removing the fill-pattern property shows the lines correctly.

### Link to Demonstration

[jsfiddle Example](https://jsfiddle.net/9a2bvz48/11/)

### Expected Behavior

The `line-pattern` used to render correctly on the line layer, even when terrain is enabled.

### Actual Behavior

When terrain is enabled using `setTerrain()`, the `line-pattern` stops rendering entirely. The issue persists across different `line-pattern` images and remains even when adjusting zoom, pitch, or bearing.

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

Reproduce the issue using the linked JSFiddle with a line layer using line-pattern, then add a raster-dem source and enable terrain with setTerrain(). Compare the behavior with v3.9.4 and without the fill-pattern property; done means the line pattern renders while terrain remains enabled across the reported browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.