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

Follow up on issue #39: How to call invalidatesize on minimap #121

Open
pineapplegum opened this issue Nov 17, 2016 · 2 comments
Open

Follow up on issue #39: How to call invalidatesize on minimap #121

pineapplegum opened this issue Nov 17, 2016 · 2 comments
Labels

Comments

@pineapplegum
Copy link

This is a follow up on issue #39 .

A call to invalidatesize() on the mainmap does not get reflected in the minimap. This results in the minimap being centered to a wrong position in cases where the mainmap is placed within tabs such as bootstrap tabs. Is there any workaround for this issue?

@astroK8
Copy link

astroK8 commented Dec 27, 2016

Here is how I solved this issue.

miniMap = new L.Control.MiniMap(...)

A call to miniMap._miniMap.invalidateSize() after mainmap invalidateSize call will do the trick.

@robpvn
Copy link
Contributor

robpvn commented Dec 28, 2016

@Stanleyck I'm sorry for not responding, but this issue must have slipped under my radar somehow! What @astroK8 suggests sounds like it should work.

So I guess this is still a problem for Leaflet 1.0. Looks like it might be solveable if the minimap plugin listens to the resize event from the main map, since that is fired when invalidateSize on the main map is called.

@robpvn robpvn added the bug label Dec 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants