FMV - Developer guide
Overview#
This developer guide is for the Federated Model View (FMV) feature. It demonstrates how to configure {{IafViewerDBM}} for federated projects (multi-model workspaces).
A workspace can contain multiple BIMPKs models, each typically representing one building. The viewer loads and displays these models based on {{modelComposition.defaultFederationType}}.
When GIS is enabled, it also uses {{gis.federatedMode}} to control how multiple models appear on the map.
Building blocks for Federated Model View projects#
The core components are:
- View3D - 3D building visualization
- View2D - 2D Plan/Sheet viewer
- GIS - Mapbox geographical context
The modelComposition component determines which of the components above are loaded into the federated model.
View3D#
View3D props#
View3D supplies 3D building visualization and renders one or more BIMPK models.
| Prop | Type | Purpose |
|---|---|---|
enable | boolean | Enable/disable 3D viewer |
opacity | number | Enables opacity with range of 0.0 to 1.0 |
displayMode | enum | Supports modes: FULLSCREEN, SPLIT, FIXED, DEFAULT |
showToolbar | boolean | Show/hide toolbar |
renderingMode | enum | Shaded (default), Wireframe, etc. |
camera | object | Camera position (for sync) |
onCameraUpdate | object | { delayInMs, callback } - throttle and callback |
View2D#
View2D props#
View2D supplies 2D visualization for 2D plans and sheet viewers.
| Prop | Type | Purpose |
|---|---|---|
enable | boolean | Enable/disable 2D viewer |
fullscreen | boolean | Full-screen mode |
displayMode | enum | Supports modes: DEFAULT, SPLIT, FULLSCREEN, FIXED |
showToolbar | boolean | Show/hide toolbar |
alignment | enum | LEFT_TOP, LEFT_BOTTOM, RIGHT_TOP, RIGHT_BOTTOM |
order | number | Layout order |
margin | number | Layout margin |
GIS (Mapbox)#
GIS supplies geographic context. It overlays 3D models on a Mapbox-powered map at geo-locations.
GIS props#
| Prop | Type | Purpose |
|---|---|---|
enable | boolean | Enable/disable GIS |
token | string | Mapbox access token (app-provided) |
opacity | number | Map layer opacity (0.0 t0 1.0) |
federatedMode | enum | None, Outline, Dynamic, Markers |
primaryModelId | string | Reference model for alignment |
elevationMode | enum | None, QuickSurface, Underground, etc. |
showMapMarkers | boolean | Show location markers on map |
onIafMapReady | function | Callback when map ready (proxy access) |
onFederatedModeChanged | function | Callback when federated mode changes |
onReferenceModelChanged | function | Callback when primary model changes |
modelComposition#
The modelComposition component determines which models are loaded. It feeds the View3D, View2D and GIS visualizatiions.
modelComposition props#
| Prop | Type | Purpose | ||
|---|---|---|---|---|
defaultFederationType | string | "SingleModel" \ | "Project" \ | "MultiModel" (default: SingleModel) |
initial | object | Disciplines: { Architectural: true, Structural: false, ... } | ||
quality | string | 'low' \ | 'medium' \ | 'high' - dynamic-loading eligibility |
Resolved in this order:
{{props.settings}} → {{localStorage}} (iafviewer_settings) → {{props.modelComposition}} → PropertyStore default
Federation Type vs Federated Mode#
The Federation Type (modelComposition.defaultFederationType) controls which models are loaded.
| Value | Behavior |
|---|---|
SingleModel | Only one model, determined by {{model}} and {{modelVersionId}} (default) |
Project | All models in the current workspace or namespace |
MultiModel | Custom model structure; not currently exposed |
Federated Mode (gis.federatedMode)#
The Federated Mode (gis.federatedMode) controls how multiple models are displayed on the GIS map (when GIS is enabled).
| Value | Behavior |
|---|---|
None | Single model mode |
Outline | Models rendered as GLTF layers |
Dynamic | Hybrid mode |
Markers | Location markers only, no 3D models |
Note:
{{primaryModelId}}sets the reference model.{{onFederatedModeChanged}}and{{onReferenceModelChanged}}are available callbacks.