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

feat(advanced-marker): remove content element in cleanup #351

Merged

Conversation

Juneezee
Copy link
Contributor

@Juneezee Juneezee commented May 9, 2024

In PR #335, the InfoWindow cleanup function removes the content element. We should implement the same behavior for the AdvancedMarker component to ensure proper cleanup of its content element as well.

// cleanup: remove infoWindow, all event listeners and contentElement
return () => {
google.maps.event.clearInstanceListeners(infoWindow);
infoWindow.close();
contentContainer.remove();

In PR #335, the
InfoWindow cleanup function includes removing the content element. We
should do the same for AdvancedMarker too.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@usefulthink
Copy link
Collaborator

Good point, thanks! I believe the AdvancedMarker should do it anyway, but this way it's clear and we don't have to "believe" :)

@usefulthink usefulthink merged commit 128df87 into visgl:main May 9, 2024
2 checks passed
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.

None yet

2 participants