retain map bounds on resize
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Breaking out from https://github.com/mapbox/mapbox-gl-js/issues/4269 it would be nice to provide an option to try and retain view bounds on map resize. The current behaviour is to retain the center and zoom, instead this would retain the center, but change the zoom so the extent of the map stays the same.
The complication here is if the aspect ratio changes, we'd need to know the original bounds to retain.
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
Read the linked issue #4269 first, then investigate how map resize currently preserves the center and zoom. Define how an opt-in behavior should retain the map's original bounds when the aspect ratio changes, and document the expected result for those resize cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100