UE with ArcGIS, Overview Map, and Photosphere
Overview
This integration recipe runs Unreal Engine (street / high-fidelity exterior), ArcGIS (district map), an ArcGIS overview inset, and Photosphere (interior panoramas) in one {{IafViewerDBM}} instance. The application orchestrates navigation: pick a building on the map → enter UE street view → open a photosphere when the user selects the building in UE.
It is inspired by the Confluence example EVM Mode - UE - Example - UE with Arcgis, Arcgis Overview Map and Panoramic Views. Mode meaning and Core components live under Enhanced Viewing Modes; this page only shows how to combine them.
Sibling recipes: Federated View3D Buildings on Gis(Mapbox), Model Comparison Using View3D, Multiple Selection with IafViewerDBM.
Building blocks
Point at the mode pages for prop definitions — do not re-host full tables here:
- UE — IafViewer Unreal Engine (
ue,onUeReady,eventHandler,zoomElements) - ArcGIS — IafViewer ArcGIS (
arcgis,arcgisOverview) - Photosphere — IafViewer Photosphere (
photosphere) - How prop groups fit together — Enhanced Viewing Modes hub
- Cost of concurrent modes — IafViewer Performance Tips
Full tables: IafViewer — UE, ArcGIS, Photosphere.
How to set up the full stack
Steps below introduce only the props each step needs. The complete example carries the whole flow.
Step 1: Enable ArcGIS (and optional overview)
Start with a district / campus map. Keep UE and Photosphere disabled until the user picks a building.
arcgis: {
enable: true,
showToolbar: true,
eventHandler: this.handleArcGisEvent.bind(this),
},
arcgisOverview: {
enable: true,
displayMode: IafEvmUtils.EVMDisplayMode.DEFAULT,
camera: undefined,
eventHandler: this.handleOverviewEvent.bind(this),
},
ue: { enable: false, config: UE_CONFIG, /* … */ },
photosphere: { enable: false, config: { model: undefined } },
Prop shapes: ArcGIS Core components.
Step 2: Enter UE street view on map selection
On ArcGIS (or overview) SELECTION_UPDATE, enable UE and drive zoom with zoomElements (prefer declarative props; legacy command remains supported).
enterStreetView(buildingIds, districtName) {
this.setState({
ue: {
...this.state.ue,
enable: true,
zoomElements: zoomToBuildingAction(buildingIds[0]),
},
arcgisOverview: {
...this.state.arcgisOverview,
enable: true,
config: this.getOverviewConfig(districtName),
},
});
}
Build zoom helpers with IafEvmUtils as shown on IafViewer Unreal Engine.
Step 3: Sync UE camera to the overview inset
Handle UE CAMERA_UPDATE in the app and push a camera object into arcgisOverview — cross-mode sync is application-orchestrated only.
case IafEvmUtils.EVM_EVENTS.CAMERA_UPDATE: {
const INSET_MAP_ALTITUDE = 2000;
const camera = {
rotation: { pitch: 0, yaw: 0 },
position: {
...ev.payload.position,
altitude: INSET_MAP_ALTITUDE,
},
};
this.setState({
arcgisOverview: { ...this.state.arcgisOverview, camera },
});
break;
}
Step 4: Open Photosphere on UE building selection
On UE SELECTION_UPDATE, map selected gis_building ids to your photosphere model catalog and enable photosphere.
enterInsideBuilding(selectionData) {
const buildingIds = (selectionData?.elements || [])
.filter((el) => el.elementType === "gis_building")
.map((el) => el.id);
const buildingName = KNOWN_BUILDINGS[buildingIds[0]];
if (!buildingName || !AVAILABLE_MODELS[buildingName]) return;
this.setState({
photosphere: {
enable: true,
config: { model: AVAILABLE_MODELS[buildingName] },
},
});
}
Photosphere config: IafViewer Photosphere.
Useful concepts
Navigation flow
ArcGIS / overview selection
→ enable UE + zoomElements
→ UE CAMERA_UPDATE updates overview camera
→ UE SELECTION_UPDATE enables photosphere for that building
The viewer does not chain these modes for you. Your eventHandler functions own the state transitions.
What stays on the mode pages
Display modes, widget alignment, onUeReady / sendCommand, and exhaustive prop tables stay on Unreal, ArcGIS, and Photosphere. The Unreal page’s “Configuration 6: Full Integration” is the short label for this recipe.
Complete example
import React from "react";
import IafViewerDBM from "@dtplatform/iaf-viewer";
import { IafEvmUtils } from "@dtplatform/iaf-viewer";
import { APPLICATION_ID, UE_CONFIG, KNOWN_BUILDINGS, AVAILABLE_MODELS } from "./ue/config";
import { zoomToBuildingAction } from "./ue/commands";
class UeWithArcgisOverviewAndPhotosphere extends React.Component {
constructor(props) {
super(props);
this.state = {
ue: {
enable: false,
config: UE_CONFIG,
zoomElements: [],
command: [],
eventHandler: this.handleUeEvent.bind(this),
displayMode: IafEvmUtils.EVMDisplayMode.DEFAULT,
showToolbar: true,
alignment: IafEvmUtils.EVMWidgetAlignment.RIGHT_BOTTOM,
},
arcgis: {
enable: true,
showToolbar: true,
eventHandler: this.handleArcGisEvent.bind(this),
},
arcgisOverview: {
enable: true,
displayMode: IafEvmUtils.EVMDisplayMode.DEFAULT,
camera: undefined,
eventHandler: this.handleOverviewEvent.bind(this),
},
photosphere: {
enable: false,
config: { model: undefined },
},
};
}
handleUeEvent(ev) {
const eventName = ev?.eventName?.toLowerCase();
switch (eventName) {
case IafEvmUtils.EVM_EVENTS.CAMERA_UPDATE: {
const INSET_MAP_ALTITUDE = 2000;
this.setState({
arcgisOverview: {
...this.state.arcgisOverview,
camera: {
rotation: { pitch: 0, yaw: 0 },
position: {
...ev.payload.position,
altitude: INSET_MAP_ALTITUDE,
},
},
},
});
break;
}
case IafEvmUtils.EVM_EVENTS.SELECTION_UPDATE:
this.enterInsideBuilding(ev.payload);
break;
default:
break;
}
}
handleArcGisEvent(ev) {
if (ev?.eventName?.toLowerCase() !== IafEvmUtils.EVM_EVENTS.SELECTION_UPDATE) return;
const buildingIds =
ev.payload?.elements
?.filter((el) => el.elementType === "building")
?.map((el) => el.id) || [];
if (buildingIds.length) this.enterStreetView(buildingIds, ev.payload.districtName);
}
handleOverviewEvent(ev) {
if (ev?.eventName?.toLowerCase() !== IafEvmUtils.EVM_EVENTS.SELECTION_UPDATE) return;
const buildingIds =
ev.payload?.elements
?.filter((el) => el.elementType === "building")
?.map((el) => el.id) || [];
if (buildingIds.length) this.enterStreetView(buildingIds);
}
enterStreetView(buildingIds, districtName) {
this.setState({
ue: {
...this.state.ue,
enable: true,
zoomElements: zoomToBuildingAction(buildingIds[0]),
},
arcgisOverview: {
...this.state.arcgisOverview,
enable: true,
config: this.getOverviewConfig(districtName),
},
});
}
enterInsideBuilding(selectionData) {
const buildingIds = (selectionData?.elements || [])
.filter((el) => el.elementType === "gis_building")
.map((el) => el.id);
const buildingName = KNOWN_BUILDINGS[buildingIds[0]];
if (!buildingName || !AVAILABLE_MODELS[buildingName]) return;
this.setState({
photosphere: {
enable: true,
config: { model: AVAILABLE_MODELS[buildingName] },
},
});
}
getOverviewConfig(districtName) {
return {
configName: "insetmapstreetinside",
searchParamPage: "street",
searchParamDistrict: districtName,
};
}
render() {
return (
<div style={{ height: "100%", width: "100%" }}>
<IafViewerDBM
appId={APPLICATION_ID}
ue={this.state.ue}
arcgis={this.state.arcgis}
arcgisOverview={this.state.arcgisOverview}
photosphere={this.state.photosphere}
enablePersistence={true}
/>
</div>
);
}
}
export default UeWithArcgisOverviewAndPhotosphere;
Replace ./ue/config and ./ue/commands with your streaming endpoint, building id map, and photosphere model catalog.
Related
- IafViewer Unreal Engine — UE Core components and events
- IafViewer ArcGIS
- IafViewer Photosphere
- Federated View3D Buildings on Gis(Mapbox) — Mapbox multi-building (different stack)
- Model Comparison Using View3D
- Multiple Selection with IafViewerDBM
- IafViewer Performance Tips
- IafViewer Overview
- IafViewer
- IafViewerDBM