Comments (6)
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) {
event.preventDefault();
if(delta == 1){
$('.jqvmap-zoomin').trigger('click');
} else {
$('.jqvmap-zoomout').trigger('click');
}
});
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.
from jqvmap.
The scroll-wheel zoom is supported by the jVectorMap (https://github.com/bjornd/jvectormap), library from which jqvmap was forked from and which now have much more features than this one.
from jqvmap.
+1 for this
from jqvmap.
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.
from jqvmap.
Zooming is simply not working with this project.
from jqvmap.
@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: http://screencast.com/t/uBThnLQvv
from jqvmap.
Related Issues (20)
- List of selections as region labels, not codes
- The map new regions france no working HOT 2
- Map does not plot markers
- No toolitip for countries
- pins or labels shifted to right and bottom on ukraine map HOT 1
- cannot import name 'EvaluableParseManager'
- Country vectors for Singapore and Hongkong
- Add Singapore
- 'selectedRegions' option does not work with double-quoted input: ["MX"]
- How to display Washington DC on the map
- Destroy Map?
- Distinguish the areas of northern India/Kashmir and Tibet
- jquery.vmap.usa.counties.js is missing Whatcom County, WA
- Label Obstruct small states in USA map
- How to disable Pinch zoom at mobile device? HOT 2
- Austria causes crash
- Is this project maintenance?
- Is it possible to select only a province?
- dynamic set selectedRegions
- any alternative in vanilla javascript
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jqvmap.