I wounder how I can catch zoomstart
and zoomend
events on react-leaflet map component.
I have some custom non-geographics map
<Map
center={this.getCalculatedCenterFromState()}
zoom={this.getCalculatedZoomFromState()}
minZoom={this.getCalculatedMinZoomFromState()}
maxZoom={2}
attributionControl={false}
doubleClickZoom={false}
zoomControl={false}
crs={this.mapService.getProjectionType()}
>
<ZoomControl position={'topright'} zoomInText={"<img src=" + this.mapService.getPlusIconPath() + " alt='plus' />"} zoomOutText={"<img src=" + this.mapService.getMinusIconPath() + " alt='minus' />"} />
<CategoryControl />
<Layers data={this.showPlanService.getJSONResponse()} />
</Map>
And I need to show and hide some components depends on zoom level.