mapbox / mapbox/mapbox-gl-js

Could we elevate fills above terrain using fill-z-offset (e.g. with fill-elevation-reference)?

Open
#13,663 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature :green_apple:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

## Motivation

I want to be able to elevate any mapbox layer on a map with terrain using the new "z-offset" options. It works well for line-z-offset and symbol-z-offset.

Currently I cannot elevate circles at all (see https://github.com/mapbox/mapbox-gl-js/issues/13311) and fill-z-offset only works from sea level so is not compatible with terrain.

Is there a reason there is no "fill-elevation-reference" equivalent?

## Design Alternatives

There is a workaround to use fill-extrusions but this means using a different layer type.

## Design

Add a "fill-elevation-reference" equivalent with options for "ground", "sea" etc which allows "fill-z-offset" to elevate relative to terrain.

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 reviewing the existing line-z-offset and symbol-z-offset behavior, then compare it with fill-z-offset on terrain. Define how a fill-elevation-reference option such as ground or sea should interact with fill-z-offset; the work is done when fills can be elevated relative to terrain without requiring fill-extrusions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.