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

Set map zoom on open and close when having multiple markers #30

Open
sjsd opened this issue Jan 5, 2018 · 1 comment
Open

Set map zoom on open and close when having multiple markers #30

sjsd opened this issue Jan 5, 2018 · 1 comment

Comments

@sjsd
Copy link

sjsd commented Jan 5, 2018

Sorry for my bad english. I will try to explain.

When I show a window, I want to zoom in on the map where the markers is. When I close the window, I want to zoom out and set new center. I use callbacks.

But when I have multiple markers I get some troubles. When "jumping" directly from one window to another, close, beforeclose and afterclose are executed after the new window is opened. Makes the new window does not get its correct zoom.

Is there a way to zoom out when "last" window is closed?

@schnoodly
Copy link

A bit late, so I'm not sure if you still have this issue - but, have you tried putting the zoom function in afterclose? I'm not sure of the exact issue, a codepen would be helpful, but I feel like if you just put things that are supposed to happen after the previous windows closes, just put that in the afterclose event.

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

2 participants