Alternate Projections camera constraint may lead to extraneous empty space around the map
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.9.0
### Question
**How I can fit a custom map into a div?**
**There is any setting to activate to fit the map?**
I had been trying to use the maps that I created using the studio, but since I started to use these maps, I saw an issue, the map never fit. At the beginning, I thought that probably the error came from the sass file or any class that I was using until today. I made a test using the default map, and works fine, but at the moment when I change the default by custom the issue appears.
Then, I went to the Mapbox Studio, and I could e the issue, that came from the studio itself.

### Links to related documentation
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
The report names mapbox-gl-js 2.9.0, a custom map from Mapbox Studio, and a map inside a div, but no repository file, test, or reproducible code. Start by reproducing the custom-style map in a sized div and compare it with the default map. Done means identifying whether the camera constraint causes the extraneous space and documenting or fixing the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100