jmapcloud-ng-types 2.0.14 → 2.0.15-qa.10

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/all-enums.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /** @deprecated Use the JMap.Draw mode vocabulary instead. */
2
+ export const ALL_APP_DRAW_MODES: JAPP_DRAW_MODES[] = [JAPP_DRAW_MODES.DRAW, JAPP_DRAW_MODES.SELECT, JAPP_DRAW_MODES.DELETE]
3
+
1
4
  export const ALL_APP_DRAW_TYPES: JAPP_DRAW_TYPES[] = [
2
5
  JAPP_DRAW_TYPES.POINT,
3
6
  JAPP_DRAW_TYPES.POLYGON,
@@ -9,8 +12,6 @@ export const ALL_APP_DRAW_TYPES: JAPP_DRAW_TYPES[] = [
9
12
 
10
13
  export const ALL_APP_MEASUREMENT_SYSTEMS: JAPP_MEASUREMENT_SYSTEMS[] = [JAPP_MEASUREMENT_SYSTEMS.GEODETIC, JAPP_MEASUREMENT_SYSTEMS.PLANAR]
11
14
 
12
- export const ALL_APP_DRAW_MODES: JAPP_DRAW_MODES[] = [JAPP_DRAW_MODES.DRAW, JAPP_DRAW_MODES.SELECT, JAPP_DRAW_MODES.DELETE]
13
-
14
15
  export const ALL_APP_GEOMETRY_WIZARD_STEPS: JAPP_GEOMETRY_WIZARD_STEPS[] = [JAPP_GEOMETRY_WIZARD_STEPS.SELECT_LAYER, JAPP_GEOMETRY_WIZARD_STEPS.DRAW]
15
16
 
16
17
  /** @deprecated The legacy layer dynamic-filter API was removed. */
package/enums.ts CHANGED
@@ -67,6 +67,13 @@ export enum JAPP_MEASUREMENT_SYSTEMS {
67
67
  }
68
68
 
69
69
  // From draw.d.ts
70
+ /** @deprecated Use JDrawMode and the JMap.Draw mode vocabulary instead. */
71
+ export enum JAPP_DRAW_MODES {
72
+ DRAW = "draw",
73
+ SELECT = "select",
74
+ DELETE = "delete"
75
+ }
76
+
70
77
  export enum JAPP_DRAW_TYPES {
71
78
  POINT = "point",
72
79
  POLYGON = "polygon",
@@ -76,12 +83,6 @@ export enum JAPP_DRAW_TYPES {
76
83
  TEXT = "text"
77
84
  }
78
85
 
79
- export enum JAPP_DRAW_MODES {
80
- DRAW = "draw",
81
- SELECT = "select",
82
- DELETE = "delete"
83
- }
84
-
85
86
  // From geometry.d.ts
86
87
  export enum JAPP_GEOMETRY_WIZARD_STEPS {
87
88
  SELECT_LAYER = "select-layer",
package/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { JAppMessageService, JEventModule } from "jmapcloud-ng-core-types"
1
+ import type { JAppMessageService, JDrawFeature, JEventModule } from "jmapcloud-ng-core-types"
2
2
 
3
3
  // Re-exported so existing `import { JAppMessageService } from "jmapcloud-ng-types"`
4
4
  // callers keep resolving after the slice moved into ng-core-types.
@@ -35,9 +35,8 @@ export interface JAppGeometryState {
35
35
  feature: GeoJSON.Feature | undefined
36
36
  isUpdate: boolean
37
37
  wizardStep: JAPP_GEOMETRY_WIZARD_STEPS
38
- draw: JAppDrawState
39
- lastSnap: JAppSnap
40
- snap: JAppSnap
38
+ activeType: JAPP_DRAW_TYPES
39
+ snap: JAppSnapState
41
40
  isAttributesEditing: boolean
42
41
  }
43
42
 
@@ -88,30 +87,35 @@ export interface JAppMeasureState {
88
87
  measures: JAppMeasure[]
89
88
  isSelectionActive: boolean
90
89
  isNewElement: boolean
91
- draw: JAppDrawState
92
- lastSnap: JAppSnap
93
- snap: JAppSnap
90
+ activeType: JAPP_MEASURE_TYPES
91
+ selectedMeasureIds: string[]
92
+ snap: JAppSnapState
94
93
  }
95
94
 
96
- export interface JAppDrawState {
97
- type: JAPP_DRAW_TYPES
98
- mode: JAPP_DRAW_MODES
99
- featuresSelected: JAppDrawFeature[]
100
- isDeleting: boolean
101
- isNewElement: boolean
102
- isStyling: boolean
103
- style: JAppDrawStyle
95
+ export interface JAppAnnotationStyle {
96
+ fillColor?: string
97
+ fillOpacity?: number
98
+ lineColor?: string
99
+ lineOpacity?: number
100
+ lineWidth?: number
101
+ textColor?: string
102
+ textRotation?: number
103
+ textSize?: number
104
+ textZoomRef?: number
104
105
  }
105
106
 
106
107
  export interface JAppAnnotationState {
107
108
  annotations: JAppAnnotation[]
108
- draw: JAppDrawState
109
+ activeType: JAPP_DRAW_TYPES
110
+ isNewElement: boolean
111
+ isSelectionActive: boolean
109
112
  presetColors: string[]
110
- lastSnap: JAppSnap
111
- snap: JAppSnap
113
+ selectedFeatures: JDrawFeature[]
114
+ snap: JAppSnapState
115
+ style: JAppAnnotationStyle
112
116
  }
113
117
 
114
- export interface JAppSnap {
118
+ export interface JAppSnapState {
115
119
  layerId: JId | undefined
116
120
  isEnabled: boolean
117
121
  }
@@ -138,7 +142,7 @@ export interface JAppSelectionState {
138
142
  isNewElement: boolean
139
143
  tableVisibility: boolean
140
144
  isTabOpened: boolean
141
- draw: JAppDrawState
145
+ activeType: JAPP_SELECTION_TYPES
142
146
  }
143
147
 
144
148
  export interface JApplicationService extends JApplicationMainService {
@@ -160,6 +164,10 @@ export interface JApplicationService extends JApplicationMainService {
160
164
  }
161
165
 
162
166
  export interface JAppGeometryService {
167
+ /** @deprecated Use JMap.Draw.setSnapping("geometry", ...) instead. */
168
+ setSnapEnabled(isEnabled: boolean): void
169
+ /** @deprecated Use JMap.Draw.setSnapping("geometry", ...) instead. */
170
+ setSnapLayerId(layerId: JId): void
163
171
  openPanelForCreation(): void
164
172
  openPanelForUpdate(params: JAppGeometryUpdateParams): void
165
173
  selectLayer(layerId: JId): void
@@ -167,8 +175,6 @@ export interface JAppGeometryService {
167
175
  stopCreationDrawing(): void
168
176
  finishUpdate(): Promise<void>
169
177
  closePanel(): void
170
- setSnapEnabled(isEnabled: boolean): void
171
- setSnapLayerId(LayerId: JId): void
172
178
  }
173
179
 
174
180
  export interface JAppFeatureService {
@@ -185,12 +191,18 @@ export interface JAppProjectService {
185
191
  }
186
192
 
187
193
  export interface JAppAnnotationService {
194
+ /** @deprecated Use JMap.Draw.getMode() instead. */
188
195
  getDrawMode(): JAPP_DRAW_MODES
196
+ /** @deprecated Use JMap.Draw.arm(), disarm(), or deleteFeatures() instead. */
189
197
  setDrawMode(drawMode: JAPP_DRAW_MODES): void
198
+ /** @deprecated Use JMap.Draw.getMode() instead. */
190
199
  getDrawType(): JAPP_DRAW_TYPES
200
+ /** @deprecated Use JMap.Draw.arm({ owner: "annotation", mode }) instead. */
191
201
  setDrawType(drawType: JAPP_DRAW_TYPES): void
202
+ /** @deprecated Use JMap.Draw.setSnapping("annotation", ...) instead. */
192
203
  setSnapEnabled(isEnabled: boolean): void
193
- setSnapLayerId(LayerId: JId): void
204
+ /** @deprecated Use JMap.Draw.setSnapping("annotation", ...) instead. */
205
+ setSnapLayerId(layerId: JId): void
194
206
  existsById(annotationId: string): boolean
195
207
  getById(annotationId: string): JAppAnnotation
196
208
  getAll(): JAppAnnotation[]
@@ -199,9 +211,9 @@ export interface JAppAnnotationService {
199
211
  deleteByType(annotationType: JAPP_DRAW_TYPES): void
200
212
  deleteByIds(annotationIds: string[]): void
201
213
  deleteSelected(): void
202
- getStyle(): JAppDrawStyle
203
- updateStyle(style: JAppDrawStyle): void
204
- setStyleByAnnotationIds(annotationIds: string[], style: JAppDrawStyle): void
214
+ getStyle(): JAppAnnotationStyle
215
+ updateStyle(style: JAppAnnotationStyle): void
216
+ setStyleByAnnotationIds(annotationIds: string[], style: JAppAnnotationStyle): void
205
217
  setPresetColors(presetColors: string[]): void
206
218
  getPresetColors(): string[]
207
219
  addPresetColor(presetColor: string): void
@@ -284,6 +296,10 @@ export interface JAppSelectionService {
284
296
  }
285
297
 
286
298
  export interface JAppMeasureService {
299
+ /** @deprecated Use JMap.Draw.setSnapping("measure", ...) instead. */
300
+ setSnapEnabled(isEnabled: boolean): void
301
+ /** @deprecated Use JMap.Draw.setSnapping("measure", ...) instead. */
302
+ setSnapLayerId(layerId: JId): void
287
303
  getAll(): JAppMeasure[]
288
304
  existsById(measureId: string): boolean
289
305
  getById(measureId: string): JAppMeasure
@@ -303,8 +319,6 @@ export interface JAppMeasureService {
303
319
  deleteAllCircles(): number
304
320
  setMeasurementSystem(measurementSystem: JAPP_MEASUREMENT_SYSTEMS): void
305
321
  getMeasurementSystem(): JAPP_MEASUREMENT_SYSTEMS
306
- setSnapEnabled(isEnabled: boolean): void
307
- setSnapLayerId(LayerId: JId): void
308
322
  }
309
323
 
310
324
  export interface JAppExtensionService {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapcloud-ng-types",
3
- "version": "2.0.14",
3
+ "version": "2.0.15-qa.10",
4
4
  "description": "JMap Cloud specific version of JMap Cloud NG types and interfaces",
5
5
  "main": "src/app.ts",
6
6
  "types": "ambient.d.ts",
@@ -23,7 +23,7 @@
23
23
  "@fortawesome/fontawesome-svg-core": "7.2.0",
24
24
  "@types/react": "^19.2.17",
25
25
  "jmapcloud-ng-core-types": "../ng-core-types",
26
- "maplibre-gl": "^4.7.1",
26
+ "maplibre-gl": "^6.4.0",
27
27
  "react": "19.2.6",
28
28
  "rollup-plugin-visualizer": "^5.14.0",
29
29
  "typedoc": "^0.25.13"
@@ -1,18 +1,21 @@
1
+ import type { JDrawFeature } from "jmapcloud-ng-core-types"
1
2
  import type { JAPP_DRAW_TYPES } from "./draw.d.ts"
2
3
  export {}
3
- export interface JAppAnnotation {
4
- id: string
5
- type: JAPP_DRAW_TYPES
6
- feature: any
4
+
5
+ export interface JAppAnnotationStyle {
6
+ fillColor?: string
7
+ fillOpacity?: number
8
+ lineColor?: string
9
+ lineOpacity?: number
10
+ lineWidth?: number
11
+ textColor?: string
12
+ textRotation?: number
13
+ textSize?: number
14
+ textZoomRef?: number
7
15
  }
8
16
 
9
- export interface JappTextMarkerProperties {
17
+ export interface JAppAnnotation {
10
18
  id: string
11
- location: maplibregl.LngLatLike
12
- textSize: number
13
- textColor: string
14
- textRotation: number
15
- label: string
16
- zoomRef: number
17
- shapeType: string
19
+ type: JAPP_DRAW_TYPES
20
+ feature: JDrawFeature
18
21
  }
package/public/app.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { JAppAnnotation } from "./annotation.d.ts"
2
- import type { JAPP_DRAW_MODES, JAPP_DRAW_TYPES, JAppDrawStyle } from "./draw.d.ts"
1
+ import type { JAppAnnotation, JAppAnnotationStyle } from "./annotation.d.ts"
2
+ import type { JAPP_DRAW_MODES, JAPP_DRAW_TYPES } from "./draw.d.ts"
3
3
  import type { JAppExtension, JAppExtensionEventParams } from "./extension.d.ts"
4
4
  import type { JFormDialogParams, JSubFormDialogParams } from "./form.d.ts"
5
5
  import type { JAppGeometryUpdateParams } from "./geometry.d.ts"
@@ -83,11 +83,11 @@ declare global {
83
83
  /**
84
84
  * **JMap.Application.Annotation.getDrawMode**
85
85
  *
86
- * Returns the current draw mode.
86
+ * Returns the legacy annotation mode corresponding to the current `JMap.Draw` state.
87
87
  *
88
+ * @deprecated Use `JMap.Draw.getMode()` instead.
88
89
  * @example
89
90
  * ```ts
90
- * // return the current draw mode
91
91
  * JMap.Application.Annotation.getDrawMode()
92
92
  * ```
93
93
  */
@@ -96,13 +96,15 @@ declare global {
96
96
  /**
97
97
  * **JMap.Application.Annotation.setDrawMode**
98
98
  *
99
- * Sets the annotation draw mode.
99
+ * Translates `draw` and `select` to the corresponding annotation `JMap.Draw` mode.
100
+ * The legacy `delete` command deletes the selected annotation Draw features.
100
101
  *
101
- * @param drawMode the new draw mode
102
+ * @deprecated Use `JMap.Draw.arm()`, `JMap.Draw.disarm()`, or
103
+ * `JMap.Draw.deleteFeatures()` instead.
104
+ * @param drawMode Legacy draw mode.
102
105
  * @example
103
106
  * ```ts
104
- * // Set the annotation draw mode to "draw"
105
- * JMap.Application.Annotation.setDrawMode("draw")
107
+ * JMap.Application.Annotation.setDrawMode(JAPP_DRAW_MODES.SELECT)
106
108
  * ```
107
109
  */
108
110
  function setDrawMode(drawMode: JAPP_DRAW_MODES): void
@@ -110,30 +112,58 @@ declare global {
110
112
  /**
111
113
  * **JMap.Application.Annotation.getDrawType**
112
114
  *
113
- * Returns the current draw type.
115
+ * Returns the annotation panel's active shape type.
114
116
  *
117
+ * @deprecated Use `JMap.Draw.getMode()` instead.
115
118
  * @example
116
119
  * ```ts
117
- * // return the current draw type
118
120
  * JMap.Application.Annotation.getDrawType()
119
121
  * ```
120
122
  */
121
123
  function getDrawType(): JAPP_DRAW_TYPES
122
124
 
123
125
  /**
124
- * **JMap.Application.Annotation.setDrawMode**
126
+ * **JMap.Application.Annotation.setDrawType**
125
127
  *
126
- * Sets the annotation draw mode.
128
+ * Selects the annotation shape and updates the annotation owner's `JMap.Draw` mode.
127
129
  *
128
- * @param drawType the new draw type
130
+ * @deprecated Use `JMap.Draw.arm({ owner: "annotation", mode })` instead.
131
+ * @param drawType Legacy annotation shape type.
129
132
  * @example
130
133
  * ```ts
131
- * // Set the annotation draw mode to "draw"
132
- * JMap.Application.Annotation.setDrawMode("draw")
134
+ * JMap.Application.Annotation.setDrawType(JAPP_DRAW_TYPES.POLYGON)
133
135
  * ```
134
136
  */
135
137
  function setDrawType(drawType: JAPP_DRAW_TYPES): void
136
138
 
139
+ /**
140
+ * **JMap.Application.Annotation.setSnapEnabled**
141
+ *
142
+ * Enables or disables snapping for the annotation Draw owner.
143
+ *
144
+ * @deprecated Use `JMap.Draw.setSnapping("annotation", { enabled })` instead.
145
+ * @param isEnabled Whether snapping is enabled.
146
+ * @example
147
+ * ```ts
148
+ * JMap.Application.Annotation.setSnapEnabled(true)
149
+ * ```
150
+ */
151
+ function setSnapEnabled(isEnabled: boolean): void
152
+
153
+ /**
154
+ * **JMap.Application.Annotation.setSnapLayerId**
155
+ *
156
+ * Sets the layer used as a snapping target by the annotation Draw owner.
157
+ *
158
+ * @deprecated Use `JMap.Draw.setSnapping("annotation", { toLayers: [String(layerId)] })` instead.
159
+ * @param layerId JMap layer id.
160
+ * @example
161
+ * ```ts
162
+ * JMap.Application.Annotation.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
163
+ * ```
164
+ */
165
+ function setSnapLayerId(layerId: JId): void
166
+
137
167
  /**
138
168
  * **JMap.Application.Annotation.existsById**
139
169
  *
@@ -268,7 +298,7 @@ declare global {
268
298
  * JMap.Application.Annotation.getStyle()
269
299
  * ```
270
300
  */
271
- function getStyle(): JAppDrawStyle
301
+ function getStyle(): JAppAnnotationStyle
272
302
 
273
303
  /**
274
304
  * **JMap.Application.Annotation.updateStyle**
@@ -285,7 +315,7 @@ declare global {
285
315
  * })
286
316
  * ```
287
317
  */
288
- function updateStyle(style: JAppDrawStyle): void
318
+ function updateStyle(style: JAppAnnotationStyle): void
289
319
 
290
320
  /**
291
321
  * **JMap.Application.Annotation.setStyleByAnnotationIds**
@@ -307,7 +337,7 @@ declare global {
307
337
  * JMap.Application.Annotation.setStyleByAnnotationIds(annotationIds, customStyle)
308
338
  * ```
309
339
  */
310
- function setStyleByAnnotationIds(annotationIds: string[], style: JAppDrawStyle): void
340
+ function setStyleByAnnotationIds(annotationIds: string[], style: JAppAnnotationStyle): void
311
341
 
312
342
  /**
313
343
  * **JMap.Application.Annotation.setPresetColors**
@@ -374,36 +404,6 @@ declare global {
374
404
  * ```
375
405
  */
376
406
  function getPresetColors(): string[]
377
-
378
- /**
379
- * **JMap.Application.Annotation.setSnapEnabled**
380
- *
381
- * Enables or disables snap mode.
382
- *
383
- * @param isEnabled true to enable snap mode, false to disable
384
- * @throws if isEnabled is not a boolean
385
- * @example
386
- * ```ts
387
- * // enable snap mode
388
- * JMap.Application.Annotation.setSnapEnabled(true)
389
- * ```
390
- */
391
- function setSnapEnabled(isEnabled: boolean): void
392
-
393
- /**
394
- * **JMap.Application.Annotation.setSnapLayerId**
395
- *
396
- * set the layer id to snap on.
397
- *
398
- * @param layerId the JMap layer id
399
- * @throws if layer not found
400
- * @example
401
- * ```ts
402
- * // snap will target the features of the layer having id="36885146-7eed-4071-9f86-8e29c505af91"
403
- * JMap.Application.Annotation.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
404
- * ```
405
- */
406
- function setSnapLayerId(layerId: JId): void
407
407
  }
408
408
  /**
409
409
  * **JMap.Application.Panel**
@@ -602,6 +602,34 @@ declare global {
602
602
  * You can manage everything related to app geometry creation or update here.
603
603
  */
604
604
  namespace Geometry {
605
+ /**
606
+ * **JMap.Application.Geometry.setSnapEnabled**
607
+ *
608
+ * Enables or disables snapping for the geometry Draw owner.
609
+ *
610
+ * @deprecated Use `JMap.Draw.setSnapping("geometry", { enabled })` instead.
611
+ * @param isEnabled Whether snapping is enabled.
612
+ * @example
613
+ * ```ts
614
+ * JMap.Application.Geometry.setSnapEnabled(true)
615
+ * ```
616
+ */
617
+ function setSnapEnabled(isEnabled: boolean): void
618
+
619
+ /**
620
+ * **JMap.Application.Geometry.setSnapLayerId**
621
+ *
622
+ * Sets the layer used as a snapping target by the geometry Draw owner.
623
+ *
624
+ * @deprecated Use `JMap.Draw.setSnapping("geometry", { toLayers: [String(layerId)] })` instead.
625
+ * @param layerId JMap layer id.
626
+ * @example
627
+ * ```ts
628
+ * JMap.Application.Geometry.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
629
+ * ```
630
+ */
631
+ function setSnapLayerId(layerId: JId): void
632
+
605
633
  /**
606
634
  * **JMap.Application.Geometry.openPanelForCreation**
607
635
  *
@@ -699,44 +727,42 @@ declare global {
699
727
  * ```
700
728
  */
701
729
  function closePanel(): void
730
+ }
702
731
 
732
+ /**
733
+ * **JMap.Application.Selection**
734
+ *
735
+ * You can manage the application measure tools here.
736
+ */
737
+ namespace Measure {
703
738
  /**
704
- * **JMap.Application.Geometry.setSnapEnabled**
739
+ * **JMap.Application.Measure.setSnapEnabled**
705
740
  *
706
- * Enables or disables snap mode.
741
+ * Enables or disables snapping for the measure Draw owner.
707
742
  *
708
- * @param isEnabled true to enable snap mode, false to disable
709
- * @throws if isEnabled is not a boolean
743
+ * @deprecated Use `JMap.Draw.setSnapping("measure", { enabled })` instead.
744
+ * @param isEnabled Whether snapping is enabled.
710
745
  * @example
711
746
  * ```ts
712
- * // enable snap mode
713
- * JMap.Application.Geometry.setSnapEnabled(true)
747
+ * JMap.Application.Measure.setSnapEnabled(true)
714
748
  * ```
715
749
  */
716
750
  function setSnapEnabled(isEnabled: boolean): void
717
751
 
718
752
  /**
719
- * **JMap.Application.Geometry.setSnapLayerId**
753
+ * **JMap.Application.Measure.setSnapLayerId**
720
754
  *
721
- * set the layer id to snap on.
755
+ * Sets the layer used as a snapping target by the measure Draw owner.
722
756
  *
723
- * @param layerId the JMap layer id
724
- * @throws if layer not found
757
+ * @deprecated Use `JMap.Draw.setSnapping("measure", { toLayers: [String(layerId)] })` instead.
758
+ * @param layerId JMap layer id.
725
759
  * @example
726
760
  * ```ts
727
- * // snap will target the features of the layer having id="36885146-7eed-4071-9f86-8e29c505af91"
728
- * JMap.Application.Geometry.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
761
+ * JMap.Application.Measure.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
729
762
  * ```
730
763
  */
731
764
  function setSnapLayerId(layerId: JId): void
732
- }
733
765
 
734
- /**
735
- * **JMap.Application.Selection**
736
- *
737
- * You can manage the application measure tools here.
738
- */
739
- namespace Measure {
740
766
  /**
741
767
  * **JMap.Application.Measure.getAll**
742
768
  *
@@ -1025,36 +1051,6 @@ declare global {
1025
1051
  * ```
1026
1052
  */
1027
1053
  function setMeasurementSystem(measurementSystem: JAPP_MEASUREMENT_SYSTEMS): void
1028
-
1029
- /**
1030
- * **JMap.Application.Measure.setSnapEnabled**
1031
- *
1032
- * Enables or disables snap mode.
1033
- *
1034
- * @param isEnabled true to enable snap mode, false to disable
1035
- * @throws if isEnabled is not a boolean
1036
- * @example
1037
- * ```ts
1038
- * // enable snap mode
1039
- * JMap.Application.Measure.setSnapEnabled(true)
1040
- * ```
1041
- */
1042
- function setSnapEnabled(isEnabled: boolean): void
1043
-
1044
- /**
1045
- * **JMap.Application.Measure.setSnapLayerId**
1046
- *
1047
- * set the layer id to snap on.
1048
- *
1049
- * @param layerId the JMap layer id
1050
- * @throws if layer not found
1051
- * @example
1052
- * ```ts
1053
- * // snap will target the features of the layer having id="36885146-7eed-4071-9f86-8e29c505af91"
1054
- * JMap.Application.Measure.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
1055
- * ```
1056
- */
1057
- function setSnapLayerId(layerId: JId): void
1058
1054
  }
1059
1055
 
1060
1056
  /**
package/public/draw.d.ts CHANGED
@@ -1,4 +1,15 @@
1
1
  export {}
2
+
3
+ /**
4
+ * @deprecated Use `JDrawMode` and the `JMap.Draw` mode vocabulary instead.
5
+ * Kept for compatibility with the deprecated `JMap.Application.Annotation` draw methods.
6
+ */
7
+ export enum JAPP_DRAW_MODES {
8
+ DRAW = "draw",
9
+ SELECT = "select",
10
+ DELETE = "delete"
11
+ }
12
+
2
13
  // ALL_APP_DRAW_TYPES in all-enum.ts
3
14
  export enum JAPP_DRAW_TYPES {
4
15
  POINT = "point",
@@ -8,47 +19,3 @@ export enum JAPP_DRAW_TYPES {
8
19
  CIRCLE = "circle",
9
20
  TEXT = "text"
10
21
  }
11
-
12
- // ALL_APP_DRAW_MODES in all-enum.ts
13
- export enum JAPP_DRAW_MODES {
14
- DRAW = "draw",
15
- SELECT = "select",
16
- DELETE = "delete"
17
- }
18
-
19
- export type JAppDrawFeaturesFn = (features: JAppDrawFeature[]) => void
20
-
21
- export interface JAppDrawFeature extends GeoJSON.Feature {
22
- id: string
23
- properties: JAppDrawStyle
24
- coordinates: JPoint[]
25
- addCoordinate: (path?: string | number, lng?: number, lat?: number) => void
26
- isValid: () => boolean
27
- updateCoordinate: (path?: string | number, lng?: number, lat?: number) => void
28
- toGeoJSON: () => GeoJSON.Feature
29
- removeCoordinate: (path: string | number) => void
30
- incomingCoords(coords: JPoint[][]): void
31
- }
32
-
33
- export interface JAppDrawStyle extends Partial<JAppDrawTextStyle> {
34
- fillColor?: string
35
- fillOpacity?: number
36
- lineColor?: string
37
- lineOpacity?: number
38
- lineWidth?: number
39
- shapeType?: string
40
- radiusInKm?: number
41
- pointRadiusStrokeInactive?: number
42
- pointRadiusActive?: number
43
- pointRadiusStrokeActive?: number
44
- pointRadiusInactive?: number
45
- center?: number[]
46
- useLocationIcon?: boolean
47
- }
48
-
49
- export interface JAppDrawTextStyle {
50
- textSize: number
51
- textColor: string
52
- textRotation: number
53
- textZoomRef?: number
54
- }
@@ -18,16 +18,12 @@ import type * as uidts from "./ui.d.ts"
18
18
 
19
19
  /** @internal @hidden */
20
20
  declare global {
21
+ /** @internal */ type JAppAnnotationStyle = annotationdts.JAppAnnotationStyle
21
22
  /** @internal */ type JAppAnnotation = annotationdts.JAppAnnotation
22
- /** @internal */ type JappTextMarkerProperties = annotationdts.JappTextMarkerProperties
23
- /** @internal */ type JAPP_DRAW_TYPES = drawdts.JAPP_DRAW_TYPES
24
- /** @internal */ const JAPP_DRAW_TYPES: typeof drawdts.JAPP_DRAW_TYPES
25
23
  /** @internal */ type JAPP_DRAW_MODES = drawdts.JAPP_DRAW_MODES
26
24
  /** @internal */ const JAPP_DRAW_MODES: typeof drawdts.JAPP_DRAW_MODES
27
- /** @internal */ type JAppDrawFeaturesFn = drawdts.JAppDrawFeaturesFn
28
- /** @internal */ type JAppDrawFeature = drawdts.JAppDrawFeature
29
- /** @internal */ type JAppDrawStyle = drawdts.JAppDrawStyle
30
- /** @internal */ type JAppDrawTextStyle = drawdts.JAppDrawTextStyle
25
+ /** @internal */ type JAPP_DRAW_TYPES = drawdts.JAPP_DRAW_TYPES
26
+ /** @internal */ const JAPP_DRAW_TYPES: typeof drawdts.JAPP_DRAW_TYPES
31
27
  /** @internal */ type JAppExtension = extensiondts.JAppExtension
32
28
  /** @internal */ type JAppExtensionEventParams = extensiondts.JAppExtensionEventParams
33
29
  /** @internal */ type JFormDialogParams = formdts.JFormDialogParams
@@ -1,8 +1,7 @@
1
- import type { JAppAnnotation, JappTextMarkerProperties } from "./annotation.d.ts"
1
+ import type { JAppAnnotation } from "./annotation.d.ts"
2
2
  import type { JAppMeasure } from "./measure.d.ts"
3
3
  export {}
4
4
  export interface JAppMapContextData {
5
5
  measures: JAppMeasure[]
6
6
  annotations: JAppAnnotation[]
7
- annotationsTextMarkersProperties: JappTextMarkerProperties[]
8
7
  }