> 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.

# Move Map

To disable map movement by dragging:

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

To toggle map movement by button:

```js
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:

<iframe src="https://map-service.mapxus.com/bssww/dragPanHandler" width="100%" height="550px"></iframe>
