mapbox / mapbox/mapbox-gl-js

Strange background sdf icon

Open
#9,876 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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**: latest

**browser**: last FF

### Steps to Trigger Behavior

add png image for symbol
```javascript
layout: {
'symbol-placement': 'line',
'symbol-spacing': [
'interpolate',
['exponential', 0.5],
['zoom'],
10,
140,
18,
200
],
'icon-allow-overlap': true,
'icon-image': 'direction',
'icon-size': .062
},
paint: {
'icon-color': [
'case',
['has', 'color'], ["get", "color"],
['has', 'user_color'], ["get", "user_color"],
settings.hexColor
],
'icon-opacity': .7
}
```

### Link to Demonstration

demo : https://bl.ocks.org/malwoodsantoro/8fd46a72e12c8c556a75d0b9f0af1669

public demo
![image](https://user-images.githubusercontent.com/7659927/87645323-971eaa80-c74d-11ea-9c29-99a9592b6d26.png)
Same result in my app
![image](https://user-images.githubusercontent.com/7659927/87645380-b0275b80-c74d-11ea-816f-c098a61dda14.png)

Similar issue : https://github.com/mapbox/mapbox-gl-js/issues/7204 which seems not resolved

### Expected Behavior
not an unexpected background of image
### Actual Behavior
an unexpected background of image

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 running the linked bl.ocks.org demonstration in Firefox and reproduce the unexpected image background using the shown symbol layout and paint expressions. Compare the behavior with similar issue #7204; the work is done when the PNG symbol renders without the unexpected background while retaining the described icon styling.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.