mapbox / mapbox/mapbox-gl-js

Markers in 3D rendered in wrong order with large pitch

Open
#9,988 0 comments 0 reactions 0 assignees View on GitHub
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**: 1.12.0

**browser**: Chromium Version 84.0.4147.125 (Developer Build) (64-bit)

### Steps to Trigger Behavior

1. Add two markers close to each other.
2. Set pitch to 60°.
3. Rotate.

### Link to Demonstration

#### Animation

https://jsbin.com/tuyomax/edit?html,js,output

#### Screenshot

![Screenshot-20200918-140247](https://user-images.githubusercontent.com/4366292/93595814-b689bc00-f9b8-11ea-8878-d71dd56316a5.png)

### Expected Behavior

The marker that’s closer to the camera should cover (be drawn over) the marker in the background.

### Actual Behavior

In the demo, the blue marker is always drawn in front of the red one — even if the blue marker is in the background w.r.t. rotation (camera position).

Contributor guide

Open the contributing guide

Research direction

Start with the linked JSBin demonstration and reproduce the marker ordering at 60° pitch while rotating. Trace how the two markers are rendered relative to the camera, then verify that the marker closer to the camera is drawn over the background marker across rotations.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.