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

when "zoom ing", the marker slides to the correct position instead of snapping to it #42

Open
calbu opened this issue Jun 22, 2016 · 2 comments

Comments

@calbu
Copy link

calbu commented Jun 22, 2016

when a marker stops at the end of a line, if you zoom in or out the marker will slowly slide to the correct position. the same behavior is encountered during the movement of a marker if you zoom in or out.
please let me know if I am doing something wrong or if I can correct this.
thank you

@jpremkumar
Copy link

I also ran into this same issue. Is there any workaround for this?

@glasmasin
Copy link

You can do something like this to hide it while zooming:

function toggleVisibility(e) {
    if (e.type === 'zoomstart') {
        map.removeLayer(animatedMarker)
    }
    if (e.type === 'zoomend') {
        map.addLayer(animatedMarker)
    }
}
map.on('zoomstart', toggleVisibility);
map.on('zoomend', toggleVisibility);

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

3 participants