Class BoxZoomHandler
Hierarchy (View Summary)
- BoxZoomHandler
Implements
Index
Constructors
Methods
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
Was this helpful?
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.