The BoxZoomHandler allows the user to zoom the map to fit within a bounding box. The bounding box is defined by clicking and holding shift while dragging the cursor.
BoxZoomHandler
shift
Disables the "box zoom" interaction.
map.boxZoom.disable(); Copy
map.boxZoom.disable();
Enables the "box zoom" interaction.
map.boxZoom.enable(); Copy
map.boxZoom.enable();
Returns a Boolean indicating whether the "box zoom" interaction is active, i.e. currently being used.
true if the "box zoom" interaction is active.
true
Returns a Boolean indicating whether the "box zoom" interaction is enabled.
true if the "box zoom" interaction is enabled.
The
BoxZoomHandler
allows the user to zoom the map to fit within a bounding box. The bounding box is defined by clicking and holdingshift
while dragging the cursor.