Skip to content
Docs version
@hungpvq/vue-map@1.1.0@hungpvq/vue-map-core@1.1.0@hungpvq/vue-map-dataset@1.1.0@hungpvq/vue-map-draw@1.1.0@hungpvq/map-draw@1.1.0@hungpvq/react-map@1.1.0@hungpvq/react-map-core@1.1.0@hungpvq/react-map-dataset@1.1.0@hungpvq/react-map-draw@1.1.0

Map Devtools

Debug panel for map apps: Store, Logs, Errors, and Dataset (Inspect + Menus).

PackageBootstrapPanel
@hungpvq/vue-map-devtoolsinstallDevtools()Mount <Devtools />
@hungpvq/react-map-devtoolsinstallDevtools()Mount <Devtools />

Both packages export ./style.css (imports shared chrome from @hungpvq/map-debug). Peers include @hungpvq/map-core, the matching framework map-core / map-devtools peers (@hungpvq/vue-draggable or @hungpvq/react-draggable), and @hungpvq/shared-log. When map-dataset is present, installDevtools() also installs @hungpvq/map-debug/dataset (window.__hungpvqDatasetDebug).

Dataset tab

PaneRole
RootsPick / pin a dataset from the store tree
InspectNode hierarchy, fields, find-by-type
MenusResolved menus by placement + detail JSON

Menus without id show generated debug keys (anon:…:<index>, idGenerated). Selection is summary-based so anonymous items stay clickable. Shared layout/CSS is owned by @hungpvq/map-debug (SoT); Vue/React only host the UI.

See @hungpvq/map-debug README for console API and the Debug-dataset menu item.

Display modes

modeBehaviorWhere to mount
overlay (default)Fixed FAB + floating panel; mobile uses DraggableItemBottom when a map drag container existsAnywhere (e.g. app shell)
controlMap corner control (DEVTOOLS_CONTROL.id = mapDevtools) + DraggableItemPopupInside <Map>
vue
<!-- App shell -->
<Devtools />

<!-- Or as a map control popup -->
<Map>
  <Devtools mode="control" position="bottom-right" />
</Map>
tsx
<Devtools />

<Map>
  <Devtools mode="control" position="bottom-right" />
</Map>

DevtoolsControl is also exported (same as mode="control").

Mobile (overlay)

On viewports ≤640px (same tablet breakpoint as map):

  • Pass containerId (map-draggable-<mapId>) and/or mapId so the panel attaches to the correct map. Without either, there is no document-wide first-match — a CSS bottom sheet fallback (~85vh) is used.
  • resolveMapDragContainerId(explicit, mapId) prefers explicit, else derives map-draggable-${mapId}.
vue
<Devtools container-id="map-draggable-my-map" />
<!-- or -->
<Devtools map-id="my-map" />
tsx
<Devtools containerId="map-draggable-my-map" />
{/* or */}
<Devtools mapId="my-map" />

Bootstrap (Vue + React)

ts
import { Devtools, installDevtools, uninstallDevtools } from '@hungpvq/vue-map-devtools';
import '@hungpvq/vue-map-devtools/style.css';

installDevtools();
// mount <Devtools /> or <Devtools mode="control" /> inside Map

installDevtools() attaches a log adapter and installs global error capture via errorHandler from @hungpvq/map-core. Call uninstallDevtools() to tear down capture.

Stable API

ExportNotes
Devtoolsmode?: 'overlay' | 'control'
DevtoolsControlExplicit map-control popup
DEVTOOLS_CONTROL{ id: 'mapDevtools' }
installDevtools / uninstallDevtoolsBootstrap
setDevtoolOpen / toggleDevtoolOpen / openMapDevtoolsErrorsOpen helpers

Runtime lock: public-api.spec.ts in each adapter package.

Demos

  • Vue: apps/vue/demo-map
  • React: apps/react/demo-map

See also Stable API · Error handling.