Scroll-wheel zoom? #42

mgibbs189 opened this Issue Oct 19, 2012 · 6 comments


None yet
7 participants

What would it take to support this?

bjornd commented Oct 20, 2012

The scroll-wheel zoom is supported by the jVectorMap (, library from which jqvmap was forked from and which now have much more features than this one.

+1 for this

but what sucks about jVectorMap is that it assumes that your data stays in the same range when it comes to color scale and if you swap another set of data whose points are all larger than initial set, the max color will simply be taken for all regions. The color scale is then lost.

Zooming is simply not working with this project.

janmadr commented Nov 14, 2013

I solved it by using this mousewheel plugin.

Then just use this code, which simply triggers click on zoom buttons when mouse is scrolled.

$('#map').on('mousewheel', function(event, delta, deltaX, deltaY) {
    if(delta == 1){
    } else {

anyway, this always zooms to the center of map, so if you want to make it zoom to your cursor, you need to tweak it a bit.

mgibbs189 closed this Mar 26, 2015

er1c commented Aug 2, 2016

@janmadr Do you have an updated version of this? I'm noticing that both the if and else are getting called in rapid success resulting in flash attack:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment