Build the control. Nothing is rendered or attached until MapLibre calls FirstPersonNavWidget.onAdd.
Widget configuration; see FirstPersonNavWidgetOptions.
MapLibre IControl hook: the default corner when the control is added
without an explicit position.
The MapLibre ControlPosition 'top-right'.
MapLibre IControl hook: build the DOM, inject the (ref-counted) stylesheet,
subscribe to the controller's events, and render the current state. Called by
map.addControl(...).
The MapLibre map this control is being added to — the pegman drop hit-tests and unprojects against it.
The control's root HTMLElement for MapLibre to place.
Error when FirstPersonNavWidgetOptions.nav was not provided.
MapLibre IControl hook: unsubscribe from the controller, remove the root
element, and release this instance's stylesheet reference. The controller
itself is NOT disabled or disposed — the widget does not own it. Called by
map.removeControl(...).
Collapse the panel to its round little-man FAB, or expand it back.
true to fold to the FAB, false to expand the panel.
An embeddable, framework-agnostic MapLibre control panel (a
maplibregl.IControl) for the SDK's first-person navigation — the walk/drone mode that pins the camera at a fixed height above ANY rendered surface (terrain, 3D Tiles, I3S, splats, point clouds, BIM) and moves it with the keyboard.The panel offers:
Both number inputs are two-way bound: edits go through the controller (which clamps — height to the 2 ft minimum, speed to 0.1 m/s) and the value the controller actually holds is written back, so a clamped entry corrects itself in place.
Example
See
FirstPersonNavWidgetOptions for the configuration fields.