For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Class BoxZoomHandler
Hierarchy (View Summary)
- BoxZoomHandler
Implements
Constructors
constructor
-
new BoxZoomHandler(
map: MapLibreMap,
options: {
boxZoom?: boolean | BoxZoomHandlerOptions;
clickTolerance: number;
},
): BoxZoomHandlerParameters
- map: MapLibreMap
- options: { boxZoom?: boolean | BoxZoomHandlerOptions; clickTolerance: number }
Returns BoxZoomHandler
Methods
disable
enable
isActive
-
Returns a Boolean indicating whether the "box zoom" interaction is active, i.e. currently being used.
Returns boolean
trueif the "box zoom" interaction is active.
isEnabled
-
Returns a Boolean indicating whether the "box zoom" interaction is enabled.
Returns boolean
trueif the "box zoom" interaction is enabled.
keydown
-
Parameters
Returns void
mousedown
-
Parameters
- e: MouseEvent
- point: Point
Returns void
mousemoveWindow
-
Parameters
- e: MouseEvent
- point: Point
Returns void
mouseupWindow
-
Parameters
- e: MouseEvent
- point: Point
Returns { cameraAnimation: (map: any) => any }
reset
-
resetcan be called by the manager at any time and must reset everything to it's original stateReturns void
The
BoxZoomHandlerallows the user to zoom the map to fit within a bounding box. The bounding box is defined by clicking and holdingshiftwhile dragging the cursor.