@geoportallux/feature-info-templates 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ import { MaybeRefOrGetter } from 'vue';
2
+ import { LuxTplProfileMapAdapter } from '../context';
3
+ import { ProfileData, ProfileDataEntry } from './profile';
4
+ /**
5
+ * Links a profile chart to its line on the map: pointing near the line
6
+ * highlights the chart, hovering the chart moves the map marker. `lines` are
7
+ * the line parts in EPSG:2169. Without `adapter` (a host without map), it does
8
+ * nothing. Must be called from a component `setup()`.
9
+ */
10
+ export declare function useProfileMapHover(adapter: LuxTplProfileMapAdapter | undefined, lines: MaybeRefOrGetter<number[][][]>, profileData: MaybeRefOrGetter<ProfileData | undefined>): {
11
+ highlightDistance: import('vue').Ref<number | undefined, number | undefined>;
12
+ onHover: (point: ProfileDataEntry) => void;
13
+ onOut: () => void;
14
+ };
@@ -17,6 +17,17 @@ export interface ProfileDataEntry extends ProfileJsonEntry {
17
17
  elevationGain: number;
18
18
  elevationLoss: number;
19
19
  }
20
+ export interface ProfileQuery {
21
+ /** Stringified GeoJSON (Multi)LineString in EPSG:2169. */
22
+ geom: string;
23
+ id?: string | number;
24
+ /** Elevation models, `dhm` by default. */
25
+ layers?: string;
26
+ /** Samples along the line (100 gives 101 points). */
27
+ nbPoints?: number;
28
+ }
29
+ /** Posts a line to the geoportail `profile.json` service. */
30
+ export declare function fetchProfile(url: string, { geom, id, layers, nbPoints }: ProfileQuery, init?: Pick<RequestInit, 'credentials' | 'signal'>): Promise<ProfileJson>;
20
31
  /** Adds the running elevation gain, loss and balance to each profile point. */
21
32
  export declare function toProfileData({ profile }: ProfileJson): ProfileData;
22
33
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoportallux/feature-info-templates",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Shared GetFeatureInfo templates for the Luxembourg geoportal (2D app and 3D viewer).",
5
5
  "license": "MIT",
6
6
  "repository": {