Skip to content
import LineOfSightAnalysisObserver from "@arcgis/core/analysis/LineOfSightAnalysisObserver.js";
Inheritance:
LineOfSightAnalysisObserverAccessor
Since
ArcGIS Maps SDK for JavaScript 4.23

The LineOfSightAnalysisObserver represents an observer of a LineOfSightAnalysis.

Use the position property to specify the position of the observer.

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

elevationInfo

autocast Property
Type
ElevationInfo | null | undefined

Specifies how the observer is placed on the vertical axis (z). See the ElevationInfo sample for an example of how this property may be used.

ElevationInfo.featureExpressionInfo and ElevationInfo.unit are not supported when the elevation info is specified for this class. If the elevation info is not specified, the effective elevation depends on the position properties of the observer.

feature

Property
Type
FeatureReference | null | undefined

References a feature which is excluded from the intersection testing. It is used to ensure that the analysis results remain independent of changes in the level of detail (LOD) of this feature's geometry.

When creating or editing the observer interactively, this property is populated automatically.

Note that you can assign client side graphics which will be taken into account accordingly. However, information about client side graphic will not be persisted and results in an empty reference after de-serialization.

position

autocast Property
Type
Point | null | undefined

A Point representing the position of the observer. Once the position is set, a new line of sight analysis will synchronously calculate the intersection and the visibility to each target of the associated LineOfSightAnalysis.

If the observer is assigned to a LineOfSightLayer then this property must be defined before the layer can be saved to a WebScene.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
clone
inherited
clone(): this
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters
ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

clone

inherited Method
Signature
clone (): this
Inherited from: ClonableMixin

Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.

Returns
this

A deep clone of the class instance that invoked this method.

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.