SamSig SamSig - 1 year ago 176
Javascript Question

Mapbox GL JS disable scroll zoom

Unable to disable the default zooming on scroll functionality on Mapbox GL JS. Nothing in the API documentation sheds light on this. Even missing the scroll event in their docs.

var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v8',
zoom: 15

Answer Source

Inspected the map object, saw the scrollZoom and tried to call the disable. Great success!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download