Components to request and display an elevation profile over Switzerland
npm install @swissgeo/elevation-profilebash
pnpm add @swissgeo/elevation-profile
`
$3
To properly style the profile, you need to set up TailwindCSS in your project, and then to import the profile style by doing
`css
/ style.css /
@import 'tailwindcss';
@import '@swissgeo/elevation-profile/tailwindcss';
`
Usage
$3
`vue
`
$3
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| points | SingleCoordinate[] | [] | Array of coordinates defining the path for the elevation profile. |
| projection | string | 'EPSG:2056' | The projection of the input points (e.g., 'EPSG:2056' for LV95 or 'EPSG:4326' for WGS84). |
| simplify | boolean | false | Whether to simplify the geometry before requesting the profile. |
| filename | string | 'export' | The default filename used when exporting the profile data as CSV. |
Map Integration
The package provides "bridge" components that allow synchronizing the elevation profile with a map. When you hover over the elevation chart, these components will display a marker at the corresponding location on the map.
$3
`vue
`
$3
`vue
``