Custom pop up not rotating when the map rotates
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
👋 Hello Mapbox Community,
I'm experiencing an issue with customizing the behavior of the Mapbox popup tip. Specifically, the problem is that my custom tip doesn't rotate in sync with the map. I've attempted to apply a CSS transform property to adjust its orientation, but unfortunately, that doesn't seem to work.
📷 Issue Visualized:
(Please refer to the attached image for a clear understanding of the issue.)
📝 What I've Tried:
I'm adding popups programmatically and have also used the following CSS to style the popup tip:
```CSS
.mapboxgl-popup-tip {
width: 20px !important;
height: 20px !important;
background: linear-gradient(to right, red 50%, green 50%) !important;
clip-path: polygon(50% 100%, 0% 0%, 100% 0%) !important;
}
```
Despite these custom styles, the tip refuses to rotate when the map itself is rotated, essentially disregarding any transform styles that I try to apply.
I'd really appreciate any insights or solutions to this challenge. Has anyone faced similar issues or has advice on how to successfully apply the transform property to the Mapbox popup tip?
Thanks in advance for your assistance! 🙏

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 files or tests are identified in the issue. Start by reproducing the popup behavior with the provided CSS while rotating the map; done would mean the custom popup tip rotates in sync with the map.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100