▾
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 |
|---|---|---|
| readonly inherited | ||
| | ||
| | ||
| | ||
| readonly | "target" | |
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.
When placing targets interactively, use the additional options on the LineOfSightAnalysisView3D.place() method to specify the elevation information.
- If the elevation info is not specified, the effective elevation depends on the position properties of the target.
- ElevationInfo.featureExpressionInfo is not supported when the elevation info is specified for this class.
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.
position
A Point representing the position of the target. Once the position is set, a new line of sight analysis will synchronously calculate the intersection and the visibility.
If the position has a z-value, it is treated as an absolute value. Optionally, with the elevationInfo property you can change how the z-value should be interpreted. If the target has no z-value, it is aligned to the ground.
Methods
| Method | Signature | Class |
|---|---|---|
| inherited static | fromJSON(json: any): any | |
| inherited | clone(): this | |
| inherited | toJSON(): any |
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.