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

Remove popups on Map#remove #7749

Merged
merged 1 commit into from
Jan 7, 2019
Merged

Conversation

andycalder
Copy link
Contributor

@andycalder andycalder commented Jan 6, 2019

This PR fixes #7744.

Popups are responsible for adding and removing themselves (the map object has no knowledge of popups that have been added to it). Therefore, the simplest solution is for the popup to listen for the map 'remove' event and remove itself.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality

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.

This looks good to me. Thanks for submitting the pull request!

@ryanhamley ryanhamley merged commit 9e07aec into mapbox:master Jan 7, 2019
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.

map.remove() does not remove Popups
2 participants