mapbox / mapbox/mapbox-gl-js

fill-pattern and fill-extrusion-pattern size properties

Open
#8,043 6 comments 0 reactions 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

Motivation

We would like to create a fill-extrusion-pattern which does not scale with zoom/stays at a fixed size. E.g. to create a 'bricked wall' effect on a building. Currently the fill pattern size will change at each zoom level. We could achieve this if there was a size property for the icon and if this could be used with expressions.

Design Alternatives

There's no alternative/workaround to this...except perhaps to use the custom layer interface.

Design

Adding fill-extrusion-pattern-size and fill-pattern-size with expression options should allow us to control the icon size by zoom level. An alternative might be a new property such as 'scale-pattern-with-zoom' which could be true or false.

Mock-Up

This would allow users to control the size of the fill pattern and potential make it a fixed size which does not scale with zoom levels.

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 locating the implementations and property definitions for fill-pattern and fill-extrusion-pattern, then trace how their sizes respond to zoom and expressions. Done means both proposed size properties support expression-driven sizing, including a fixed-size pattern that does not change across zoom levels.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.