jmapcloud-ng-types 1.0.6 → 1.0.8
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/index.ts +17 -0
- package/package.json +2 -2
- package/public/app.d.ts +90 -0
package/index.ts
CHANGED
|
@@ -25,6 +25,8 @@ export interface JAppGeometryState {
|
|
|
25
25
|
isUpdate: boolean
|
|
26
26
|
wizardStep: JAPP_GEOMETRY_WIZARD_STEPS
|
|
27
27
|
draw: JAppDrawState
|
|
28
|
+
lastSnap: JAppSnap
|
|
29
|
+
snap: JAppSnap
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
export interface JAppFeatureState {
|
|
@@ -75,6 +77,8 @@ export interface JAppMeasureState {
|
|
|
75
77
|
isSelectionActive: boolean
|
|
76
78
|
isNewElement: boolean
|
|
77
79
|
draw: JAppDrawState
|
|
80
|
+
lastSnap: JAppSnap
|
|
81
|
+
snap: JAppSnap
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
export interface JAppDrawState {
|
|
@@ -91,6 +95,13 @@ export interface JAppAnnotationState {
|
|
|
91
95
|
annotations: JAppAnnotation[]
|
|
92
96
|
draw: JAppDrawState
|
|
93
97
|
presetColors: string[]
|
|
98
|
+
lastSnap: JAppSnap
|
|
99
|
+
snap: JAppSnap
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface JAppSnap {
|
|
103
|
+
layerId: JId | undefined
|
|
104
|
+
isEnabled: boolean
|
|
94
105
|
}
|
|
95
106
|
|
|
96
107
|
export interface JAppPrintState {
|
|
@@ -157,6 +168,8 @@ export interface JAppGeometryService {
|
|
|
157
168
|
finishCreate(): void
|
|
158
169
|
finishUpdate(): Promise<void>
|
|
159
170
|
closePanel(): void
|
|
171
|
+
setSnapEnabled(isEnabled: boolean): void
|
|
172
|
+
setSnapLayerId(LayerId: JId): void
|
|
160
173
|
}
|
|
161
174
|
|
|
162
175
|
export interface JAppFeatureService {
|
|
@@ -187,6 +200,8 @@ export interface JAppAnnotationService {
|
|
|
187
200
|
setDrawMode(drawMode: JAPP_DRAW_MODES): void
|
|
188
201
|
getDrawType(): JAPP_DRAW_TYPES
|
|
189
202
|
setDrawType(drawType: JAPP_DRAW_TYPES): void
|
|
203
|
+
setSnapEnabled(isEnabled: boolean): void
|
|
204
|
+
setSnapLayerId(LayerId: JId): void
|
|
190
205
|
existsById(annotationId: string): boolean
|
|
191
206
|
getById(annotationId: string): JAppAnnotation
|
|
192
207
|
getAll(): JAppAnnotation[]
|
|
@@ -302,6 +317,8 @@ export interface JAppMeasureService {
|
|
|
302
317
|
deleteAllCircles(): number
|
|
303
318
|
setMeasurementSystem(measurementSystem: JAPP_MEASUREMENT_SYSTEMS): void
|
|
304
319
|
getMeasurementSystem(): JAPP_MEASUREMENT_SYSTEMS
|
|
320
|
+
setSnapEnabled(isEnabled: boolean): void
|
|
321
|
+
setSnapLayerId(LayerId: JId): void
|
|
305
322
|
}
|
|
306
323
|
|
|
307
324
|
export interface JAppExtensionService {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jmapcloud-ng-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "JMap Cloud specific version of JMap Cloud NG types and interfaces",
|
|
5
5
|
"main": "src/app.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"homepage": "https://github.com/k2geospatial/jmapcloud-ng-types#readme",
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/react": "18.2.21",
|
|
26
|
-
"jmapcloud-ng-core-types": "1.0.
|
|
26
|
+
"jmapcloud-ng-core-types": "1.0.7",
|
|
27
27
|
"maplibre-gl": "^3.2.1",
|
|
28
28
|
"react": "^18.2.0",
|
|
29
29
|
"typedoc": "^0.24.8"
|
package/public/app.d.ts
CHANGED
|
@@ -365,6 +365,36 @@ declare namespace JMap {
|
|
|
365
365
|
* ```
|
|
366
366
|
*/
|
|
367
367
|
function getPresetColors(): string[]
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* **JMap.Application.Annotation.setSnapEnabled**
|
|
371
|
+
*
|
|
372
|
+
* Enables or disables snap mode.
|
|
373
|
+
*
|
|
374
|
+
* @param isEnabled true to enable snap mode, false to disable
|
|
375
|
+
* @throws if isEnabled is not a boolean
|
|
376
|
+
* @example ```ts
|
|
377
|
+
*
|
|
378
|
+
* // enable snap mode
|
|
379
|
+
* JMap.Application.Annotation.setSnapEnabled(true)
|
|
380
|
+
* ```
|
|
381
|
+
*/
|
|
382
|
+
function setSnapEnabled(isEnabled: boolean): void
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* **JMap.Application.Annotation.setSnapLayerId**
|
|
386
|
+
*
|
|
387
|
+
* set the layer id to snap on.
|
|
388
|
+
*
|
|
389
|
+
* @param layerId the JMap layer id
|
|
390
|
+
* @throws if layer not found
|
|
391
|
+
* @example ```ts
|
|
392
|
+
*
|
|
393
|
+
* // snap will target the features of the layer having id="36885146-7eed-4071-9f86-8e29c505af91"
|
|
394
|
+
* JMap.Application.Annotation.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
|
|
395
|
+
* ```
|
|
396
|
+
*/
|
|
397
|
+
function setSnapLayerId(layerId: JId): void
|
|
368
398
|
}
|
|
369
399
|
/**
|
|
370
400
|
* **JMap.Application.Panel**
|
|
@@ -676,6 +706,36 @@ declare namespace JMap {
|
|
|
676
706
|
* ```
|
|
677
707
|
*/
|
|
678
708
|
function closePanel(): void
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* **JMap.Application.Geometry.setSnapEnabled**
|
|
712
|
+
*
|
|
713
|
+
* Enables or disables snap mode.
|
|
714
|
+
*
|
|
715
|
+
* @param isEnabled true to enable snap mode, false to disable
|
|
716
|
+
* @throws if isEnabled is not a boolean
|
|
717
|
+
* @example ```ts
|
|
718
|
+
*
|
|
719
|
+
* // enable snap mode
|
|
720
|
+
* JMap.Application.Geometry.setSnapEnabled(true)
|
|
721
|
+
* ```
|
|
722
|
+
*/
|
|
723
|
+
function setSnapEnabled(isEnabled: boolean): void
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* **JMap.Application.Geometry.setSnapLayerId**
|
|
727
|
+
*
|
|
728
|
+
* set the layer id to snap on.
|
|
729
|
+
*
|
|
730
|
+
* @param layerId the JMap layer id
|
|
731
|
+
* @throws if layer not found
|
|
732
|
+
* @example ```ts
|
|
733
|
+
*
|
|
734
|
+
* // snap will target the features of the layer having id="36885146-7eed-4071-9f86-8e29c505af91"
|
|
735
|
+
* JMap.Application.Geometry.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
|
|
736
|
+
* ```
|
|
737
|
+
*/
|
|
738
|
+
function setSnapLayerId(layerId: JId): void
|
|
679
739
|
}
|
|
680
740
|
|
|
681
741
|
/**
|
|
@@ -972,6 +1032,36 @@ declare namespace JMap {
|
|
|
972
1032
|
* ```
|
|
973
1033
|
*/
|
|
974
1034
|
function setMeasurementSystem(measurementSystem: JAPP_MEASUREMENT_SYSTEMS): void
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* **JMap.Application.Measure.setSnapEnabled**
|
|
1038
|
+
*
|
|
1039
|
+
* Enables or disables snap mode.
|
|
1040
|
+
*
|
|
1041
|
+
* @param isEnabled true to enable snap mode, false to disable
|
|
1042
|
+
* @throws if isEnabled is not a boolean
|
|
1043
|
+
* @example ```ts
|
|
1044
|
+
*
|
|
1045
|
+
* // enable snap mode
|
|
1046
|
+
* JMap.Application.Measure.setSnapEnabled(true)
|
|
1047
|
+
* ```
|
|
1048
|
+
*/
|
|
1049
|
+
function setSnapEnabled(isEnabled: boolean): void
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* **JMap.Application.Measure.setSnapLayerId**
|
|
1053
|
+
*
|
|
1054
|
+
* set the layer id to snap on.
|
|
1055
|
+
*
|
|
1056
|
+
* @param layerId the JMap layer id
|
|
1057
|
+
* @throws if layer not found
|
|
1058
|
+
* @example ```ts
|
|
1059
|
+
*
|
|
1060
|
+
* // snap will target the features of the layer having id="36885146-7eed-4071-9f86-8e29c505af91"
|
|
1061
|
+
* JMap.Application.Measure.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
|
|
1062
|
+
* ```
|
|
1063
|
+
*/
|
|
1064
|
+
function setSnapLayerId(layerId: JId): void
|
|
975
1065
|
}
|
|
976
1066
|
|
|
977
1067
|
/**
|