Constructors
constructor
- new ElevationProfile(options: ElevationProfileOptions): ElevationProfile
Parameters
- options: ElevationProfileOptions
Methods
getTickValues
- getTickValues(
axisHeight: number,
yDomainLength: number,
yTickSize?: number,
): number[] Parameters
- axisHeight: number
- yDomainLength: number
- yTickSize: number = 40
Returns number[]
hideNotUsedAxisPart
- hideNotUsedAxisPart(): void
Returns void
setProfile
- setProfile(lines: number[][], points: number[][]): Promise<void>
Parameters
- lines: number[][]
- points: number[][]
Returns Promise<void>
ElevationProfile
Demo
Description
The ElevationProfile is responsible for displaying the elevation profile of a hiking and its stopovers.
To use the ElevationProfile, you need to set the target, the element where to display to profile, and the map.
Where
profile
is the id of the element where to display the profile andmap
is an OpenLayers map instance.Then, the profile needs to be linked to the HikingEditor to the hiking editor to be updated when the hiking is changes:
Styling
The
sww.css
file must be included in the page to style the elevation profile.