Currently my setViewState function is triggered on drag end using deckGL's built in events. I also want to trigger this when you zoom in or out. It doesnt look like there is any built in onZoomEnd event I can use. Are there any ways to achieve this?
I have tried onZoom which doesnt seem to exist and monitoring the state change of viewstate which triggers too often as I want to send a request to a DB as either the latitude or longitude or zoom state changes.
Current config for DeckGL object:
return (
<DeckGL
layers={layers}
initialViewState={viewState}
effects={[lightingEffect]}
controller={true}
onDragEnd={(info,evt) => setViewState(info.viewport)}
onClick={ (e) => {
if (e.object){
setSelected(e.object.properties.id)
}
}}>
...