This sample shows how to add an instance of OrientedImageryLayer to a WebScene in a SceneView and visualize the images using the OrientedImageryViewer widget.
OrientedImageryLayers can be published with a z-value, which enables them to be rendered in 3D SceneView. Refer to the oriented imagery management workflow to see how the layers are created and published.
Users can incorporate OrientedImageryLayers into their chosen WebScene and interact with the widget in a 3D scene. Below is an example of an OrientedImageryLayer added to WebScene with an IntegratedMeshLayer.
// create an instance of the webscene in sceneview
const scene = new WebScene({
portalItem: {
id: "aa1c036445824e06a2d1b0e12e02a924"
}
});
const view = new SceneView({
map: scene,
spatialReference: {
wkid: 102100,
latestWkid: 3857
},
container: "viewDiv"
});
OrientedImageryLayers allows users to manage oriented (non-nadir) images and visualize using the oriented imagery viewer widget. It is composed of discrete point features (or camera locations), each with a Geometry that allows it to be rendered as a graphic with spatial context.
// create an instance of an oriented imagery layer and add it to scene
const layer = new OrientedImageryLayer({
portalItem: {
id: "c8a4aeb77b114579a44bb7eab9a86cde"
}
});
scene.layers.add(layer);
// zoom to the full extent of the layer when layer is loaded
// set the oriented imagery layer to be used with an oriented imagery viewer
view.whenLayerView(layer).then(() => {
view.goTo(layer.fullExtent);
orientedImageryViewer.layer = layer;
});
The oriented imagery viewer widget allows users to explore their oriented images from the Oriented Imagery layers. Users can click on a scene to view the best image in their collection depicting that location. They can then view assets from multiple directions, and enhance contrast, brightness and sharpening to better see these images.
// create a new instance of the oriented imagery viewer widget
const orientedImageryViewer = new OrientedImageryViewer({
view,
disabled: false,
container: "oi-container"
});