Skip to content
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

Fix bug in LngLatBounds.extend by allowing object literal LngLat as a parameter. #12270

Merged
merged 6 commits into from
Oct 4, 2022

Conversation

stampyzfanz
Copy link
Contributor

@stampyzfanz stampyzfanz commented Oct 2, 2022

Launch Checklist

Fixes #12095

Changes

Checks if LngLatBounds.extend was passed an object literal LngLat (v3). This fixes a bug where it was treated like null and made no changes to the LngLatBounds object.

  • include before/after visuals or gifs if this PR includes visual changes
  • write tests for all new functionality
  • document any changes to public APIs. No changes to public APIs
  • post benchmark scores - I can't seem to set up the benchmark software locally. "'BENCHMARK_VERSION' is not recognized as an internal or external command". I can't imagine it has substantially worse performance based on the nature of the change.
  • manually test the debug page
  • tagged @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes
  • tagged @mapbox/gl-native if this PR includes shader changes or needs a native port
    I don't think it needs a native port.
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
    Can someone apply the bug label please I don't believe I have permission as a community member.
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>Add object literal support in LngLatBounds.extend</changelog>

Sorry about all the commits: yarn gave me errors when trying to perform the unit tests locally so I did unit tests tests on GitHub in this PR. They'll be squashed when merged though.

@CLAassistant
Copy link

CLAassistant commented Oct 2, 2022

CLA assistant check
All committers have signed the CLA.

@stampyzfanz stampyzfanz marked this pull request as ready for review October 2, 2022 00:49
@stampyzfanz stampyzfanz requested a review from a team as a code owner October 2, 2022 00:49
Copy link
Contributor

@stepankuzmin stepankuzmin left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @stampyzfanz!

@stepankuzmin stepankuzmin merged commit bf9954c into mapbox:main Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mapboxgl.LngLatBounds.extend does not seem to fully implement LngLatLike as parameter.
3 participants