import ElevationProfileLine from "@arcgis/core/widgets/ElevationProfile/ElevationProfileLine.js";const ElevationProfileLine = await $arcgis.import("@arcgis/core/widgets/ElevationProfile/ElevationProfileLine.js");- Inheritance:
- ElevationProfileLine→
Accessor
- Subclasses:
- ElevationProfileLineGround, ElevationProfileLineInput, ElevationProfileLineQuery, ElevationProfileLineView
- Since
- ArcGIS Maps SDK for JavaScript 4.18
Common interface for all the elevation profile lines.
- See also
ElevationProfile widget - Deprecated since 5.0. Use the Elevation Profile component instead.
ElevationProfileViewModel - Deprecated since 5.0. Use ElevationProfileAnalysis instead.
ElevationProfileLineGround - Deprecated since 5.0. Use ElevationProfileLineGround from ElevationProfileAnalysis instead.
ElevationProfileLineInput - Deprecated since 5.0. Use ElevationProfileLineInput from ElevationProfileAnalysis instead.
ElevationProfileLineQuery - Deprecated since 5.0. Use ElevationProfileLineQuery from ElevationProfileAnalysis instead.
ElevationProfileLineView - Deprecated since 5.0. Use ElevationProfileLineScene from ElevationProfileAnalysis instead.
Properties
| Property | Type | Class |
|---|---|---|
| | ||
declaredClass readonly inherited | ||
hoveredPoint readonly | | |
| | ||
progress readonly | | |
samples readonly | | |
statistics readonly | | |
| | ||
type readonly | | |
| | ||
| |
progress
- Type
- number
How far along the generation of this profile is. 0 means nothing was loaded and 1 means loading is complete.
samples
- Type
- ElevationProfileSample[] | null | undefined
List of samples that make up the elevation profile. It can be passed to a graphing library in order to display the profile in 2D.
statistics
- Type
- ElevationProfileStatistics | null | undefined
Statistics about the generated elevation profile, if available.
For slope computations, profiles are sampled at a minimum distance of 10 meters (32.8 feet). Higher resolution profiles are downsampled to a 10-meter (32.8-foot) sampling distance before calculating the slope.
viewVisualizationEnabled
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 4.20
Whether a line visualization representing elevationSamples should be added to the SceneView. This property doesn't apply to MapView.
- Default value
- true
visible
- Type
- boolean
Whether the line should be computed and shown in the chart.
- Default value
- true
Methods
| Method | Signature | Class |
|---|---|---|
emit inherited | emit<Type extends EventNames<this>>(type: Type, event?: this["@eventTypes"][Type]): boolean | |
hasEventListener inherited | hasEventListener<Type extends EventNames<this>>(type: Type): boolean | |
on inherited | on<Type extends EventNames<this>>(type: Type, listener: EventedCallback<this["@eventTypes"][Type]>): ResourceHandle |
emit
- Signature
-
emit <Type extends EventNames<this>>(type: Type, event?: this["@eventTypes"][Type]): boolean
- Type parameters
- <Type extends EventNames<this>>
Emits an event on the instance. This method should only be used when creating subclasses of this class.
hasEventListener
- Signature
-
hasEventListener <Type extends EventNames<this>>(type: Type): boolean
- Type parameters
- <Type extends EventNames<this>>
Indicates whether there is an event listener on the instance that matches the provided event name.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| type | Type | The name of the event. | |
- Returns
- boolean
Returns true if the class supports the input event.
on
- Signature
-
on <Type extends EventNames<this>>(type: Type, listener: EventedCallback<this["@eventTypes"][Type]>): ResourceHandle
- Type parameters
- <Type extends EventNames<this>>
Registers an event handler on the instance. Call this method to hook an event with a listener.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| type | Type | An event or an array of events to listen for. | |
| listener | EventedCallback<this["@eventTypes"][Type]> | The function to call when the event fires. | |
- Returns
- ResourceHandle
Returns an event handler with a
remove()method that should be called to stop listening for the event(s).Property Type Description remove Function When called, removes the listener from the event.
Example
view.on("click", function(event){ // event is the event handle returned after the event fires. console.log(event.mapPoint);});