mapbox / mapbox/mapbox-gl-js

Support pitch expressions in paint & layout properties

Open
#11,613 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

## Motivation

As a user I would like to translate POI icons based on pitch value. So if a map would be pitched, I could for example translate features based on the pitch. This could help to achieve something like this:
![image](https://user-images.githubusercontent.com/13899537/158584804-b8f962a2-87a6-4f00-91dd-41753e245bbf.png)

(Image from @willymaps)

So like in this example, but instead of turning the labels on/off, I would like to see a smooth transition of the labels moving. In my case they would be moving upwards, with an increased -Y offset, which I could achieve with an expression if I could use the pitch property value.

cc: @tristen

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 how paint and layout expressions currently access map properties, with attention to the pitch value and the requested POI label offset behavior. Done means expressions can use pitch to produce a smooth transition, such as moving labels upward as the map pitch increases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.