@conterra/ct-mapapps-typings 4.19.0-next.20241108045540 → 4.19.0-next.20241112045346
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.
package/measurement-2d/api.d.ts
CHANGED
|
@@ -2,7 +2,20 @@ import { Watchable } from 'apprt-core/Types';
|
|
|
2
2
|
import { Polyline, Polygon } from 'esri/geometry';
|
|
3
3
|
import { SystemOrAreaUnit, SystemOrLengthUnit } from 'esri/core/units';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Measurement mode.
|
|
7
|
+
* - `off`: No measurement is active.
|
|
8
|
+
* - `area`: Area measurement is active.
|
|
9
|
+
* - `distance`: Distance measurement is active.
|
|
10
|
+
*/
|
|
5
11
|
type Measurement2DMode = "off" | "area" | "distance";
|
|
12
|
+
/**
|
|
13
|
+
* Measurement state.
|
|
14
|
+
* - `disabled`: Measurement is disabled (corresponds to `off` mode).
|
|
15
|
+
* - `ready`: Measurement is ready to start.
|
|
16
|
+
* - `measuring`: Measurement is in progress.
|
|
17
|
+
* - `measured`: Measurement is finished.
|
|
18
|
+
*/
|
|
6
19
|
type Measurement2DState = "disabled" | "ready" | "measuring" | "measured";
|
|
7
20
|
/**
|
|
8
21
|
* {@link Watchable} properties of {@link Measurement2DModel}.
|
|
@@ -18,49 +31,50 @@ interface Measurement2DModelProperties {
|
|
|
18
31
|
readonly state: Measurement2DState;
|
|
19
32
|
/**
|
|
20
33
|
* Measurement unit is either unit system (metric, imperial) or a specific unit.
|
|
21
|
-
* Available if the
|
|
34
|
+
* Available if the {@link mode} is set to `area` or `distance`.
|
|
22
35
|
*/
|
|
23
36
|
readonly unit: SystemOrAreaUnit | SystemOrLengthUnit;
|
|
24
37
|
/**
|
|
25
38
|
* Locale specific representation of the length including the unit.
|
|
26
|
-
* Available if the
|
|
39
|
+
* Available if the {@link mode} is set to `distance`.
|
|
27
40
|
*/
|
|
28
41
|
readonly distance: string;
|
|
29
42
|
/**
|
|
30
43
|
* Locale specific representation of the area including the unit.
|
|
31
|
-
* Available if the
|
|
44
|
+
* Available if the {@link mode} is set to `area`.
|
|
32
45
|
*/
|
|
33
46
|
readonly area: string;
|
|
34
47
|
/**
|
|
35
48
|
* Locale specific representation of the perimeter including the unit.
|
|
36
|
-
* Available if the
|
|
49
|
+
* Available if the {@link mode} is set to `area`.
|
|
37
50
|
*/
|
|
38
51
|
readonly perimeter: string;
|
|
39
52
|
/**
|
|
40
53
|
* The measurement geometry.
|
|
41
|
-
* Available if the
|
|
54
|
+
* Available if the {@link mode} is set to `area` or `distance`.
|
|
42
55
|
* If mode is `area`, the geometry is a polygon.
|
|
43
56
|
* If mode is `distance`, the geometry is a polyline.
|
|
44
57
|
*/
|
|
45
58
|
readonly geometry: Polyline | Polygon;
|
|
46
59
|
/**
|
|
47
60
|
* Distance always in meters.
|
|
48
|
-
* Available if the
|
|
61
|
+
* Available if the {@link mode} is set to `distance`.
|
|
49
62
|
*/
|
|
50
63
|
readonly rawDistance: number;
|
|
51
64
|
/**
|
|
52
65
|
* Area always in square meter.
|
|
53
|
-
* Available if the
|
|
66
|
+
* Available if the {@link mode} is set to `area`.
|
|
54
67
|
*/
|
|
55
68
|
readonly rawArea: number;
|
|
56
69
|
/**
|
|
57
70
|
* Perimeter always in meters.
|
|
58
|
-
* Available if the
|
|
71
|
+
* Available if the {@link mode} is set to `area`.
|
|
59
72
|
*/
|
|
60
73
|
readonly rawPerimeter: number;
|
|
61
74
|
}
|
|
62
75
|
/**
|
|
63
76
|
* A model, providing access to the current measurement state.
|
|
77
|
+
* It is available as service `measurement-2d.Model`.
|
|
64
78
|
*
|
|
65
79
|
* See {@link Measurement2DModelProperties} for documentation of class members.
|
|
66
80
|
*/
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Watchable } from 'apprt-core/Types';
|
|
2
|
+
import { SystemOrAreaUnit, SystemOrLengthUnit } from 'esri/core/units';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Measurement mode.
|
|
6
|
+
* - `off`: Measurement is disabled.
|
|
7
|
+
* - `area`: Area measurement is enabled.
|
|
8
|
+
* - `distance`: Distance measurement is enabled.
|
|
9
|
+
*/
|
|
10
|
+
type Measurement3DMode = "off" | "area" | "distance";
|
|
11
|
+
/**
|
|
12
|
+
* Measurement state.
|
|
13
|
+
* - `disabled`: Measurement is disabled.
|
|
14
|
+
* - `ready`: Measurement is enabled and ready to start.
|
|
15
|
+
* - `measuring`: Measurement is in progress.
|
|
16
|
+
* - `measured`: Measurement is finished.
|
|
17
|
+
*/
|
|
18
|
+
type Measurement3DState = "disabled" | "ready" | "measuring" | "measured";
|
|
19
|
+
/**
|
|
20
|
+
* {@link Watchable} properties of {@link Measurement3DModel}.
|
|
21
|
+
*/
|
|
22
|
+
interface Measurement3DModelProperties {
|
|
23
|
+
/**
|
|
24
|
+
* Measurement mode.
|
|
25
|
+
*/
|
|
26
|
+
readonly mode: Measurement3DMode;
|
|
27
|
+
/**
|
|
28
|
+
* Measurement state.
|
|
29
|
+
*/
|
|
30
|
+
readonly state: Measurement3DState;
|
|
31
|
+
/**
|
|
32
|
+
* Measurement unit is either unit system (metric, imperial) or a specific unit.
|
|
33
|
+
* Available if the {@link mode} is set to `area` or `distance`.
|
|
34
|
+
*/
|
|
35
|
+
readonly unit: SystemOrAreaUnit | SystemOrLengthUnit;
|
|
36
|
+
/**
|
|
37
|
+
* Locale specific representation of the direct distance including the unit.
|
|
38
|
+
* Available if the {@link mode} is set to `distance`.
|
|
39
|
+
*/
|
|
40
|
+
directDistance: string;
|
|
41
|
+
/**
|
|
42
|
+
* Locale specific representation of the horizontal distance including the unit.
|
|
43
|
+
* Available if the {@link mode} is set to `distance`.
|
|
44
|
+
*/
|
|
45
|
+
horizontalDistance: string;
|
|
46
|
+
/**
|
|
47
|
+
* Locale specific representation of the vertical distance including the unit.
|
|
48
|
+
* Available if the {@link mode} is set to `distance`.
|
|
49
|
+
*/
|
|
50
|
+
verticalDistance: string;
|
|
51
|
+
/**
|
|
52
|
+
* Locale specific representation of the area including the unit.
|
|
53
|
+
* Available if the {@link mode} is set to `area`.
|
|
54
|
+
*/
|
|
55
|
+
readonly area: string;
|
|
56
|
+
/**
|
|
57
|
+
* Locale specific representation of the perimeter including the unit.
|
|
58
|
+
* Available if the {@link mode} is set to `area`.
|
|
59
|
+
*/
|
|
60
|
+
readonly perimeter: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A model, providing access to the current measurement state.
|
|
64
|
+
* It is available as service `measurement-3d.Model`.
|
|
65
|
+
*
|
|
66
|
+
* See {@link Measurement3DModelProperties} for documentation of class members.
|
|
67
|
+
*/
|
|
68
|
+
interface Measurement3DModel extends Measurement3DModelProperties, Watchable<Measurement3DModelProperties> {
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type { Measurement3DMode, Measurement3DModel, Measurement3DModelProperties, Measurement3DState };
|