Disable scroll-zooming on the view
Loading...
Note: Support for 3D on mobile devices may vary, view the system requirements for more information.
This sample demonstrates how to disable scroll zooming on a MapView instance. Scroll zooming is enabled by default via the mouse-wheel event of the view.
To disable scroll zooming, you must call the stopPropagation()
method on the event object of the mouse-wheel event.
view.on("mouse-wheel", function(event){
// prevents zooming with the mouse-wheel event
event.stopPropagation();
});
Try zooming the view by scrolling the mouse-wheel.
Tags
Loading...