Skip to main content

useZoom

The zoom hook takes an object with the following props:

  • ref: A reference to the map component,
  • defaultZoom: An optional initial zoom level. Defaults to 12.
  • minZoom: An optional minimum zoom level. Defaults to 0.
  • maxZoom: An optional maximum zoom level. Defaults to 19.
  • zoomStep: The incremental value applied to each wheel event on the zoom level. Defaults to 0.1