Skip to content

Elevation Profile

ESM:
Use dark colors for code blocksCopy
1
import "@arcgis/map-components/components/arcgis-elevation-profile";
CDN:
No specific import is needed for this component.
Since:ArcGIS Maps SDK for JavaScript 4.28

The Elevation Profile component is used to generate and display an elevation profile from an input line graphic.

See also

Demo

Properties

PropertyAttributeType
autoDestroyDisabledauto-destroy-disabledboolean
EffectiveUnits
hideCharthide-chartboolean
hideClearButtonhide-clear-buttonboolean
hideLegendhide-legendboolean
hideSelectButtonhide-select-buttonboolean
hideSettingsButtonhide-settings-buttonboolean
hideSketchButtonhide-sketch-buttonboolean
hideUniformChartScalingTogglehide-uniform-chart-scaling-toggleboolean
hideUnitSelectorhide-unit-selectorboolean
highlightEnabledhighlight-enabledboolean
hoveredChartPositionhovered-chart-positionnumber
iconiconstring
inputGraphic
labellabelstring
position
deprecated
position"bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
profilesCollection<ElevationProfileElevationProfileLineGround | ElevationProfileElevationProfileLineInput | ElevationProfileElevationProfileLineQuery | ElevationProfileLineView>
progress
readonly
number
referenceElementreference-elementHTMLArcgisLinkChartElement | HTMLArcgisMapElement | HTMLArcgisSceneElement | string
state
readonlyreflected
state"created" | "creating" | "disabled" | "ready" | "selected" | "selecting"
uniformChartScalinguniform-chart-scalingboolean
unitunit"centimeters" | "decimeters" | "feet" | "imperial" | "inches" | "kilometers" | "meters" | "metric" | "miles" | "millimeters" | "nautical-miles" | "us-feet" | "yards"
unitOptionsArray<"meters" | "metric" | "centimeters" | "decimeters" | "feet" | "inches" | "kilometers" | "millimeters" | "nautical-miles" | "us-feet" | "yards" | "miles" | "imperial">
viewMapView | SceneView

autoDestroyDisabled

Property
autoDestroyDisabled: boolean

If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy method when you are done to prevent memory leaks.

Attribute
auto-destroy-disabled
Default value
false

effectiveUnits

readonlyProperty
effectiveUnits: EffectiveUnits

Units which have been selected according to the magnitude of the elevations and distances that are to be displayed in the component, according to the selected unit or unit system.

hideChart

Property
hideChart: boolean
Attribute
hide-chart
Default value
false

hideClearButton

Property
hideClearButton: boolean
Attribute
hide-clear-button
Default value
false

hideLegend

Property
hideLegend: boolean
Attribute
hide-legend
Default value
false

hideSelectButton

Property
hideSelectButton: boolean
Attribute
hide-select-button
Default value
false

hideSettingsButton

Property
hideSettingsButton: boolean
Attribute
hide-settings-button
Default value
false

hideSketchButton

Property
hideSketchButton: boolean
Attribute
hide-sketch-button
Default value
false

hideUniformChartScalingToggle

Property
hideUniformChartScalingToggle: boolean
Attribute
hide-uniform-chart-scaling-toggle
Default value
false

hideUnitSelector

Property
hideUnitSelector: boolean
Attribute
hide-unit-selector
Default value
false

highlightEnabled

Property
highlightEnabled: boolean

Whether the graphic used as input is highlighted.

Read more...

Attribute
highlight-enabled
Default value
true

hoveredChartPosition

Property
hoveredChartPosition: number

The position, in the range [0, 1], being hovered in the graph.

Read more...

Attribute
hovered-chart-position

icon

Property
icon: string

Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component).

See also
Attribute
icon
Default value
"altitude"

input

Property
input: Graphic

The input path along which elevation will be queried in order to generate an elevation profile.

Read more

Default value
null

label

Property
label: string

The component's default label.

Attribute
label

position

deprecatedProperty
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
Deprecatedsince 4.34, use slot instead.
Attribute
position

profiles

Property

Collection of elevation profile lines which are to be generated and displayed in the component's chart.

Read more

progress

readonlyProperty
progress: number

The progress, between 0 and 1 of generating all the configured elevation profiles.

Read more...

referenceElement

Property

By assigning the id attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.

See also
Attribute
reference-element

state

readonlyreflected
Property
state: "created" | "creating" | "disabled" | "ready" | "selected" | "selecting"

The component's state. The values mean the following:

  • disabled - component is being created
  • ready - component is ready; no path configured and no interactive operation ongoing
  • creating - user is creating a new input path
  • created - input path is configured but no interactive operation is ongoing
  • selecting - user is selecting an existing input path
  • selected - user selected an existing input path
Attribute
state
Default value
"disabled"

uniformChartScaling

Property
uniformChartScaling: boolean

Whether the chart should use a uniform scale for the X and Y axes.

Read more...

Attribute
uniform-chart-scaling
Default value
false

unit

Property
unit: "centimeters" | "decimeters" | "feet" | "imperial" | "inches" | "kilometers" | "meters" | "metric" | "miles" | "millimeters" | "nautical-miles" | "us-feet" | "yards"

Unit system (imperial, metric) or specific unit used for displaying the elevation and distance values.

Read more...

Attribute
unit

unitOptions

Property
unitOptions: Array<"meters" | "metric" | "centimeters" | "decimeters" | "feet" | "inches" | "kilometers" | "millimeters" | "nautical-miles" | "us-feet" | "yards" | "miles" | "imperial">

List of available units and unit systems (imperial, metric) for displaying the elevation and distance values.

Read more...

view

Property

The view associated with the component.

Note: The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this view property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the Elevation Profile component will be associated with a map or scene component rather than using the view property.

Methods

MethodSignature
componentOnReadycomponentOnReady(): Promise<void>
destroydestroy(): Promise<void>
startstart(): Promise<void>
stopstop(): Promise<void>

componentOnReady

Method
componentOnReady(): Promise<void>

Create a promise that resolves once component is fully loaded.

Example
Use dark colors for code blocksCopy
1
2
3
4
const arcgisElevationProfile = document.querySelector("arcgis-elevation-profile");
document.body.append(arcgisElevationProfile);
await arcgisElevationProfile.componentOnReady();
console.log("arcgis-elevation-profile is ready to go!");
Returns
Promise<void>

destroy

Method
destroy(): Promise<void>

Permanently destroy the component.

Returns
Promise<void>

start

Method
start(): Promise<void>

Switches to the "creating" state in which the user can draw a new line.

Returns
Promise<void>

stop

Method
stop(): Promise<void>

Stops the creation operation.

Returns
Promise<void>

Events

EventType
arcgisPropertyChangeCustomEvent<{ name: "state" | "input" | "progress" | "effectiveUnits"; }>
arcgisReadyCustomEvent<void>

arcgisPropertyChange

Event
arcgisPropertyChange: CustomEvent<{ name: "state" | "input" | "progress" | "effectiveUnits"; }>

Emitted when the value of a property is changed. Use this to listen to changes to properties.

bubbles
composed
cancelable

arcgisReady

Event
arcgisReady: CustomEvent<void>

Emitted when the component associated with a map or scene view is ready to be interacted with.

bubbles
composed
cancelable

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.