Diagnostic utilities exposed at MapView.Debug. Provides toggles for debug visualizations, snapshots of the current camera state, and other inspection helpers useful while developing against Mappedin JS.

Constructors

Properties

Methods

Constructors

Properties

state: {
    focusOn: FocusOnDebugConfig;
    showCameraTargets: boolean;
    showCollisionBoxes: boolean;
    showEnvMap: boolean;
    showGeometryInFocus: boolean;
    showImageLOD: boolean;
    showModelInstancingStats: boolean;
    showPolygonLabelTextAreaMesh: boolean;
    showScreenOffsets: boolean;
}

Type declaration

  • focusOn: FocusOnDebugConfig

    Shows focusOn 3D debug visualization (point cloud spheres and/or wireframe bounding boxes). Pass { pointCloud?: { size?, color? } | false, boundingBox?: { color? } | false } to configure.

  • showCameraTargets: boolean

    Shows camera target debug visualization.

    • Green dot: animateTo target position
    • Orange box: focusOn bounding area
    • Cyan box: getFocusOnTransform bounding area
  • showCollisionBoxes: boolean

    Shows collision detection boxes for debugging spatial interactions

  • showEnvMap: boolean

    Enables the basic environment map for lighting and reflections

  • showGeometryInFocus: boolean

    Shows the debug for the geometry in focus system

  • showImageLOD: boolean

    Shows LOD level indicators on images via color tinting.

  • showModelInstancingStats: boolean

    Shows model instancing statistics (batch counts, instance counts, draw calls)

  • showPolygonLabelTextAreaMesh: boolean

    Shows the text area mesh used for polygon label rendering

  • showScreenOffsets: boolean

    Shows screen offset areas as transparent colored overlays.

    • Red: top offset
    • Green: bottom offset
    • Blue: left offset
    • Yellow: right offset
update: (
    updateState: Partial<
        {
            focusOn: FocusOnDebugConfig;
            showCameraTargets: boolean;
            showCollisionBoxes: boolean;
            showEnvMap: boolean;
            showGeometryInFocus: boolean;
            showImageLOD: boolean;
            showModelInstancingStats: boolean;
            showPolygonLabelTextAreaMesh: boolean;
            showScreenOffsets: boolean;
        },
    >,
) => void

Methods

  • Returns the current camera state as a JSON object that can be passed directly to mapView.Camera.set().

    Returns TCameraTarget

    The current camera state including center, zoomLevel, bearing, and pitch.

    const state = mapView.Debug.getCameraState();
    console.log(state);
    // Later restore the camera position:
    mapView.Camera.set(state);