mapbox / mapbox/mapbox-gl-js

Setting { fill | line }-pattern to "" invalidates other { fill | line }-* properties

Open
#8,331 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Ticket to track the same issue in GL-JS that appears on GL-Native as documented in https://github.com/mapbox/mapbox-gl-native/issues/14331.

### Steps to reproduce

1. Set `line-pattern` to "" (empty string) on a layer.

### Expected behavior

Users who want to use a patterned and non-patterned line in the same layer can do so by setting `line-pattern` to `""` or `undefined`.

Users have reported trying to use this as a workaround for lack of DDS support in `line-dasharray` (https://github.com/mapbox/mapbox-gl-js/issues/3045). Similar behavior occurs if you try to render a patterned fill and non-patterned fill in the same layer.

### Actual behavior

Other paint properties such as `line-color` and `line-dasharray` are overwritten, so no line is drawn.

### Configuration
**Browser:** All
**Operating systems + versions:** All

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 by reproducing the issue with an empty line-pattern, then compare how line-pattern and fill-pattern affect other paint properties such as line-color and line-dasharray. Review the related GL-Native issue 14331 and GL-JS issue 3045 for context. Done means patterned and non-patterned lines or fills can coexist without other paint properties being overwritten.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.