Skip to content

fix map center calculation in ScaleControl #11657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 31, 2022
Merged

Conversation

stepankuzmin
Copy link
Contributor

The Scale control was always using the left-hand side of the map to calculate the scale. In some cases, e.g., when using the Equal Earth projection, the scale couldn't calculate correctly.

Launch Checklist

  • briefly describe the changes in this PR
  • manually test the debug page
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>fix map center calculation in ScaleControl</changelog>

Sorry, something went wrong.

Copy link
Member

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth adding a test too?

@avpeery
Copy link
Contributor

avpeery commented Mar 31, 2022

Thanks @stepankuzmin! I think a unit test would be helpful otherwise looks good to me

@stepankuzmin stepankuzmin merged commit 98ad739 into main Mar 31, 2022
@stepankuzmin stepankuzmin deleted the fix-scale-control branch March 31, 2022 13:53
SnailBones added a commit that referenced this pull request Apr 5, 2022
* Removing -beta.1 suffix from style specs and changelogs

* Adding new item to changelog CHERRY PICK ME TO MAIN

* fix map center calculation in ScaleControl (#11657)

* refactor CustomSource (#11649)

* use empty image if the implementation returns nothing

* Removing globe from scale test to get CI to pass

* Add github actions workflow to check changelog requirements in PR (#11651)

* implement github actions with a javascript actions to check pull requests for changelogs or skip changelog labels

* Add `synchronize` to check-changelog github action types (#11653)

* add synchronize to types to trigger with new commit pushes

Co-authored-by: Stepan Kuzmin <stepan.kuzmin@mapbox.com>
Co-authored-by: Anna Peery <42715836+avpeery@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants