MapController | deck.gl

The MapController class can be passed to either the Deck class's controller prop or a View class's controller prop to specify that map interaction should be enabled.

import {Deck, MapController} from '@deck.gl/core';

class MyMapController extends MapController {

handleEvent(event) {
if (event.type === 'pan') {
// do something
} else {
super.handleEvent(event);
}
}
}

new Deck({
controller: {type: MyMapController},
initialViewState: viewState
})

See the Controller class documentation for the methods that you can use and/or override.