This sample shows how to add an instance of OrientedImageryLayer to a Map in a MapView and visualize the images using the OrientedImageryViewer widget.
OrientedImageryLayers provides users the ability to manage oriented (non-nadir) images and visualize the same using the oriented imagery viewer widget. It is composed of discrete point features (or camera locations), each of which has a Geometry that allows it to be rendered in either a 2D MapView or a 3D SceneView as a graphic with spatial context. These features also contain data attributes that provide additional information about the real-world feature it represents.
// create an instance of an oriented imagery layer and add it to map
const layer = new OrientedImageryLayer({
portalItem: {
id: "ca2aa99099414ff7aba2f1e3721f4218",
}
});
map.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 and exploit their oriented images from the Oriented Imagery layers. Users can click on a map to view the best image in their collection that depicts that location. Users then can 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"
});