Disable scroll zoom

Disable scroll zoom to prevent scroll from zooming a map.

NPM module setup


npm install --save @maptiler/sdk
import { Map, MapStyle, config } from '@maptiler/sdk';
import '@maptiler/sdk/dist/maptiler-sdk.css';

config.apiKey = 'YOUR_MAPTILER_API_KEY_HERE';
const map = new Map({
    container: 'map', // container id
    style: MapStyle.STREETS,
    center: [151.21395, -33.86828], // starting position
    zoom: 12.18 // starting zoom
});

// disable map zoom when using scroll
map.scrollZoom.disable();
Disable map rotation

Disable map rotation

Examples

Prevent users from rotating your interactive map.

Toggle interactions

Toggle interactions

Examples

Enable or disable specific user interaction handlers on maps.

Hide map navigation controls

Hide map navigation controls

Tutorials

Hide the map navigation and zoom controls.

Create a non-interactive map

Create a non-interactive map

Examples

Disable interactivity to create a static map.

Was this helpful?