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

Issue when using in Bootstrap modals #46

Closed
albertobenavides opened this issue Mar 16, 2023 · 1 comment
Closed

Issue when using in Bootstrap modals #46

albertobenavides opened this issue Mar 16, 2023 · 1 comment

Comments

@albertobenavides
Copy link

I am rendering a map inside a Bootstrap modal. The map gets resized properly when the modal opens with map.invalidateSize() as suggested in https://stackoverflow.com/a/49441778/3113008

But the heatcanvas dissapears and then the map needs to be paned or zoomed in order to show the heatcanvas layer.

Anyone have any idea why this is happening?

@albertobenavides
Copy link
Author

Well, a workaround is to remove and add the layer after the map.invalidateSize():

map.invalidateSize()
map.removeLayer(heatmap);
map.addLayer(heatmap);

So... I think this has been self resolved, I guess, haha.

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

No branches or pull requests

1 participant