Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: ObliqueViewer

require(["esri/dijit/ObliqueViewer"], function(ObliqueViewer) { /* code goes here */ });

Description

(Added at v3.14)
(Currently in beta)
The oblique viewer widget, displays images in their native coordinate system using an Image Coordinate System (ICS). See ImageSpatialReference. Oblique images are displayed in their native ICS, to avoid distortion caused by projecting them to a geographic or projected coordinate system. The widget allows the user to pan around in oblique mode, in a single viewing angle, or switch angles to view an area of interest from different angles. This widget requires an image service published on a 10.3 or higher to ArcGIS Server. The service data source must be mosaic datasets authored using the frame camera raster type. The map used to construct the viewer must have this type of image service.

Samples

Search for samples that use this class.

Constructors

NameSummary
new ObliqueViewer(params)Creates an instance of the ObliqueViewer widget.

CSS

esri/dijit/ObliqueViewer | Download source

Properties

NameTypeSummary
azimuthAngleNumberIndicates the current azimuth angle of the viewer.
azimuthFieldStringImage service field that denotes the sensor azimuth value for a record.
azimuthToleranceNumberIndicates the tolerance value applied when selecting images for a given azimuth angle value.
elevationFieldStringImage service field that denotes the sensor elevation value for a record.
elevationThresholdNumberElevation value between 0 and 90 that differentiates an image as oblique or nadir.
filteredRecordsObject[]Subset of records, filtered based on current azimuth angle.
imageServiceLayerArcGISImageServiceLayerImage service layer to be used as source for oblique images.
isNadirBooleanIndicates whether current view is nadir.
mapMapMap object associated with the widget.
noQueryOnExtentChangeBooleanWhen true, the widget doesn't refresh itself with new oblique records when the map's extent changes.
rasterInfoFieldsObject[]Raster info fields to be queried and displayed in the raster list.
rasterListRefreshBooleanWhen true, the list is populated on data refresh.
recordsObject[]Oblique image data that is currently being used by the viewer.
selectedRasterObjectObject containing additional information about the raster.
selectedRasterIdNumberId of the raster currently being displayed.
showThumbnailBooleanWhen true, thumbnail images for records are displayed in the list.

Methods

NameReturn typeSummary
locate(geometry)NoneQueries and displays the best image in a specific direction.
projectGeometry(geometry, outSpatialReference)DeferredProjects the input geometry to the specified spatial reference.
search(geometry)DeferredPerforms a query on the image service for oblique images covering the input geometry.
setData(records, extent)NoneSets the records and extent on the viewer.
setExtent(extent)DeferredProjects the given extent to the map's spatial reference and sets the extent.
setImage(id, extent)NoneSets the input image (based on the image ID) to the given extent.
zoomToSelectedImage()NoneSets the map extent to the currently selected image.

Events

[ On Style Events | Connect Style Event ]
All On Style event listeners receive a single event object. Additionally, the event object also contains a 'target' property whose value is the object which fired the event.

Events

NameEvent ObjectSummary
azimuth-change
{
  azimuth: <Number>
}
Fires when the azimuth is changed.
raster-select
{
  selectedRasterId: <Number>
}
Fires when the selected raster is changed.
records-refresh
{
  filteredRecords: <Object[]>,
  records: <Object[]>
}
Fires when the viewer records are refreshed.
Constructor Details

new ObliqueViewer(params)

Creates an instance of the ObliqueViewer widget.
Parameters:
<Object> params Required Constructor options. See object specification table below for more details about each property.
params properties:
<Number> azimuthAngle Optional Azimuth angle value for which to display oblique images. If not provided, the widget is initialized in nadir mode, displaying ortho images.
<String> azimuthField Optional Image service field that denotes the sensor azimuth value for a record. Default value is SensorAzimuth.
<Number> azimuthTolerance Optional Tolerance value applied when filtering azimuth images. Default is 10.
<String> elevationField Optional Image service field that denotes the sensor elevation value for a record. Default value is SensorElevation.
<Number> elevationThreshold Optional Elevation value between 0 and 90 that differentiates an image as oblique or nadir. Default value is 70.
<ArcGISImageServiceLayer> imageServiceLayer Required Image service layer to be used as source for oblique images.
<Map> map Required Map object associated with the widget.
<Boolean> noQueryOnExtentChange Optional When true, the widget doesn't refresh itself with new oblique records when the map's extent changes. Default value is false.
<Object[]> rasterInfoFields Optional Raster info fields to be queried and displayed in the raster list. For object specification, see the table in the rasterInfoFields property.
<String | Node> rasterListDiv Optional DOM Node or id, where the list element is to be placed.
<Boolean> rasterListRefresh Optional When true, list is populated on data refresh.
<String | Node> rotationDiv Optional DOM Node or id, where the oblique rotation gauge element is to be placed.
<Boolean> showThumbnail Optional When true, thumbnail images for records are displayed in the list. Default value is true.
<Function> sorter Optional Sorting function that takes query results and sorts them. The first one from the list is displayed by default when the map's extent changes. Users can define their own sorters. The sorting function takes one parameter for the input query records.
Property Details

