How do I change the direction of the text-offset coordinate system with text-rotate
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: 2.15.0
### Question

I want to implement the style of the corner arrows and annotations in the image above。
I find that if I change icon-rotate, the icon-offset coordinate system changes with it, but not with text。
```
layout: {
'icon-image': '0',
'icon-offset': {
stops: [
[15, [10, 0]],
[18, [20, 0]],
],
},
'icon-rotate': {
property: 'bearing_in',
stops: [
[0, 0],
[360, 360],
],
},
'text-field': [
'number-format',
['get', 'cost'],
{ 'min-fraction-digits': 1, 'max-fraction-digits': 1 },
],
'text-offset': [
'interpolate',
['linear'],
['zoom'],
15,
['literal', [0.2, 0.2]],
18,
['literal', [20, 3]],
],
'text-allow-overlap': true,
'text-rotate': {
property: 'bearing_in',
stops: [
[0, 0],
[360, 360],
],
},
'text-rotation-alignment': 'map',
'text-size': {
base: 1,
stops: [
[10, 8],
[18, 11],
],
},
'text-font': ['Arial Unicode MS Bold'],
'symbol-avoid-edges': false,
}
```
And my implementation looked like this

How do I change the direction of the text-offset coordinate system with text-rotate?
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
No source file, test, or rendering entry point is named. Start by reproducing the supplied Mapbox GL JS style with text-rotate and text-offset, then trace the text placement behavior to determine whether the coordinate direction can follow rotation; done requires a verified behavior or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100