How can I make the mouse wheel zoom in/out - javascript API 3.23?

1249
1
04-16-2018 12:04 PM
NathanMellor
Occasional Contributor

I used the sandbox of the basic map sample and added four lines that I though covered all the bases.  

 

<script>
var map;

require(["esri/map", "dojo/domReady!"], function(Map) {
map = new Map("map", {
basemap: "topo", //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
center: [-122.45, 37.75], // longitude, latitude
zoom: 13
});
map.enableScrollWheel();
map.enableScrollWheelZoom();
map.isScrollWheel = true;
map.isScrollWheelZoom = true;
});
</script>

Nothing works, though. 

The wheel works only to pan the map up and down. 

This is on Chrome and FIrefox browsers on a Mac, in case there are platform specific bugs.  

What is the magic call I am missing?

Tags (1)
0 Kudos
1 Reply
JSchroeder
Esri Contributor

The only answer that I know is to hold the shift key down while using the mouse wheel and the map will zoom in and out. As a normal PC user, I find myself frustrated with trying to use a Mac so this really hits home with me. The answer is to get beyond the idea that because you can do something on a PC, that you should also expect to do this on a Mac.

0 Kudos