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/02-move-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

Move Map

To disable map movement by dragging:

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

To toggle map movement by button:

const disable = "Map movement disable";
const enable = "Map movement enable";

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

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

Sample web page: