mapbox / mapbox/mapbox-gl-js

Stepped heatmap colors still have gradient on edges with low intensity

Open
#7,998 0 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

**mapbox-gl-js version**: 0.52

**browser**: chrome

### Steps to Trigger Behavior

1. Make a heatmap and set the `heatmap-color` to `'step'` instead of `'interpolate'`
2. Set the `heatmap-intensity` to `0.01`
3. Make the first `step` trigger at `0.001` (so that 0 is still transparent but any value at all will tip it over into having a color)

### Link to Demonstration

https://jsfiddle.net/strangerelics/Lf93vq5w/30/

### Expected Behavior

The outer edges of the heatmap are hard lines with no gradient, just like the inner edges.

### Actual Behavior

The outer edges of the heatmap are a gradient out to transparent, even though the inner edges are hard lines.

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 JSFiddle and reproduce the issue using heatmap-color set to step, heatmap-intensity 0.01, and a first step at 0.001. Compare the expected hard outer edge with the observed fade to transparency, then trace the heatmap rendering path until the differing edge behavior is located; done means the outer and inner step edges render consistently.

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
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.