Skip to content

Clear marker occlusion timer on Marker#remove #10478

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 3 commits into from
Mar 23, 2021

Conversation

andycalder
Copy link
Contributor

This fixes #10402 by clearing the marker occlusion timer on Marker#remove and on the map 'remove' event.

I reproduced the bug by removing the markers from the markers.html debug page while moving the map. I then verified that this change fixes the problem.

Marker#remove is not currently covered by unit tests, and I don't see an easy way to test this functionality. Thoughts?

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • 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>Fixed a bug where markers may throw an error after being removed from a 3D map.</changelog>

Sorry, something went wrong.

@andycalder andycalder changed the title Clear marker occlusion timer on Marker#remove (fix #10402) Clear marker occlusion timer on Marker#remove Mar 22, 2021
Copy link
Contributor

@ryanhamley ryanhamley left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks!

@ryanhamley ryanhamley merged commit af83fa8 into mapbox:main Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom markers throw error on map zoom event v2.1.1 "cannot read property "tranform" of undefined"
2 participants