import LineOfSightAnalysisTarget from "@arcgis/core/analysis/LineOfSightAnalysisTarget.js";const LineOfSightAnalysisTarget = await $arcgis.import("@arcgis/core/analysis/LineOfSightAnalysisTarget.js");- Inheritance:
- LineOfSightAnalysisTarget→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.23
The LineOfSightAnalysisTarget represents a target of a LineOfSightAnalysis.
Use the position property to specify the position of the target.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
declaredClass readonly inherited | ||
| | ||
| | ||
| |
elevationInfo
- Type
- ElevationInfo | null | undefined
Specifies how the target 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 target.
feature
- 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 targets 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.
Methods
fromJSON
- Signature
-
fromJSON (json: any): any
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
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | 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
- Signature
-
clone (): this
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
- Signature
-
toJSON (): any
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.