How can I make the lines I draw in 3D more clear?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description


The first picture is the trajectory I drew in 3D perspective. Because of the large altitude difference, the lines are not clear. The code is as follows:
```
map.setTerrain({ 'source': 'mapbox-dem', 'exaggeration': 1 });
map.addSource("trace", {
type: "geojson",
lineMetrics: true,
data: (data as any).data,
});
map.addLayer({
type: 'line',
source: 'trace',
id: 'line',
paint: {
'line-color': 'yellow',
'line-width': 6,
},
layout: {
'line-cap': 'round',
'line-join': 'round',
'line-z-offset': 20
}
}):
```
How can we achieve the effect shown in Figure 2?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided map.setTerrain, addSource, and addLayer configuration and reproduce the difference between the two figures. Inspect how terrain rendering and 3D line layers handle altitude, depth, and line visibility. Done means identifying a supported configuration or a clearly scoped implementation path that produces the clearer result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100