For AI agents: the complete documentation index is available at /core-sdk/map/web/llms.txt, the full documentation bundle is available at /core-sdk/map/web/llms-full.txt, and this page is available as Markdown at /core-sdk/map/web/v10/11-camera/03-zoom-map.md.
MapxusDeveloper Platform
Products
Positioning APIAccess real-time indoor coordinates and contextual signals.API
UI SDKProduction-ready indoor map interfaces and UI components.AndroidiOS

Zoom Map

To disable map zooming by mouse wheel or trackpad when initializing the map:

const maplibreMap = new maplibregl.Map({
    container: 'map',
    zoom: 17,
    scrollZoom: false
});

To toggle scroll zooming by button:

const disable = "Map scaling disable";
const enable = "Map scaling enable";

document.querySelector("#button").onclick = function(e) {
    if (e.target.innerText === disable) {
        maplibreMap.scrollZoom.enable();
        e.target.innerText = enable;
        return;
    }

    maplibreMap.scrollZoom.disable();
    e.target.innerText = disable;
};

Sample web page: