mapbox / mapbox/mapbox-gl-js

circular image rendered as square when "sdf":true for image, "icon-allow-overlap": true, 'icon-size': 0.1, using sample data

Open
#12,818 0 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**: mapbox-gl v1.13.2

**browser**: chrome

### Steps to Trigger Behavior
Example data of the same point coordinates,
1. map.addImage("circle",image,{sdf:true})
2. "icon-image":"circle"
3. "icon-size": 0.1
4. "icon-allow-overlap": true
5. "icon-color": "#EE4D5A"

### Link to Demonstration
https://codesandbox.io/s/silly-brook-kyn67m?file=/index.html
or
https://jsbin.com/peqinowovi/1/edit?html,js,output

using this image:
![circle](https://github.com/mapbox/mapbox-gl-js/assets/48538029/8c2e467f-66ad-439b-8f50-2e0795901d69)

### Expected Behavior
![image](https://github.com/mapbox/mapbox-gl-js/assets/48538029/861e734a-3a2f-4937-aef5-8ee45616afec)

### Actual Behavior
![image](https://github.com/mapbox/mapbox-gl-js/assets/48538029/46197afd-9845-4a53-b884-6d956b1282b2)

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 with the linked CodeSandbox or JSBin reproduction and verify the behavior using map.addImage with sdf:true and the listed icon properties. Trace the image rendering path for the circular image, then compare the rendered result with the expected image. Done means the same sample data renders the circular image rather than a square.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.