Suggestion : Allow text-variable-anchor to be data driven
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/mapbox/mapbox-gl-js/blob/12991995fa1bb62c5ecdb0282c7c142578b897e5/src/style/style_layer/symbol_style_layer_properties.js#L56
The set of anchor positions should be able to vary based on the type of icon being displayed. e.g., for a circular icon, [top, bottom, left, right] may be suitable choices, but for a pushpin icon with the icon's anchor point at the bottom, only [top, left, right] are desired. Since the choice of icon to show within a layer is data-driven, so should the choice of text anchors for the associated labels.
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 src/style/style_layer/symbol_style_layer_properties.js at line 56, where text-variable-anchor is defined. Trace how icon selection and associated label properties are represented and determine how anchor choices could vary with the displayed icon type. Done means the text anchors can be data-driven so different icon shapes support appropriate anchor sets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100