Skip to main content

ZoomControl

The ZoomControl component adds interactive zoom controls (+/-) to the map.

Props

string
Position of the zoom control on the mapOptions:
  • 'left-top'
  • 'left-middle'
  • 'left-bottom'
  • 'right-top' (default)
  • 'right-middle'
  • 'right-bottom'
  • 'top-left'
  • 'top-center'
  • 'top-right'
  • 'bottom-left'
  • 'bottom-center'
  • 'bottom-right'
boolean
default:false
Disable the zoom control
boolean
default:true
Control visibility of the zoom control

Basic Usage

Custom Position

Multiple Controls

Position controls at different locations:

Conditional Visibility

Disabled State

Alignment Options

Top Alignments

  • left-top
  • top-center
  • right-top

Middle Alignments

  • left-middle
  • right-middle

Bottom Alignments

  • left-bottom
  • bottom-center
  • right-bottom

Keyboard Shortcuts

Users can also zoom using:
  • + / - keys
  • Mouse wheel
  • Double-click to zoom in
  • Shift + Double-click to zoom out
  • Pinch gesture on touch devices

Accessibility

The zoom control is keyboard accessible and screen reader friendly:
  • Tab to focus
  • Enter/Space to activate
  • Proper ARIA labels

See Also

ScaleBar

Distance scale indicator

MapSettings

Map configuration controls

HereMap

Main map component