<Number> azimuthAngle

Indicates the current azimuth angle of the viewer.

<String> azimuthField

Image service field that denotes the sensor azimuth value for a record.
Default value: SensorAzimuth

<Number> azimuthTolerance

Indicates the tolerance value applied when selecting images for a given azimuth angle value.
Default value: 10

<String> elevationField

Image service field that denotes the sensor elevation value for a record.
Default value: SensorElevation

<Number> elevationThreshold

Elevation value between 0 and 90 that differentiates an image as oblique or nadir.
Known values: 0 - 90
Default value: 70

<Object[]> filteredRecords

Subset of records, filtered based on current azimuth angle.

<ArcGISImageServiceLayer> imageServiceLayer

Image service layer to be used as source for oblique images.

<Boolean> isNadir

Indicates whether current view is nadir.

<Map> map

Map object associated with the widget.

<Boolean> noQueryOnExtentChange

When true, the widget doesn't refresh itself with new oblique records when the map's extent changes.
Known values: true | false
Default value: false

<Object[]> rasterInfoFields

Raster info fields to be queried and displayed in the raster list. See object specification table below for more details.
Object Specifications:
<infoFields>
<String> alias Required The field alias.
<Boolean> display Required Indicates whether to display of the field.
<String> name Required The name of the field

<Boolean> rasterListRefresh

When true, the list is populated on data refresh.

<Object[]> records

Oblique image data that is currently being used by the viewer. The image data is a JSON object of the query response format from the image service. See object specification table below and Query Image Service for additional details.
Object Specifications:
<rasterDataObject>
<Object> attributes Required The attributes of the feature in the query response.
<Geometry> geometry Required The geometry from the query response.

<Object> selectedRaster

Object containing additional information about the raster. Contains an "attributes" property and a "geometry" property.

<Number> selectedRasterId

Id of the raster currently being displayed.

<Boolean> showThumbnail

When true, thumbnail images for records are displayed in the list.
Known values: true | false
Default value: true
Method Details

locate(geometry)

Queries and displays the best image in a specific direction. The area of interest is defined by the input geometry, the direction is defined by the current azimuth and the best image for that AOI is selected based on the sorting algorithm (see sorter in the constructor options). (Added at v3.16)
Parameters:
<Geometry> geometry Required The specified input geometry needed for querying for the best image in a given azimuth direction.

projectGeometry(geometry, outSpatialReference)

Projects the input geometry to the specified spatial reference.
Return type: Deferred
Parameters:
<Geometry> geometry Required The geometry to project.
<SpatialReference> outSpatialReference Required The spatial reference to project the geometry to.

search(geometry)

Performs a query on the image service for oblique images covering the input geometry.
Return type: Deferred
Parameters:
<Geometry> geometry Required The input geometry to use for the search.

setData(records, extent)

Sets the records and extent on the viewer. The records are an array of raster data objects, which is a JSON object in the query response format from image service. For the specification of this object see the object specification table in the records property.
Parameters:
<Object[]> records Required An array of raster data objects. For the specification of this object see the object specification table in the records property.
<Extent> extent Required The extent to set the viewer to.

setExtent(extent)

Projects the given extent to the map's spatial reference and sets the extent.
Return type: Deferred
Parameters:
<Extent> extent Required The extent to project the map's spatial reference to.

setImage(id, extent)

Sets the input image (based on the image ID) to the given extent.
Parameters:
<Number> id Required The ID of the raster image.
<Extent> extent Required The extent to set the raster image to.

zoomToSelectedImage()

Sets the map extent to the currently selected image.
Event Details
[ On Style Events | Connect Style Event ]

azimuth-change

Fires when the azimuth is changed.
Event Object Properties:
<Number> azimuth The azimuth of the viewer.

raster-select

Fires when the selected raster is changed.
Event Object Properties:
<Number> selectedRasterId The ID of the newly selected raster.

records-refresh

Fires when the viewer records are refreshed.
Event Object Properties:
<Object[]> filteredRecords An array of raster data objects representing the filtered records. For the specification of this object see the object specification table in the records property.
<Object[]> records An array of raster data objects representing the records prior to filtering. For the specification of this object see the object specification table in the records property.
Show Modal