import "@arcgis/map-components/components/arcgis-elevation-profile";
The Elevation Profile component is used to generate and display an elevation profile from an input line graphic.
See also
Demo
Properties
Property | Attribute | Type |
---|---|---|
auto-destroy-disabled | boolean | |
effectiveUnits readonly |
| |
hide-chart | boolean | |
hide-clear-button | boolean | |
hide-legend | boolean | |
hide-select-button | boolean | |
hide-settings-button | boolean | |
hide-sketch-button | boolean | |
hide-uniform-chart-scaling-toggle | boolean | |
hide-unit-selector | boolean | |
highlight-enabled | boolean | |
hovered-chart-position | number | |
icon | string | |
| ||
label | string | |
position | "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing" | |
| ||
progress readonly |
| number |
reference-element | ||
state readonly | state | "created" | "creating" | "disabled" | "ready" | "selected" | "selecting" |
uniform-chart-scaling | boolean | |
unit | "centimeters" | "decimeters" | "feet" | "imperial" | "inches" | "kilometers" | "meters" | "metric" | "miles" | "millimeters" | "nautical-miles" | "us-feet" | "yards" | |
| Array<"imperial" | "metric" | "millimeters" | "centimeters" | "decimeters" | "meters" | "kilometers" | "inches" | "feet" | "yards" | "miles" | "nautical-miles" | "us-feet"> |
autoDestroyDisabled
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
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.
hideSettingsButton
hideSettingsButton: boolean
- Attribute
- hide-settings-button
- Default value
- false
hideUniformChartScalingToggle
hideUniformChartScalingToggle: boolean
- Attribute
- hide-uniform-chart-scaling-toggle
- Default value
- false
highlightEnabled
highlightEnabled: boolean
Whether the graphic used as input is highlighted.
- Attribute
- highlight-enabled
- Default value
- true
hoveredChartPosition
hoveredChartPosition: number
The position, in the range [0, 1], being hovered in the graph.
- Attribute
- hovered-chart-position
icon
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: Calcite Icons
- Attribute
- icon
- Default value
- "altitude"
input
input: Graphic
The input path along which elevation will be queried in order to generate an elevation profile.
- Default value
- null
position
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
- Attribute
- position
- Default value
- "bottom-left"
profiles
profiles: Collection<ElevationProfileLineGround | ElevationProfileLineInput | ElevationProfileLineQuery | ElevationProfileLineView>
Collection of elevation profile lines which are to be generated and displayed in the component's chart.
progress
progress: number
The progress, between 0 and 1 of generating all the configured elevation profiles.
referenceElement
referenceElement: HTMLArcgisLinkChartElement | HTMLArcgisMapElement | HTMLArcgisSceneElement | string
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.
- Attribute
- reference-element
state
state: "created" | "creating" | "disabled" | "ready" | "selected" | "selecting"
The component's state. The values mean the following:
disabled
- component is being createdready
- component is ready; no path configured and no interactive operation ongoingcreating
- user is creating a new input pathcreated
- input path is configured but no interactive operation is ongoingselecting
- user is selecting an existing input pathselected
- user selected an existing input path
- Attribute
- state
- Default value
- "disabled"
uniformChartScaling
uniformChartScaling: boolean
Whether the chart should use a uniform scale for the X and Y axes.
- Attribute
- uniform-chart-scaling
- Default value
- false
unit
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.
- Attribute
- unit
unitOptions
unitOptions: Array<"imperial" | "metric" | "millimeters" | "centimeters" | "decimeters" | "meters" | "kilometers" | "inches" | "feet" | "yards" | "miles" | "nautical-miles" | "us-feet">
List of available units and unit systems (imperial, metric) for displaying the elevation and distance values.
Slots
Events
Event | Type |
---|---|
CustomEvent<{ name: "state" | "input" | "progress" | "effectiveUnits"; }> | |
CustomEvent<void> |
arcgisPropertyChange
arcgisPropertyChange: CustomEvent<{ name: "state" | "input" | "progress" | "effectiveUnits"; }>
Emitted when the value of a property is changed. Use this to listen to changes to properties.
Events triggered on this element will be propagated to their outermost elements.
The event is composable and will propagate across the shadow DOM into the standard DOM.
The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.
arcgisReady
arcgisReady: CustomEvent<void>
Emitted when the component associated with a map or scene view is is ready to be interacted with.
Events triggered on this element will be propagated to their outermost elements.
The event is composable and will propagate across the shadow DOM into the standard DOM.
The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.
Methods
Method | Signature |
---|---|
componentOnReady(): Promise<void> | |
destroy(): Promise<void> | |
start(): Promise<void> | |
stop(): Promise<void> |
componentOnReady
componentOnReady(): Promise<void>
Create a promise that resolves once component is fully loaded.
Example
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>