jmapcloud-ng-types 0.0.0

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,3407 @@
1
+ declare namespace JMap {
2
+ /**
3
+ * **JMap.Application**
4
+ *
5
+ * This is the JMap Cloud NG API documentation.
6
+ *
7
+ * JMap Cloud NG depends on the JMap Cloud NG Core library ([[JMap]]).
8
+ *
9
+ * Examples are available <a href="https://doc.k2geospatial.com/jmap/doc/ng_dev/examples.html" target="_blank">here</a>.
10
+ *
11
+ * You can customize JMap Cloud NG by providing startup options ([[JApplicationOptions]]).
12
+ */
13
+ namespace Application {
14
+ /**
15
+ * **JMap.Application.getVersion**
16
+ *
17
+ * Returns the application build version.
18
+ *
19
+ * @example ```ts
20
+ *
21
+ * // return the build version, for example "1.0.1"
22
+ * JMap.Application.getVersion()
23
+ * ```
24
+ */
25
+ function getVersion(): string
26
+
27
+ /**
28
+ * **JMap.Application.getApiVersion**
29
+ *
30
+ * Returns the application API (Typescript interfaces) version.
31
+ *
32
+ * For the same API version, multiple implementation versions can exist.
33
+ *
34
+ * @example ```ts
35
+ *
36
+ * // return the build version, for example "1.0.1"
37
+ * JMap.Application.getApiVersion()
38
+ * ```
39
+ */
40
+ function getApiVersion(): string
41
+
42
+ /**
43
+ * **JMap.Application.openDocumentation**
44
+ *
45
+ * Opens JMap Cloud NG's online JS API documentation, in a new tab.
46
+ *
47
+ * @example ```ts
48
+ *
49
+ * // open JMap Cloud NG's online documentation, in a new tab
50
+ * JMap.Application.openDocumentation()
51
+ * ```
52
+ */
53
+ function openDocumentation(): void
54
+
55
+ /**
56
+ * **JMap.Application.openUserManual**
57
+ *
58
+ * Opens JMap Cloud NG's online user manual, in a new tab.
59
+ *
60
+ * @example ```ts
61
+ *
62
+ * // Open JMap Cloud NG's online user manual, in a new tab
63
+ * JMap.Application.openUserManual()
64
+ * ```
65
+ */
66
+ function openUserManual(): void
67
+
68
+ /**
69
+ * **JMap.Application.Annotation**
70
+ *
71
+ * You can manage everything related to annotations here.
72
+ */
73
+ namespace Annotation {
74
+ /**
75
+ * **JMap.Application.Annotation.getDrawMode**
76
+ *
77
+ * Returns the current draw mode.
78
+ *
79
+ * @example ```ts
80
+ *
81
+ * // return the current draw mode
82
+ * JMap.Application.Annotation.getDrawMode()
83
+ * ```
84
+ */
85
+ function getDrawMode(): JAPP_DRAW_MODES
86
+
87
+ /**
88
+ * **JMap.Application.Annotation.setDrawMode**
89
+ *
90
+ * Sets the annotation draw mode.
91
+ *
92
+ * @param drawMode the new draw mode
93
+ * @example ```ts
94
+ *
95
+ * // Set the annotation draw mode to "draw"
96
+ * JMap.Application.Annotation.setDrawMode("draw")
97
+ * ```
98
+ */
99
+ function setDrawMode(drawMode: JAPP_DRAW_MODES): void
100
+
101
+ /**
102
+ * **JMap.Application.Annotation.getDrawType**
103
+ *
104
+ * Returns the current draw type.
105
+ *
106
+ * @example ```ts
107
+ *
108
+ * // return the current draw type
109
+ * JMap.Application.Annotation.getDrawType()
110
+ * ```
111
+ */
112
+ function getDrawType(): JAPP_DRAW_TYPES
113
+
114
+ /**
115
+ * **JMap.Application.Annotation.setDrawMode**
116
+ *
117
+ * Sets the annotation draw mode.
118
+ *
119
+ * @param drawType the new draw type
120
+ * @example ```ts
121
+ *
122
+ * // Set the annotation draw mode to "draw"
123
+ * JMap.Application.Annotation.setDrawMode("draw")
124
+ * ```
125
+ */
126
+ function setDrawType(drawType: JAPP_DRAW_TYPES): void
127
+
128
+ /**
129
+ * **JMap.Application.Annotation.existsById**
130
+ *
131
+ * Returns true if annotation exists for the given id, else false
132
+ *
133
+ * @throws if the annotationId param is not a valid string
134
+ * @param annotationId the given annotation id
135
+ * @example ```ts
136
+ *
137
+ * // return true if annotation exists, else false
138
+ * JMap.Application.Annotation.existsById("d68385b01be3c241c7b6298b2788839d")
139
+ * ```
140
+ */
141
+ function existsById(annotationId: string): boolean
142
+
143
+ /**
144
+ * **JMap.Application.Annotation.getById**
145
+ *
146
+ * Returns the annotation for the given id.
147
+ *
148
+ * @throws if the annotationId param is not a valid string, or annotation is not found
149
+ * @param annotationId the given annotation id
150
+ * @example ```ts
151
+ *
152
+ * // return the annotation for the given id
153
+ * JMap.Application.Annotation.getById("d68385b01be3c241c7b6298b2788839d")
154
+ * ```
155
+ */
156
+ function getById(annotationId: string): JAppAnnotation
157
+
158
+ /**
159
+ * **JMap.Application.Annotation.getAll**
160
+ *
161
+ * Returns all annotations.
162
+ *
163
+ * @example ```ts
164
+ *
165
+ * // return all annotations
166
+ * JMap.Application.Annotation.getAll()
167
+ * ```
168
+ */
169
+ function getAll(): JAppAnnotation[]
170
+
171
+ /**
172
+ * **JMap.Application.Annotation.getSelectedIds**
173
+ *
174
+ * Returns the ids of the selected annotations.
175
+ *
176
+ * Empty array if no annotation is selected
177
+ *
178
+ * @example ```ts
179
+ *
180
+ * // return ids of selected annotations
181
+ * JMap.Application.Annotation.getSelectedIds()
182
+ * ```
183
+ */
184
+ function getSelectedIds(): string[]
185
+
186
+ /**
187
+ * **JMap.Application.Annotation.deleteAll**
188
+ *
189
+ * Deletes all annotations.
190
+ *
191
+ * Does nothing if no annotation exists.
192
+ *
193
+ * @example ```ts
194
+ *
195
+ * // Delete all annotations
196
+ * JMap.Application.Annotation.deleteAll()
197
+ * ```
198
+ */
199
+ function deleteAll(): void
200
+
201
+ /**
202
+ * **JMap.Application.Annotation.deleteByType**
203
+ *
204
+ * Deletes the annotations for the given type.
205
+ *
206
+ * Does nothing if no annotation exist for the type.
207
+ *
208
+ * @param annotationType the annotation type : "point", "polygon", "line_string", "rectangle", "circle", or "text"
209
+ * @throws if the annotation type is not correct
210
+ * @example ```ts
211
+ *
212
+ * // Delete all text annotations if exist
213
+ * JMap.Application.Annotation.deleteByType("text")
214
+ * ```
215
+ */
216
+ function deleteByType(annotationType: JAPP_DRAW_TYPES): void
217
+
218
+ /**
219
+ * **JMap.Application.Annotation.deleteByIds**
220
+ *
221
+ * Deletes the annotations for the given ids.
222
+ *
223
+ * @param annotationIds an array of annotation id
224
+ * @throws if an annotation array is empty or an annotation is not found for the given ids.
225
+ * @example ```ts
226
+ *
227
+ * // Delete two annotations
228
+ * JMap.Application.Annotation.deleteByIds([
229
+ * "d68385b01be3c241c7b6298b2788839d",
230
+ * "98ef8ad4476f0e6fa26be416d58d0734"
231
+ * ])
232
+ * ```
233
+ */
234
+ function deleteByIds(annotationIds: string[]): void
235
+
236
+ /**
237
+ * **JMap.Application.Annotation.deleteSelected**
238
+ *
239
+ * Deletes the selected annotations.
240
+ *
241
+ * Does nothing if no selection.
242
+ *
243
+ * @example ```ts
244
+ *
245
+ * // Delete selected annotations
246
+ * JMap.Application.Annotation.deleteSelected()
247
+ * ```
248
+ */
249
+ function deleteSelected(): void
250
+
251
+ /**
252
+ * **JMap.Application.Annotation.getStyle**
253
+ *
254
+ * Returns the current style in use for annotation drawing.
255
+ *
256
+ * @example ```ts
257
+ *
258
+ * // return the current style in use for annotation drawing
259
+ * JMap.Application.Annotation.getStyle()
260
+ * ```
261
+ */
262
+ function getStyle(): JAppDrawStyle
263
+
264
+ /**
265
+ * **JMap.Application.Annotation.updateStyle**
266
+ *
267
+ * Updates annotation style, for the next annotations that will be drawn.
268
+ *
269
+ * Merges the new options with current one.
270
+ *
271
+ * @example ```ts
272
+ *
273
+ * // Set the line width as 3px
274
+ * JMap.Application.Annotation.updateStyle({
275
+ * lineWidth: 3
276
+ * })
277
+ * ```
278
+ */
279
+ function updateStyle(style: JAppDrawStyle): void
280
+
281
+ /**
282
+ * **JMap.Application.Annotation.setStyleByAnnotationIds**
283
+ *
284
+ * For given ids, updates annotation style.
285
+ *
286
+ * @example ```ts
287
+ *
288
+ * const annotationIds = [
289
+ * "d68385b01be3c241c7b6298b2788839d",
290
+ * "98ef8ad4476f0e6fa26be416d58d0734"
291
+ * ]
292
+ *
293
+ * const customStyle = {
294
+ * lineWidth: 3
295
+ * }
296
+ *
297
+ * // Set custom style for 2 annotations
298
+ * JMap.Application.Annotation.setStyleByAnnotationIds(annotationIds, customStyle)
299
+ * ```
300
+ */
301
+ function setStyleByAnnotationIds(annotationIds: string[], style: JAppDrawStyle): void
302
+
303
+ /**
304
+ * **JMap.Application.Annotation.setPresetColors**
305
+ *
306
+ * Set the preset colors of color pickers using the given colors.
307
+ * @param presetColors A array of preset hex colors
308
+ * @throws if presetColors not an array, does not contain string or is too big
309
+ * @example ```ts
310
+ *
311
+ * // Set the preset colors with 2 color
312
+ * const presetColors = [
313
+ * "#29D1EA",
314
+ * "#D2FDDF"
315
+ * ]
316
+ *
317
+ * JMap.Application.Annotation.setPresetColors(presetColors)
318
+ * ```
319
+ */
320
+ function setPresetColors(presetColors: string[]): void
321
+
322
+ /**
323
+ * **JMap.Application.Annotation.addPresetColor**
324
+ *
325
+ * Add the given color to the preset colors of color pickers if not already present.
326
+ *
327
+ * @param presetColor A hex color
328
+ * @throws if presetColor not an string or is empty
329
+ * @example ```ts
330
+ *
331
+ * // Add the color #D2FDDF to the preset colors
332
+ * const presetColor = "#D2FDDF"
333
+ *
334
+ * JMap.Application.Annotation.addPresetColor(presetColor)
335
+ * ```
336
+ */
337
+ function addPresetColor(presetColor: string): void
338
+
339
+ /**
340
+ * **JMap.Application.Annotation.deletePresetColor**
341
+ *
342
+ * Delete the given color to the preset colors of color pickers if present.
343
+ *
344
+ * @param presetColor A hex color
345
+ * @throws if presetColor not an string or is empty
346
+ * @example ```ts
347
+ *
348
+ * // Delete the color #D2FDDF from the preset colors
349
+ * const presetColor = "#D2FDDF"
350
+ *
351
+ * JMap.Application.Annotation.deletePresetColor(presetColor)
352
+ * ```
353
+ */
354
+ function deletePresetColor(presetColor: string): void
355
+
356
+ /**
357
+ * **JMap.Application.Annotation.getPresetColors**
358
+ *
359
+ * Return the preset colors used by the application's color pickers.
360
+ *
361
+ * @example ```ts
362
+ *
363
+ * // Get the current preset colors
364
+ * JMap.Application.Annotation.getPresetColors()
365
+ * ```
366
+ */
367
+ function getPresetColors(): string[]
368
+ }
369
+ /**
370
+ * **JMap.Application.Panel**
371
+ *
372
+ * You can manage UI panels (on the left in the screen) here.
373
+ *
374
+ * There is one diplayed and active panel at a time.
375
+ */
376
+ namespace Panel {
377
+ /**
378
+ * **JMap.Application.Panel.getActive**
379
+ *
380
+ * Returns the active panel.
381
+ *
382
+ * @example ```ts
383
+ *
384
+ * // return the currently active panel
385
+ * JMap.Application.Panel.getActive()
386
+ * ```
387
+ */
388
+ function getActive(): JAppPanel
389
+
390
+ /**
391
+ * **JMap.Application.Panel.getAll**
392
+ *
393
+ * Returns all application panels available.
394
+ *
395
+ * @example ```ts
396
+ *
397
+ * // return all available application panels
398
+ * JMap.Application.Panel.getAll()
399
+ * ```
400
+ */
401
+ function getAll(): JAppPanel[]
402
+
403
+ /**
404
+ * **JMap.Application.Panel.existById**
405
+ *
406
+ * Returns true if the panel exists for a given panel id.
407
+ *
408
+ * @param panelId The panel id to test
409
+ * @example ```ts
410
+ *
411
+ * // return true if panel id="layer" exists
412
+ * JMap.Application.Panel.existById("custom-panel")
413
+ * ```
414
+ */
415
+ function existById(panelId: string): boolean
416
+
417
+ /**
418
+ * **JMap.Application.Panel.activateById**
419
+ *
420
+ * Changes the JMap Cloud NG panel.
421
+ *
422
+ * If no panelId is provided, will activate the "layer" panel by default, if the
423
+ * "layer" panel is disabled will activate the first available panel.
424
+ *
425
+ * @throws if panel is not found
426
+ * @param panelId The new application panel to activate
427
+ * @param params optionnal parameters
428
+ * @example ```ts
429
+ *
430
+ * // will activate and display the panel id="layer"
431
+ * JMap.Application.Panel.activateById("layer")
432
+ * ```
433
+ */
434
+ function activateById(panelId?: string, params?: JAppPanelActivationParams): void
435
+
436
+ /**
437
+ * **JMap.Application.Panel.deactivateCurrent**
438
+ *
439
+ * Deactivates the current panel, except if the current panel is the layer panel, or if there is only one panel available.
440
+ *
441
+ * @param params optionnal parameters
442
+ * @example ```ts
443
+ *
444
+ * // will activate the current panel
445
+ * JMap.Application.Panel.deactivateCurrent()
446
+ * ```
447
+ */
448
+ function deactivateCurrent(params?: JAppPanelDeactivationParams): void
449
+
450
+ /**
451
+ * **JMap.Application.Panel.add**
452
+ *
453
+ * Adds a custom panel for a given panel definition to JMap Cloud NG.
454
+ *
455
+ * @throws if panel format is not correct
456
+ * @param panel an object that is the definition of the new panel
457
+ * @example ```ts
458
+ *
459
+ * const customPanelId = "custom-panel"
460
+ * // will add the new panel, here an empty panel just for the example
461
+ * JMap.Application.Panel.add({
462
+ * id: customPanelId,
463
+ * // Can be an image encoded as a base64 url or an svg tag as a string.
464
+ * // For an svg string a viewbox need to be specified for the icon to appear and if no fill attribute is specified, the icon will follow the app theme.
465
+ * icon: "http://url-to-my-image/custom-icon.png",
466
+ * iconTooltip: "My custom panel tooltip display when mouse is hover the icon",
467
+ * title: "Custom panel"
468
+ * })
469
+ * // The panel has been created but not displayed, if you want to display it:
470
+ * JMap.Applcation.activate(customPanelId)
471
+ * ```
472
+ */
473
+ function add(panel: JAppPanel): void
474
+
475
+ /**
476
+ * **JMap.Application.Panel.removeById**
477
+ *
478
+ * Removes a panel for a given panel id from JMap Cloud NG.
479
+ *
480
+ * If the panel was active, will activate the first panel the application finds.
481
+ *
482
+ * @throws if panel is not found or if this is the last panel
483
+ * @param panelId The application panel id to remove
484
+ * @example ```ts
485
+ *
486
+ * // will remove the "custom-panel" panel
487
+ * JMap.Application.Panel.removeById("custom-panel")
488
+ * ```
489
+ */
490
+ function removeById(panelId: string): void
491
+ }
492
+
493
+ /**
494
+ * **JMap.Application.Feature**
495
+ *
496
+ * You can manage everything related to app features here.
497
+ */
498
+ namespace Feature {
499
+ /**
500
+ * **JMap.Application.Feature.openEditMenuById**
501
+ *
502
+ * Opens the feature edit menu for a single feature.
503
+ *
504
+ * @param layerId the JMap layer id
505
+ * @param featureId the feature id
506
+ * @example ```ts
507
+ *
508
+ * // open edit menu (single feature) for layer id=5, and feature id=234
509
+ * JMap.Application.Feature.openEditMenuById(5, 234)
510
+ * ```
511
+ */
512
+ function openEditMenuById(layerId: JId, featureId: JId): Promise<GeoJSON.Feature>
513
+
514
+ /**
515
+ * **JMap.Application.Feature.openEditMenuByIds**
516
+ *
517
+ * Opens the feature edit menu for multiple features.
518
+ *
519
+ * @param layerId the JMap layer id
520
+ * @param featureIds an array of features ids
521
+ * @example ```ts
522
+ *
523
+ * // open edit menu (multiple edition) for layer id=5, and features id=234, 452 and 176
524
+ * JMap.Application.Feature.openEditMenuByIds(5, [234, 452, 176])
525
+ * ```
526
+ */
527
+ function openEditMenuByIds(layerId: JId, featureIds: JId[]): Promise<GeoJSON.Feature[]>
528
+
529
+ /**
530
+ * **JMap.Application.Feature.closeEditMenu**
531
+ *
532
+ * Closes the feature edit menu if visible.
533
+ *
534
+ * If not visible, does nothing.
535
+ *
536
+ * @param layerId the JMap layer id
537
+ * @param featureIds an array of features ids
538
+ * @example ```ts
539
+ *
540
+ * // close the edit menu if visible
541
+ * JMap.Application.Feature.closeEditMenu()
542
+ * ```
543
+ */
544
+ function closeEditMenu(): void
545
+
546
+ /**
547
+ * **JMap.Application.Feature.deleteByIds**
548
+ *
549
+ * Deletes features (on the server), refreshes the layer on the map and displays a success or error message when done.
550
+ *
551
+ * @param layerId the JMap layer id
552
+ * @param featureIds an array of features ids
553
+ * @example ```ts
554
+ *
555
+ * // delete 2 features on layer id=4
556
+ * JMap.Application.Feature.deleteByIds(4, [23, 76]).then(result => console.log("Delete result", result))
557
+ * ```
558
+ */
559
+ function deleteByIds(layerId: JId, featureIds: JId[]): Promise<JFeatureDeleteByIdsResult>
560
+ }
561
+
562
+ /**
563
+ * **JMap.Application.Geometry**
564
+ *
565
+ * You can manage everything related to app geometry creation or update here.
566
+ */
567
+ namespace Geometry {
568
+ /**
569
+ * **JMap.Application.Geometry.openPanelForCreation**
570
+ *
571
+ * Opens the geometry panel in order to create a new feature.
572
+ *
573
+ * @throws if no layer is editable
574
+ * @example ```ts
575
+ *
576
+ * // will open the geometry panel
577
+ * JMap.Application.Geometry.openPanelForCreation()
578
+ * ```
579
+ */
580
+ function openPanelForCreation(): void
581
+
582
+ /**
583
+ * **JMap.Application.Geometry.openPanelForUpdate**
584
+ *
585
+ * Opens the geometry panel in order to update a feature geometry.
586
+ *
587
+ * @throws if the given layer or feature are not editable
588
+ * @param JAppGeometryUpdateParams function parameters
589
+ * @example ```ts
590
+ *
591
+ * // will open the geometry panel in order to update the feature geometry
592
+ * JMap.Application.Geometry.openPanelForUpdate()
593
+ * ```
594
+ */
595
+ function openPanelForUpdate(params: JAppGeometryUpdateParams): void
596
+
597
+ /**
598
+ * **JMap.Application.Geometry.selectLayer**
599
+ *
600
+ * Selects the layer that will be used to create the geometry and the feature.
601
+ *
602
+ * @throws if layer not found
603
+ * @param layerId The JMap layer id
604
+ * @example ```ts
605
+ *
606
+ * // will select the layer id=3
607
+ * JMap.Application.Geometry.selectLayer(3)
608
+ * ```
609
+ */
610
+ function selectLayer(layerId: JId): void
611
+
612
+ /**
613
+ * **JMap.Application.Geometry.startCreationDrawing**
614
+ *
615
+ * Enables drawing of the geometry on the map.
616
+ *
617
+ * @throws if no layer is selected
618
+ * @example ```ts
619
+ *
620
+ * // enable drawing of the geometry on the map
621
+ * JMap.Application.Geometry.startCreationDrawing()
622
+ * ```
623
+ */
624
+ function startCreationDrawing(): void
625
+
626
+ /**
627
+ * **JMap.Application.Geometry.stopCreationDrawing**
628
+ *
629
+ * Stops the geometry creation, when drawing on the map, and displays the layer selection panel.
630
+ *
631
+ * @example ```ts
632
+ *
633
+ * // stop drawing the geometry on the map
634
+ * JMap.Application.Geometry.stopCreationDrawing()
635
+ * ```
636
+ */
637
+ function stopCreationDrawing(): void
638
+
639
+ /**
640
+ * **JMap.Application.Geometry.finishCreate**
641
+ *
642
+ * Finishes geometry creation.
643
+ *
644
+ * @throws if panel is not in creation mode, or if geometry has not yet been created.
645
+ * @example ```ts
646
+ *
647
+ * // finishe creating or updating the geometry
648
+ * JMap.Application.Geometry.finishCreate()
649
+ * ```
650
+ */
651
+ function finishCreate(): void
652
+
653
+ /**
654
+ * **JMap.Application.Geometry.finishUpdate**
655
+ *
656
+ * Finishes geometry update.
657
+ *
658
+ * @throws if panel is not in update mode
659
+ * @example ```ts
660
+ *
661
+ * // finishe updating the geometry
662
+ * JMap.Application.Geometry.finishUpdate()
663
+ * ```
664
+ */
665
+ function finishUpdate(): Promise<void>
666
+
667
+ /**
668
+ * **JMap.Application.Geometry.closePanel**
669
+ *
670
+ * Closes the geometry creation or update panel without confirmation message.
671
+ *
672
+ * @example ```ts
673
+ *
674
+ * // close the geometry panel
675
+ * JMap.Application.Geometry.closePanel()
676
+ * ```
677
+ */
678
+ function closePanel(): void
679
+ }
680
+
681
+ /**
682
+ * **JMap.Application.Selection**
683
+ *
684
+ * You can manage the application measure tools here.
685
+ */
686
+ namespace Measure {
687
+ /**
688
+ * **JMap.Application.Measure.getAll**
689
+ *
690
+ * Returns all measures.
691
+ *
692
+ * @example ```ts
693
+ *
694
+ * // return currently drawn measures
695
+ * JMap.Application.Measure.getAll()
696
+ * ```
697
+ */
698
+ function getAll(): JAppMeasure[]
699
+
700
+ /**
701
+ * **JMap.Application.Measure.existsById**
702
+ *
703
+ * Returns true if a measure exists for the given id, else false.
704
+ *
705
+ * @throws Error if measureId is not a string or an empty string
706
+ * @example ```ts
707
+ *
708
+ * // return true if the measure exists, else false
709
+ * JMap.Application.Measure.existsById("ac57b1bd83ca6d8e0013e4cf9f06847e")
710
+ *
711
+ * // throws an error
712
+ * JMap.Application.Measure.existsById("")
713
+ *
714
+ * // throws an error
715
+ * JMap.Application.Measure.existsById()
716
+ * ```
717
+ */
718
+ function existsById(measureId: string): boolean
719
+
720
+ /**
721
+ * **JMap.Application.Measure.getById**
722
+ *
723
+ * Returns the measure for the given id.
724
+ *
725
+ * @throws Error if measureId is not a string or an empty string, or if measure is not found
726
+ * @example ```ts
727
+ *
728
+ * // return the measure for the given id
729
+ * JMap.Application.Measure.getById("ac57b1bd83ca6d8e0013e4cf9f06847e")
730
+ *
731
+ * // throws an error
732
+ * JMap.Application.Measure.getById("")
733
+ *
734
+ * // throws an error
735
+ * JMap.Application.Measure.getById()
736
+ * ```
737
+ */
738
+ function getById(measureId: string): JAppMeasure
739
+
740
+ /**
741
+ * **JMap.Application.Measure.getAllLineMeasures**
742
+ *
743
+ * Returns all "line" measures. Result contains no polygon or circle measures.
744
+ *
745
+ * @example ```ts
746
+ *
747
+ * // return all line measures
748
+ * JMap.Application.Measure.getAllLineMeasures()
749
+ * ```
750
+ */
751
+ function getAllLineMeasures(): JAppMeasure[]
752
+
753
+ /**
754
+ * **JMap.Application.Measure.getAllPolygonMeasures**
755
+ *
756
+ * Returns all "polygon" measures. Result contains no line or circle measures.
757
+ *
758
+ * @example ```ts
759
+ *
760
+ * // return all polygon measures
761
+ * JMap.Application.Measure.getAllPolygonMeasures()
762
+ * ```
763
+ */
764
+ function getAllPolygonMeasures(): JAppMeasure[]
765
+
766
+ /**
767
+ * **JMap.Application.Measure.getAllCircleMeasures**
768
+ *
769
+ * Returns all "circle" measures. Result contains no line or polygon measures.
770
+ *
771
+ * @example ```ts
772
+ *
773
+ * // return all circle measures
774
+ * JMap.Application.Measure.getAllCircleMeasures()
775
+ * ```
776
+ */
777
+ function getAllCircleMeasures(): JAppMeasure[]
778
+
779
+ /**
780
+ * **JMap.Application.Measure.setAllMeasures**
781
+ *
782
+ * Resets measures with provided measures.
783
+ *
784
+ * @example ```ts
785
+ *
786
+ * // remove all measures
787
+ * JMap.Application.Measure.setAllMeasures([])
788
+ * ```
789
+ */
790
+ function setAllMeasures(measures: JAppMeasure[]): void
791
+
792
+ /**
793
+ * **JMap.Application.Measure.activateMeasureType**
794
+ *
795
+ * Activates a measure type for the drawing measurement tool.
796
+ * @param measureType The new measure type to apply
797
+ * @example ```ts
798
+ *
799
+ * // change the measure type to length
800
+ * JMap.Application.Measure.activateMeasureType("length")
801
+ * ```
802
+ */
803
+ function activateMeasureType(measureType: JAPP_MEASURE_TYPES): void
804
+
805
+ /**
806
+ * **JMap.Application.Measure.getActiveMeasureType**
807
+ *
808
+ * Returns the current active measure type.
809
+ *
810
+ * @example ```ts
811
+ *
812
+ * // return active mesure type
813
+ * JMap.Application.Measure.getActiveMeasureType([])
814
+ * ```
815
+ */
816
+ function getActiveMeasureType(): JAPP_MEASURE_TYPES
817
+
818
+ /**
819
+ * **JMap.Application.Measure.getSelectedIds**
820
+ *
821
+ * Returns the current measure selection.
822
+ *
823
+ * @example ```ts
824
+ *
825
+ * // return current measure selection
826
+ * JMap.Application.Measure.getSelectedIds([])
827
+ * ```
828
+ */
829
+ function getSelectedIds(): string[]
830
+
831
+ /**
832
+ * **JMap.Application.Measure.setSelectionActive**
833
+ *
834
+ * Activates or deactivates the measurement selection mode.
835
+ *
836
+ * If active, measures can be selected by clicking on the map (then changed or removed).
837
+ *
838
+ * @param isSelectionActive true to activate selection mode, false to deactivate
839
+ * @example ```ts
840
+ *
841
+ * // activate selection of measures
842
+ * JMap.Application.Measure.setSelectionActive(true)
843
+ *
844
+ * // deactivate selection of measure
845
+ * JMap.Application.Measure.setSelectionActive(false)
846
+ * ```
847
+ */
848
+ function setSelectionActive(isSelectionActive: boolean): void
849
+
850
+ /**
851
+ * **JMap.Application.Measure.deleteAll**
852
+ *
853
+ * Deletes all measures.
854
+ *
855
+ * Returns deleted measure count.
856
+ *
857
+ * @example ```ts
858
+ *
859
+ * // delete all measures
860
+ * const deletedMeasuresCount = JMap.Application.Measure.deleteAll()
861
+ * ```
862
+ */
863
+ function deleteAll(): number
864
+
865
+ /**
866
+ * **JMap.Application.Measure.deleteSelected**
867
+ *
868
+ * Deletes all selected measures.
869
+ *
870
+ * Returns deleted measure count.
871
+ *
872
+ * @example ```ts
873
+ *
874
+ * // delete all selected measures
875
+ * const deletedMeasuresCount = JMap.Application.Measure.deleteSelected()
876
+ * ```
877
+ */
878
+ function deleteSelected(): number
879
+
880
+ /**
881
+ * **JMap.Application.Measure.deleteMeasuresById**
882
+ *
883
+ * Deletes a measure for a given id.
884
+ *
885
+ * @throws if measure is not found
886
+ * @param measureIds list of measure ids
887
+ * @example ```ts
888
+ *
889
+ * // delete measure having id="bc4fc07f2e84eb50f5962d3d41c836cb"
890
+ * const deletedMeasuresCount = JMap.Application.Measure.deleteMeasuresById("bc4fc07f2e84eb50f5962d3d41c836cb")
891
+ * ```
892
+ */
893
+ function deleteMeasuresById(measureIds: string[]): number
894
+
895
+ /**
896
+ * **JMap.Application.Measure.deleteAllLines**
897
+ *
898
+ * Deletes all measures having type === "line_string".
899
+ *
900
+ * Returns deleted measure count.
901
+ *
902
+ * @example ```ts
903
+ *
904
+ * // delete all line measures (if exist)
905
+ * const deletedMeasuresCount = JMap.Application.Measure.deleteAllLines()
906
+ * ```
907
+ */
908
+ function deleteAllLines(): number
909
+
910
+ /**
911
+ * **JMap.Application.Measure.deleteAllPolygons**
912
+ *
913
+ * Deletes all measures having type === "polygon".
914
+ *
915
+ * Returns deleted measure count.
916
+ *
917
+ * @example ```ts
918
+ *
919
+ * // delete all polygon measures (if exist)
920
+ * const deletedMeasuresCount = JMap.Application.Measure.deleteAllPolygons()
921
+ * ```
922
+ */
923
+ function deleteAllPolygons(): number
924
+
925
+ /**
926
+ * **JMap.Application.Measure.deleteAllCircles**
927
+ *
928
+ * Deletes all measures having type === "circle".
929
+ *
930
+ * Returns deleted measure count.
931
+ *
932
+ * @example ```ts
933
+ *
934
+ * // delete all circle measures (if exist)
935
+ * const deletedMeasuresCount = JMap.Application.Measure.deleteAllCircles()
936
+ * ```
937
+ */
938
+ function deleteAllCircles(): number
939
+
940
+ /**
941
+ * **JMap.Application.Measure.getMeasurementSystem**
942
+ *
943
+ * Returns the current measurement system used by the Measurements Panel
944
+ *
945
+ * @example ```ts
946
+ *
947
+ * // get the current measurement system
948
+ * console.log(JMap.Application.Measure.getMeasurementSystem())
949
+ * // "geodetic"
950
+ * ```
951
+ */
952
+ function getMeasurementSystem(): JAPP_MEASUREMENT_SYSTEMS
953
+
954
+ /**
955
+ * **JMap.Application.Measure.setMeasurementSystem**
956
+ *
957
+ * Sets the measurement system used by the Measurements Panel. **This setting is only taken into account when you draw measurements using the Measurements Panel. It does not affect jmapcloud-ng-core methods like [[JMap.Geometry.getDistance]], which always return geodetic values.**
958
+ *
959
+ * **This method should not be called in regular situations.**
960
+ *
961
+ * Default measurement system is "geodetic", meaning that all measurements are representative of the length or area of features on the surface of the Earth. This is what is normally desired.
962
+ *
963
+ * In some rare situations, someone may want to get the length or area of measurements in the map's projection plane (EPSG:3857 - WGS 84 / Pseudo-Mercator). In this case, they can set the measurement system to "planar".
964
+ *
965
+ * Be warned that lengths or areas in planar context are not representative of the real dimensions on the earth's surface. The only supported planar projection for measurements is EPSG:3857.
966
+ *
967
+ * @param measurementSystem "geodetic" (default) or "planar"
968
+ * @example ```ts
969
+ *
970
+ * // set the current measurement system to "geodetic"
971
+ * JMap.Application.Measure.setMeasurementSystem("geodetic")
972
+ * ```
973
+ */
974
+ function setMeasurementSystem(measurementSystem: JAPP_MEASUREMENT_SYSTEMS): void
975
+ }
976
+
977
+ /**
978
+ * **JMap.Application.Selection**
979
+ *
980
+ * You can manage the application selection tools here.
981
+ */
982
+ namespace Selection {
983
+ /**
984
+ * **JMap.Application.Selection.getDisplayedLayerId**
985
+ *
986
+ * The selection of only one layer can be diplayed at a time.
987
+ *
988
+ * This function returns the id of the layer for which the selection is displayed.
989
+ *
990
+ * @example ```ts
991
+ *
992
+ * // return the layer id of the displayed selection
993
+ * JMap.Application.Selection.getDisplayedLayerId()
994
+ * ```
995
+ */
996
+ function getDisplayedLayerId(): JId
997
+
998
+ /**
999
+ * **JMap.Application.Selection.setDisplayedLayerId**
1000
+ *
1001
+ * Displays the selection of the layer.
1002
+ *
1003
+ * If layer selection has no selection, hides the layer selection list.
1004
+ *
1005
+ * @throws if layer not found for the given layer id
1006
+ * @example ```ts
1007
+ *
1008
+ * // display the layer id=2 selection
1009
+ * JMap.Application.Selection.setDisplayedLayerId(2)
1010
+ * ```
1011
+ */
1012
+ function setDisplayedLayerId(layerId: JId): void
1013
+
1014
+ /**
1015
+ * **JMap.Application.Selection.activateSelectionType**
1016
+ *
1017
+ * Changes the current type of selection
1018
+ * @param selectionType The new selection type to apply
1019
+ * @example ```ts
1020
+ *
1021
+ * // change the selection type to rectangle
1022
+ * JMap.Application.Selection.activateSelectionType("rectangle")
1023
+ * ```
1024
+ */
1025
+ function activateSelectionType(selectionType: JAPP_SELECTION_TYPES): void
1026
+
1027
+ /**
1028
+ * **JMap.Application.Selection.getActiveSelectionType**
1029
+ *
1030
+ * Returns the current active type of selection
1031
+ *
1032
+ * @example ```ts
1033
+ *
1034
+ * // return the current active selection type
1035
+ * JMap.Application.Selection.getActiveSelectionType()
1036
+ * ```
1037
+ */
1038
+ function getActiveSelectionType(): JAPP_SELECTION_TYPES
1039
+
1040
+ /**
1041
+ * **JMap.Application.Selection.getTableVisibility**
1042
+ *
1043
+ * Returns true if the selection data table is diaplayed.
1044
+ *
1045
+ * @example ```ts
1046
+ *
1047
+ * // return true if the selection data table is visible
1048
+ * JMap.Application.Selection.getTableVisibility()
1049
+ * ```
1050
+ */
1051
+ function getTableVisibility(): boolean
1052
+
1053
+ /**
1054
+ * **JMap.Application.Selection.getTableVisibility**
1055
+ *
1056
+ * Hides or shows the selection data table.
1057
+ *
1058
+ * @example ```ts
1059
+ *
1060
+ * // make selection data table visible
1061
+ * JMap.Application.Selection.setTableVisibility(true)
1062
+ *
1063
+ * // make selection data table not visible
1064
+ * JMap.Application.Selection.setTableVisibility(false)
1065
+ * ```
1066
+ */
1067
+ function setTableVisibility(tableVisibility: boolean): void
1068
+
1069
+ /**
1070
+ * **JMap.Application.Selection.isTableDisplayedInTab**
1071
+ *
1072
+ * Returns true if the selection table is displayed in an external browser tab.
1073
+ *
1074
+ * @example ```ts
1075
+ *
1076
+ * // returns true if the selection table is displayed in an external browser tab.
1077
+ * JMap.Application.Selection.isTableDisplayedInTab()
1078
+ * ```
1079
+ */
1080
+ function isTableDisplayedInTab(): boolean
1081
+
1082
+ /**
1083
+ * **JMap.Application.Selection.openTableInTab**
1084
+ *
1085
+ * Displays the selection table in another tab.
1086
+ *
1087
+ * If the table is not visible, make it visible.
1088
+ *
1089
+ * @example ```ts
1090
+ *
1091
+ * // displays the selection table in another tab.
1092
+ * JMap.Application.Selection.openTableInTab()
1093
+ * ```
1094
+ */
1095
+ function openTableInTab(): void
1096
+
1097
+ /**
1098
+ * **JMap.Application.Selection.closeTableTab**
1099
+ *
1100
+ * Closes the selection table tab.
1101
+ *
1102
+ * If the table is not visible, or not opened in another tab, do nothing.
1103
+ *
1104
+ * If the table is opened in another tab, close the tab and display the table over the map.
1105
+ *
1106
+ * @example ```ts
1107
+ *
1108
+ * // closes the selection table tab.
1109
+ * JMap.Application.Selection.closeTableTab()
1110
+ * ```
1111
+ */
1112
+ function closeTableTab(): void
1113
+
1114
+ /**
1115
+ * **JMap.Application.Selection.clearSelectionForLayer**
1116
+ *
1117
+ * Unselects all features for a given layer id.
1118
+ *
1119
+ * @param layerId the JMap layer id
1120
+ * @example ```ts
1121
+ *
1122
+ * // clear the layer id=2 selection
1123
+ * JMap.Application.Selection.clearSelectionForLayer(2)
1124
+ * ```
1125
+ */
1126
+ function clearSelectionForLayer(layerId: JId): void
1127
+
1128
+ /**
1129
+ * **JMap.Application.Selection.clearSelection**
1130
+ *
1131
+ * Clears the current selection
1132
+ *
1133
+ * @example ```ts
1134
+ * // Clear the current selection
1135
+ * JMap.Application.Selection.clearSelection()
1136
+ * ```
1137
+ */
1138
+ function clearSelection(): void
1139
+
1140
+ /**
1141
+ * **JMap.Application.Selection.selectFromFeature**
1142
+ *
1143
+ * Selects features on the map that intersect the given feature.
1144
+ *
1145
+ * @param feature the given feature
1146
+ * @param selectionType if not provided the method use
1147
+ * @example ```ts
1148
+ * // will select all features that intersect the provided line feature
1149
+ * JMap.Application.Selection.selectFromFeature(lineFeature)
1150
+ * ```
1151
+ */
1152
+ function selectFromFeature(feature: GeoJSON.Feature, selectionType: JAPP_SELECTION_TYPES): void
1153
+
1154
+ /**
1155
+ * **JMap.Application.Selection.exportAsExcelFile**
1156
+ *
1157
+ * Exports the current selection as an excel file.
1158
+ *
1159
+ * If no selection, export an empty file.
1160
+ *
1161
+ * @example ```ts
1162
+ * // download the current selection as an excel file
1163
+ * JMap.Application.Selection.exportAsExcelFile()
1164
+ * ```
1165
+ */
1166
+ function exportAsExcelFile(): void
1167
+
1168
+ /**
1169
+ * **JMap.Application.Selection.fitMapToDisplayLayerSelection**
1170
+ *
1171
+ * Pans and zooms the map to display the current selection.
1172
+ *
1173
+ * @param options optional options
1174
+ * @example ```ts
1175
+ * // fit the map to display selected features
1176
+ * JMap.Application.Selection.fitMapToDisplayLayerSelection()
1177
+ * ```
1178
+ */
1179
+ function fitMapToDisplayLayerSelection(options?: JPanAndZoomOptions): void
1180
+ }
1181
+
1182
+ /**
1183
+ * **JMap.Application.Project**
1184
+ *
1185
+ * You can manage all things related to JMap Cloud NG Core project and JMap Cloud NG here.
1186
+ */
1187
+ namespace Project {
1188
+ /**
1189
+ * **JMap.Application.Project.activateById**
1190
+ *
1191
+ * Activate the project for a given project id.
1192
+ *
1193
+ * If you use JMap Cloud NG, use this function instaed of JMap.Project.activateById.
1194
+ *
1195
+ * This function does the same as JMap.Project.activateById but also manages things for the application UI.
1196
+ *
1197
+ * @throws if project id invalid or project not found
1198
+ * @param projectId the JMap project id
1199
+ * @returns the project
1200
+ * @example ```ts
1201
+ *
1202
+ * // activate project id=33
1203
+ * JMap.Application.Project.activateById(33)
1204
+ * ```
1205
+ */
1206
+ function activateById(projectId: JId): JProject
1207
+
1208
+ /**
1209
+ * **JMap.Application.Project.setSelectionPanelVisibility**
1210
+ *
1211
+ * Displays or hides the project list selection panel.
1212
+ *
1213
+ * @example ```ts
1214
+ *
1215
+ * // display the project list selection panel
1216
+ * JMap.Application.Project.setSelectionPanelVisibility(true)
1217
+ * ```
1218
+ */
1219
+ function setSelectionPanelVisibility(isVisible: boolean): void
1220
+ }
1221
+
1222
+ /**
1223
+ * **JMap.Application.Layer**
1224
+ *
1225
+ * You can manage the layer panel here.
1226
+ */
1227
+ namespace Layer {
1228
+ /**
1229
+ * **JMap.Application.Layer.Tree**
1230
+ *
1231
+ * You can manage the layer panel tree view here.
1232
+ */
1233
+ namespace Tree {
1234
+ /**
1235
+ * **JMap.Application.Layer.Tree.Filter**
1236
+ *
1237
+ * You can manage the layer panel tree view filtering here.
1238
+ */
1239
+ namespace Filter {
1240
+ /**
1241
+ * **JMap.Application.Layer.Tree.Filter.setName**
1242
+ *
1243
+ * Sets the name filter. Name filter needs to have at least 2 characters to be applied.
1244
+ *
1245
+ * Panel layer will show only layers whose name matches the name filter. The name filter is case-insensitive and
1246
+ * diacritical characters insensitive.
1247
+ *
1248
+ * @param nameFilter the name filter to apply
1249
+ * @example ```ts
1250
+ *
1251
+ * // In the layer panel will display only layers whose name matches "pro" (case-insensitive)
1252
+ * JMap.Application.Layer.setName("pro")
1253
+ * ```
1254
+ */
1255
+ function setName(nameFilter: string): void
1256
+
1257
+ /**
1258
+ * **JMap.Application.Layer.Tree.Filter.isApplied**
1259
+ *
1260
+ * Tests if the layer tree filters are applied.
1261
+ *
1262
+ * Layer tree filters are applied (in action) only if the filtering is active ([[JMap.Application.Layer.Tree.Filter.isActive]] returns true)
1263
+ * and either one of those two conditions are met:
1264
+ *
1265
+ * a) the name filter contains at least 2 characters
1266
+ * b) one of the layer filters has been added to the filtering configuration
1267
+ *
1268
+ * @example ```ts
1269
+ *
1270
+ * // filter configuration is initially empty
1271
+ *
1272
+ * // activate the filters
1273
+ * JMap.Application.Layer.Tree.Filter.setActive(true)
1274
+ *
1275
+ * // set the name filter to "a"
1276
+ * JMap.Application.Layer.Tree.Filter.setName("a")
1277
+ *
1278
+ * // will return false
1279
+ * const isFilterApplied = JMap.Application.Layer.Tree.Filter.isApplied()
1280
+ * ```
1281
+ */
1282
+ function isApplied(): boolean
1283
+
1284
+ /**
1285
+ * **JMap.Application.Layer.Tree.Filter.isActive**
1286
+ *
1287
+ * Tests if the layer tree filters are active.
1288
+ *
1289
+ * Layer tree filters are active, but initially not applied, when the user activates the Filter user interface either by clicking on a button
1290
+ * or by calling a JMap Cloud NG API method to activate it.
1291
+ * See [[JMap.Application.Layer.Tree.Filter.isApplied]] for more details.
1292
+ *
1293
+ * @example ```ts
1294
+ *
1295
+ * // activate the filters
1296
+ * JMap.Application.Layer.Tree.Filter.setActive(false)
1297
+ *
1298
+ * // will return false
1299
+ * JMap.Application.Layer.Tree.Filter.isActive()
1300
+ * ```
1301
+ */
1302
+ function isActive(): boolean
1303
+
1304
+ /**
1305
+ * **JMap.Application.Layer.Tree.Filter.setActive**
1306
+ *
1307
+ * Tests if the layer tree filters are active.
1308
+ *
1309
+ * Layer tree filters are active, but initially not applied, when the user activates the Filter user interface either by clicking on a button
1310
+ * or by calling a JMap Cloud NG API method to activate it.
1311
+ * See [[JMap.Application.Layer.Tree.Filter.isApplied]] for more details
1312
+ *
1313
+ * @param active a boolean
1314
+ * @example ```ts
1315
+ *
1316
+ * // activate the filters
1317
+ * JMap.Application.Layer.Tree.Filter.setActive(false)
1318
+ *
1319
+ * // will return false
1320
+ * JMap.Application.Layer.Tree.Filter.isActive()
1321
+ * ```
1322
+ */
1323
+ function setActive(active: boolean): void
1324
+
1325
+ /**
1326
+ * **JMap.Application.Layer.Tree.Filter.applyToMap**
1327
+ *
1328
+ * Applies the current filter configuration on the map. All layers not matching the filter will be hidden, and only those
1329
+ * that match the filter will stay visible on the map. If no filter is defined (or appliable), no change is applied on the map.
1330
+ *
1331
+ * @example ```ts
1332
+ *
1333
+ * // Apply the current filter
1334
+ * JMap.Application.Layer.Tree.Filter.applyToMap()
1335
+ * ```
1336
+ */
1337
+ function applyToMap(): void
1338
+
1339
+ /**
1340
+ * **JMap.Application.Layer.Tree.Filter.existById**
1341
+ *
1342
+ * Tests if the specified filter exists.
1343
+ *
1344
+ * @param filterId the filter id
1345
+ * @example ```ts
1346
+ *
1347
+ * // create a filter
1348
+ * JMap.Application.Layer.Tree.Filter.add({
1349
+ * 1,
1350
+ * metadataItemId: 0,
1351
+ * type: "date",
1352
+ * operator: "between",
1353
+ * value: [new Date("2021-06-02T00:00:00"),new Date("2021-06-22:T00:00:00")]
1354
+ * })
1355
+ *
1356
+ * // will return true
1357
+ * JMap.Application.Layer.Tree.Filter.existById(1)
1358
+ * ```
1359
+ */
1360
+ function existById(filterId: number): boolean
1361
+
1362
+ /**
1363
+ * **JMap.Application.Layer.Tree.Filter.oneFilterExistForMetadataId**
1364
+ *
1365
+ * Tests if at least one filter associated with the specified metadata id exists.
1366
+ *
1367
+ * @param metadataId the metadata id
1368
+ * @example ```ts
1369
+ *
1370
+ * // filter collection is initially empty
1371
+ *
1372
+ * // create a filter
1373
+ * JMap.Application.Layer.Tree.Filter.add({
1374
+ * 1,
1375
+ * metadataItemId: 0,
1376
+ * type: "date",
1377
+ * operator: "between",
1378
+ * value: [new Date("2021-06-02T00:00:00"),new Date("2021-06-22:T00:00:00")]
1379
+ * })
1380
+ *
1381
+ * // will return false
1382
+ * JMap.Application.Layer.Tree.Filter.oneFilterExistForMetadataId(6)
1383
+ * ```
1384
+ */
1385
+ function oneFilterExistForMetadataId(metadataId: JId): boolean
1386
+
1387
+ /**
1388
+ * **JMap.Application.Layer.Tree.Filter.getAll**
1389
+ *
1390
+ * Returns an object containing the current name filter and an array of all current filters.
1391
+ *
1392
+ * @example ```ts
1393
+ *
1394
+ * // get filters configuration
1395
+ * console.log(JMap.Application.Layer.Tree.Filter.getAll())
1396
+ * // {
1397
+ * // "nameFilter":"Mont",
1398
+ * // "filters":[
1399
+ * // {"id":1,
1400
+ * // "metadataItemId":0,
1401
+ * // "operator":"between",
1402
+ * // "type":"date",
1403
+ * // "value":[
1404
+ * // "2021-06-01T10:25:00.000Z",
1405
+ * // "2021-06-22T10:25:00.000Z"
1406
+ * // ]
1407
+ * // }
1408
+ * // ]
1409
+ * // }
1410
+ * ```
1411
+ */
1412
+ function getAll(): JAppGetAllFiltersResult
1413
+
1414
+ /**
1415
+ * **JMap.Application.Layer.Tree.Filter.getById**
1416
+ *
1417
+ * Retrieves the specified filter by id.
1418
+ *
1419
+ * @param filterId the filter id
1420
+ * @example ```ts
1421
+ *
1422
+ * // get filter id=1
1423
+ * JMap.Application.Layer.Tree.Filter.getById(1)
1424
+ * // {"id":1,
1425
+ * // "metadataItemId":0,
1426
+ * // "operator":"between",
1427
+ * // "type":"date",
1428
+ * // "value":[
1429
+ * // "2021-06-01T10:25:00.000Z",
1430
+ * // "2021-06-22T10:25:00.000Z"
1431
+ * // ]
1432
+ * // }
1433
+ * ```
1434
+ */
1435
+ function getById(filterId: number): JAppAnyLayerFilter
1436
+
1437
+ /**
1438
+ * **JMap.Application.Layer.Tree.Filter.add**
1439
+ *
1440
+ * Adds a filter. The list of available metadata schema items can be retieved by calling [[JMap.Layer.getMetadataSchema]].
1441
+ *
1442
+ * @param filter a JAppAnyLayerFilter object
1443
+ * @example ```ts
1444
+ *
1445
+ * // add a filter to the config
1446
+ * JMap.Application.Layer.Tree.Filter.add({
1447
+ * 1,
1448
+ * metadataItemId: 0,
1449
+ * type: "date",
1450
+ * operator: "between",
1451
+ * value: [new Date("2021-06-02T00:00:00"),new Date("2021-06-22:T00:00:00")]
1452
+ * })
1453
+ * ```
1454
+ */
1455
+ function add(filter: JAppAnyLayerFilter): JAppAnyLayerFilter
1456
+
1457
+ /**
1458
+ * **JMap.Application.Layer.Tree.Filter.deleteById**
1459
+ *
1460
+ * Removes the specified filter from the filter configuration.
1461
+ *
1462
+ * @param filterId the id of the filter to delete
1463
+ * @example ```ts
1464
+ *
1465
+ * // delete filter id=1
1466
+ * JMap.Application.Layer.Tree.Filter.deleteById(1)
1467
+ * ```
1468
+ */
1469
+ function deleteById(filterId: number): JAppAnyLayerFilter
1470
+
1471
+ /**
1472
+ * **JMap.Application.Layer.Tree.Filter.openAddFilterDialog**
1473
+ *
1474
+ * Opens the Add Filter dialog box, and activates the Layer panel if it is not already active.
1475
+ *
1476
+ * @example ```ts
1477
+ *
1478
+ * // open Add Filter UI
1479
+ * JMap.Application.Layer.Tree.Filter.openAddFilterDialog()
1480
+ * ```
1481
+ */
1482
+ function openAddFilterDialog(): void
1483
+
1484
+ /**
1485
+ * **JMap.Application.Layer.Tree.Filter.closeAddFilterDialog**
1486
+ *
1487
+ * Closes the Add Filter dialog box (without saving the filter).
1488
+ *
1489
+ * @example ```ts
1490
+ *
1491
+ * // close Add Filter UI
1492
+ * JMap.Application.Layer.Tree.Filter.closeAddFilterDialog()
1493
+ * ```
1494
+ */
1495
+ function closeAddFilterDialog(): void
1496
+ }
1497
+ }
1498
+
1499
+ /**
1500
+ * **JMap.Application.Layer.Edition**
1501
+ *
1502
+ * You can manage the layer edition panel here.
1503
+ */
1504
+ namespace Edition {
1505
+ /**
1506
+ * **JMap.Application.Layer.Edition.DynamicFilter**
1507
+ *
1508
+ * You can manage layer dynamic filter panel and dialog here.
1509
+ */
1510
+ namespace DynamicFilter {
1511
+ /**
1512
+ * **JMap.Application.Layer.Edition.DynamicFilter.openPanel**
1513
+ *
1514
+ * Opens the edition panel, with the "dynamic-filter" tab activated, for the given layer
1515
+ *
1516
+ * @throws if layer not found
1517
+ * @param layerId the JMap layer id
1518
+ * @example ```ts
1519
+ *
1520
+ * // opens the edition panel, with the "dynamic-filter" tab activated, for layer id=3.
1521
+ * JMap.Application.Layer.Edition.DynamicFilter.openPanel(3)
1522
+ * ```
1523
+ */
1524
+ function openPanel(layerId: JId): void
1525
+
1526
+ /**
1527
+ * **JMap.Application.Layer.Edition.DynamicFilter.closePanel**
1528
+ *
1529
+ * If open, closes the edition panel.
1530
+ *
1531
+ * @example ```ts
1532
+ *
1533
+ * // closes the dynamic filter panel if open.
1534
+ * JMap.Application.Layer.Edition.DynamicFilter.closePanel()
1535
+ * ```
1536
+ */
1537
+ function closePanel(): void
1538
+
1539
+ /**
1540
+ * **JMap.Application.Layer.Edition.DynamicFilter.openCreateDialog**
1541
+ *
1542
+ * Opens the dynamic filter creation dialog for the given layer id.
1543
+ *
1544
+ * @throws if layer not found
1545
+ * @param layerId the JMap layer id
1546
+ * @example ```ts
1547
+ *
1548
+ * // opens the dynamic filter creation dialog for layer id=3
1549
+ * JMap.Application.Layer.Edition.DynamicFilter.openCreateDialog(3)
1550
+ * ```
1551
+ */
1552
+ function openCreateDialog(layerId: JId): void
1553
+
1554
+ /**
1555
+ * **JMap.Application.Layer.Edition.DynamicFilter.openUpdateDialog**
1556
+ *
1557
+ * Opens the dynamic filter update dialog for the given layer id.
1558
+ *
1559
+ * @throws if layer or condition not found
1560
+ * @param layerId the JMap layer id
1561
+ * @param conditionId the JMap dynamic filter condition id
1562
+ * @example ```ts
1563
+ *
1564
+ * // opens the dynamic filter condition creation dialog for layer id=3
1565
+ * JMap.Application.Layer.Edition.DynamicFilter.openUpdateDialog(3)
1566
+ * ```
1567
+ */
1568
+ function openUpdateDialog(layerId: JId, conditionId: number): void
1569
+
1570
+ /**
1571
+ * **JMap.Application.Layer.Edition.DynamicFilter.closeDialog**
1572
+ *
1573
+ * If open, close the dynamic filter dialog (as well for creation or update).
1574
+ *
1575
+ * @example ```ts
1576
+ *
1577
+ * // closes the edition (any tab) panel if open.
1578
+ * JMap.Application.Layer.Edition.DynamicFilter.closeDialog()
1579
+ * ```
1580
+ */
1581
+ function closeDialog(): void
1582
+ }
1583
+
1584
+ /**
1585
+ * **JMap.Application.Layer.Edition.Info**
1586
+ *
1587
+ * You can manage layer info panel here.
1588
+ */
1589
+ namespace Info {
1590
+ /**
1591
+ * **JMap.Application.Layer.Edition.Info.openPanel**
1592
+ *
1593
+ * Open the edition panel, with "info" tab activated, for the given layer
1594
+ *
1595
+ * @throws if layer not found
1596
+ * @param layerId the JMap layer id
1597
+ * @example ```ts
1598
+ *
1599
+ * // open the edition panel, with "info" tab activated, for layer id=3.
1600
+ * JMap.Application.Layer.Edition.Info.openPanel(3)
1601
+ * ```
1602
+ */
1603
+ function openPanel(layerId: JId): void
1604
+
1605
+ /**
1606
+ * **JMap.Application.Layer.Edition.Info.closePanel**
1607
+ *
1608
+ * If open, closes the edition panel.
1609
+ *
1610
+ * @example ```ts
1611
+ *
1612
+ * // closes the edition (any tab) panel if open.
1613
+ * JMap.Application.Layer.Edition.DynamicFilter.closePanel()
1614
+ * ```
1615
+ */
1616
+ function closePanel(): void
1617
+ }
1618
+
1619
+ /**
1620
+ * **JMap.Application.Layer.Edition.Thematic**
1621
+ *
1622
+ * You can manage layer thematic panel here.
1623
+ */
1624
+ namespace Thematic {
1625
+ /**
1626
+ * **JMap.Application.Layer.Edition.Thematic.openPanel**
1627
+ *
1628
+ * Opens the edition panel, with "thematics" tab activated, for the given layer
1629
+ *
1630
+ * @throws if layer not found
1631
+ * @param layerId the JMap layer id
1632
+ * @example ```ts
1633
+ *
1634
+ * // opens the edition panel, with "thematics" tab activated, for layer id=3.
1635
+ * JMap.Application.Layer.Edition.Thematic.openPanel(3)
1636
+ * ```
1637
+ */
1638
+ function openPanel(layerId: JId): void
1639
+
1640
+ /**
1641
+ * **JMap.Application.Layer.Edition.Thematic.closePanel**
1642
+ *
1643
+ * If open, closes the edition panel.
1644
+ *
1645
+ * @example ```ts
1646
+ *
1647
+ * // closes the edition (any tab) panel if open.
1648
+ * JMap.Application.Layer.Edition.DynamicFilter.closePanel()
1649
+ * ```
1650
+ */
1651
+ function closePanel(): void
1652
+ }
1653
+
1654
+ /**
1655
+ * **JMap.Application.Layer.Edition.openPanel**
1656
+ *
1657
+ * Opens the layer edition panel.
1658
+ *
1659
+ * This panel has two tabs:
1660
+ * - thematics: only available if some thematics are set on the layer, else is hidden
1661
+ * - dynamic filter: available for non raster layers
1662
+ *
1663
+ * @throws If layer is not found or layerId is correspond to a layer group, if activeTab is incorrect
1664
+ * @param layerId JMap layer id
1665
+ * @param activeTab the tab to display: "thematics" or "dynamic-filter"
1666
+ * @example ```ts
1667
+ *
1668
+ * // edits the layer's id="3" thematics (if layer 3 has at least one thematic set)
1669
+ * JMap.Application.Layer.Edition.openPanel(3, "thematics")
1670
+ *
1671
+ * // edits the layer's id="3" dynamic filter, if layer is not raster
1672
+ * JMap.Application.Layer.Edition.openPanel(2, "dynamic-filter")
1673
+ * ```
1674
+ */
1675
+ function openPanel(layerId: JId, activeTab: JAPP_LAYER_EDITION_TABS): void
1676
+
1677
+ /**
1678
+ * **JMap.Application.Layer.Edition.closePanel**
1679
+ *
1680
+ * If layer edition panel is opened, will close it. Will stop edition and show the layer tree panel.
1681
+ *
1682
+ * @example ```ts
1683
+ *
1684
+ * // closes the layer edition panel
1685
+ * JMap.Application.Layer.Edition.closePanel()
1686
+ * ```
1687
+ */
1688
+ function closePanel(): void
1689
+ }
1690
+ }
1691
+
1692
+ /**
1693
+ * **JMap.Application.UI**
1694
+ *
1695
+ * You can manage the application UI components here.
1696
+ */
1697
+ namespace UI {
1698
+ /**
1699
+ * **JMap.Application.UI.Container**
1700
+ *
1701
+ * You can access the info of the application dom container div.
1702
+ */
1703
+ namespace Container {
1704
+ /**
1705
+ * **JMap.Application.UI.Container.getId**
1706
+ *
1707
+ * Returns the DOM div element id where application UI has been inserted.
1708
+ *
1709
+ * @example ```ts
1710
+ *
1711
+ * // return the dom container id, ex : "jmapcloud-ng-types"
1712
+ * JMap.Application.UI.Container.getId()
1713
+ * ```
1714
+ */
1715
+ function getId(): string
1716
+
1717
+ /**
1718
+ * **JMap.Application.UI.Container.getWidth**
1719
+ *
1720
+ * Returns the dom container width in pixel.
1721
+ *
1722
+ * @example ```ts
1723
+ *
1724
+ * // return the dom container width, ex : 1230
1725
+ * JMap.Application.UI.Container.getWidth()
1726
+ * ```
1727
+ */
1728
+ function getWidth(): number
1729
+
1730
+ /**
1731
+ * **JMap.Application.UI.Container.getHeight**
1732
+ *
1733
+ * Returns the dom container height in pixel.
1734
+ *
1735
+ * @example ```ts
1736
+ *
1737
+ * // return the dom container height, ex : 966
1738
+ * JMap.Application.UI.Container.getHeight()
1739
+ * ```
1740
+ */
1741
+ function getHeight(): number
1742
+
1743
+ /**
1744
+ * **JMap.Application.UI.Container.getVisiblePolygonGeometry**
1745
+ *
1746
+ * Returns a polygon geometry representing the visible coordinates on the map.
1747
+ * Works fine even if the map is pitched or rotated.
1748
+ * @throws if map is not loaded
1749
+ * @example ```ts
1750
+ *
1751
+ * // returns the polygon geometry representing the visible coordinates on the map.
1752
+ * // ex :
1753
+ * // {
1754
+ * // "type": "Polygon",
1755
+ * // "coordinates": [
1756
+ * // [
1757
+ * // [ -57, 35],[-39, 23 ], [-36, 36 ], [-52, 45], [-57, 35 ]
1758
+ * // ]
1759
+ * // ]
1760
+ * // }
1761
+ * JMap.Application.UI.Container.getVisiblePolygonGeometry()
1762
+ * ```
1763
+ */
1764
+ function getVisiblePolygonGeometry(): GeoJSON.Polygon
1765
+ }
1766
+
1767
+ /**
1768
+ * **JMap.Application.UI.SidePanel**
1769
+ *
1770
+ * You can manage the application left side panel from here.
1771
+ */
1772
+ namespace SidePanel {
1773
+ /**
1774
+ * **JMap.Application.UI.Sidepanel.setVisible**
1775
+ *
1776
+ * Sets the application left side panel visibility.
1777
+ *
1778
+ * @param isVisible if true, shows the panel, else hides it
1779
+ * @example ```ts
1780
+ *
1781
+ * // Show the left side panel
1782
+ * JMap.Application.UI.Sidepanel.setVisible(true)
1783
+ *
1784
+ * // Hide the left side panel
1785
+ * JMap.Application.UI.Sidepanel.setVisible(false)
1786
+ * ```
1787
+ */
1788
+ function setVisible(isVisible: boolean): void
1789
+
1790
+ /**
1791
+ * **JMap.Application.UI.SidePanel.isVisible**
1792
+ *
1793
+ * Returns true if the JMap Cloud NG main panel on the left is opened.
1794
+ *
1795
+ * @example ```ts
1796
+ *
1797
+ * // returns true if side panel is opened
1798
+ * JMap.Application.UI.SidePanel.isVisible()
1799
+ * ```
1800
+ */
1801
+ function isVisible(): boolean
1802
+
1803
+ /**
1804
+ * **JMap.Application.UI.SidePanel.toggleVisibility**
1805
+ *
1806
+ * Changes the JMap Cloud NG main panel on the left visibility.
1807
+ *
1808
+ * If the panel is open, it will close.
1809
+ *
1810
+ * If the panel is closed, it will open.
1811
+ *
1812
+ * @example ```ts
1813
+ *
1814
+ * // change the side panel visibility
1815
+ * JMap.Application.UI.SidePanel.toggleVisibility()
1816
+ * ```
1817
+ */
1818
+ function toggleVisibility(): void
1819
+
1820
+ /**
1821
+ * **JMap.Application.UI.SidePanel.getWidthOpenInRem**
1822
+ *
1823
+ * Returns the width of the opened side panel in rem.
1824
+ *
1825
+ * @example ```ts
1826
+ *
1827
+ * // returns "28.125rem"
1828
+ * JMap.Application.UI.SidePanel.getWidthOpenInRem()
1829
+ * ```
1830
+ */
1831
+ function getWidthOpenInRem(): string
1832
+
1833
+ /**
1834
+ * **JMap.Application.UI.SidePanel.getWidthOpenInPixel**
1835
+ *
1836
+ * Returns the width of the opened side panel in pixel.
1837
+ *
1838
+ * @example ```ts
1839
+ *
1840
+ * // returns 450
1841
+ * JMap.Application.UI.SidePanel.getWidthOpenInPixel()
1842
+ * ```
1843
+ */
1844
+ function getWidthOpenInPixel(): number
1845
+
1846
+ /**
1847
+ * **JMap.Application.UI.SidePanel.getMinimumWidthOpenInPixel**
1848
+ *
1849
+ * Returns the minimum side panel width.
1850
+ *
1851
+ * @example ```ts
1852
+ *
1853
+ * // returns the minimum side panel width
1854
+ * JMap.Application.UI.SidePanel.getMinimumWidthOpenInPixel()
1855
+ * ```
1856
+ */
1857
+ function getMinimumWidthOpenInPixel(): number
1858
+
1859
+ /**
1860
+ * **JMap.Application.UI.SidePanel.setWidthOpenInPixel**
1861
+ *
1862
+ * Returns the minimum side panel width.
1863
+ *
1864
+ * @throws if new width is not a number, or lower than minimum width
1865
+ * @param width: new panel width in pixel
1866
+ * @example ```ts
1867
+ *
1868
+ * const newWidth = 500
1869
+ * if (JMap.Application.UI.SidePanel.getMinimumWidthOpenInPixel() <= newWidth) {
1870
+ * // returns the minimum side panel width
1871
+ * JMap.Application.UI.SidePanel.setWidthOpenInPixel(newWidth)
1872
+ * }
1873
+ * ```
1874
+ */
1875
+ function setWidthOpenInPixel(width: number): void
1876
+
1877
+ /**
1878
+ * **JMap.Application.UI.SidePanel.getWidthCloseInRem**
1879
+ *
1880
+ * Returns the width of the closed side panel in rem.
1881
+ *
1882
+ * @example ```ts
1883
+ *
1884
+ * // returns "3.75rem"
1885
+ * JMap.Application.UI.SidePanel.getWidthCloseInRem()
1886
+ * ```
1887
+ */
1888
+ function getWidthCloseInRem(): string
1889
+
1890
+ /**
1891
+ * **JMap.Application.UI.SidePanel.getWidthCloseInPixel**
1892
+ *
1893
+ * Returns the width of the closed side panel in pixel.
1894
+ *
1895
+ * @example ```ts
1896
+ *
1897
+ * // returns 60
1898
+ * JMap.Application.UI.SidePanel.getWidthCloseInPixel()
1899
+ * ```
1900
+ */
1901
+ function getWidthCloseInPixel(): number
1902
+
1903
+ /**
1904
+ * **JMap.Application.UI.SidePanel.getMainPanelWidthInRem**
1905
+ *
1906
+ * Returns the width of the main panel (side panel width minus menu width) in rem.
1907
+ *
1908
+ * @example ```ts
1909
+ *
1910
+ * // returns "24.375rem"
1911
+ * JMap.Application.UI.SidePanel.getMainPanelWidthInRem()
1912
+ * ```
1913
+ */
1914
+ function getMainPanelWidthInRem(): string
1915
+
1916
+ /**
1917
+ * **JMap.Application.UI.SidePanel.getMainPanelWidthInPixel**
1918
+ *
1919
+ * Returns the width of the main panel (side panel width minus menu width) in pixel.
1920
+ *
1921
+ * @example ```ts
1922
+ *
1923
+ * // returns 390
1924
+ * JMap.Application.UI.SidePanel.getMainPanelWidthInPixel()
1925
+ * ```
1926
+ */
1927
+ function getMainPanelWidthInPixel(): number
1928
+
1929
+ /**
1930
+ * **JMap.Application.UI.SidePanel.getHeaderMinHeightInRem**
1931
+ *
1932
+ * Returns the min height of the Panel header section (where the project name is displayed) in rem.
1933
+ *
1934
+ * @example ```ts
1935
+ *
1936
+ * // returns "5rem"
1937
+ * JMap.Application.UI.SidePanel.getHeaderMinHeightInRem()
1938
+ * ```
1939
+ */
1940
+ function getHeaderMinHeightInRem(): string
1941
+
1942
+ /**
1943
+ * **JMap.Application.UI.SidePanel.getHeaderMinHeightInPixel**
1944
+ *
1945
+ * Returns the min height of the Panel header section (where the project name is displayed) in pixels.
1946
+ *
1947
+ * @example ```ts
1948
+ *
1949
+ * // returns 80
1950
+ * JMap.Application.UI.SidePanel.getHeaderMinHeightInPixel()
1951
+ * ```
1952
+ */
1953
+ function getHeaderMinHeightInPixel(): number
1954
+
1955
+ /**
1956
+ * **JMap.Application.UI.SidePanel.getTitleMinHeightInRem**
1957
+ *
1958
+ * Returns the min height of the Panel title section (where the panel name is displayed) in rem.
1959
+ *
1960
+ * @example ```ts
1961
+ *
1962
+ * // returns "4rem"
1963
+ * JMap.Application.UI.SidePanel.getTitleMinHeightInRem()
1964
+ * ```
1965
+ */
1966
+ function getTitleMinHeightInRem(): string
1967
+
1968
+ /**
1969
+ * **JMap.Application.UI.SidePanel.getTitleMinHeightInPixel**
1970
+ *
1971
+ * Returns the min height of the Panel title section (where the panel name is displayed) in pixels.
1972
+ *
1973
+ * @example ```ts
1974
+ *
1975
+ * // returns 64
1976
+ * JMap.Application.UI.SidePanel.getTitleMinHeightInPixel()
1977
+ * ```
1978
+ */
1979
+ function getTitleMinHeightInPixel(): number
1980
+ }
1981
+
1982
+ /**
1983
+ * **JMap.Application.UI.Theme**
1984
+ *
1985
+ * You can manage the UI theme here.
1986
+ */
1987
+ namespace Theme {
1988
+ /**
1989
+ * **JMap.Application.UI.Theme.isDark**
1990
+ *
1991
+ * Returns true if the theme is currently dark.
1992
+ *
1993
+ * @example ```ts
1994
+ *
1995
+ * // true or false
1996
+ * JMap.Application.UI.Theme.isDark()
1997
+ * ```
1998
+ */
1999
+ function isDark(): boolean
2000
+
2001
+ /**
2002
+ * **JMap.Application.UI.Theme.setDark**
2003
+ *
2004
+ * Changes the UI color theme in dark or light.
2005
+ *
2006
+ * @param isDark if true make the theme dark, else light
2007
+ * @example ```ts
2008
+ *
2009
+ * // make the theme dark
2010
+ * JMap.Application.UI.Theme.setDark()
2011
+ *
2012
+ * // make the theme dark
2013
+ * JMap.Application.UI.Theme.setDark(true)
2014
+ *
2015
+ * // make the theme light
2016
+ * JMap.Application.UI.Theme.setDark(false)
2017
+ * ```
2018
+ */
2019
+ function setDark(isDark: boolean): void
2020
+ }
2021
+ }
2022
+
2023
+ /**
2024
+ * **JMap.Application.Print**
2025
+ *
2026
+ * You can manage everything related to print here.
2027
+ */
2028
+ namespace Print {
2029
+ /**
2030
+ * **JMap.Application.Print.setScaleControlVisibility**
2031
+ *
2032
+ * Displays or hides the scale control widget.
2033
+ *
2034
+ * @param isVisible true to display, false to hide
2035
+ * @example ```ts
2036
+ *
2037
+ * // Display the scale
2038
+ * JMap.Application.Print.setScaleControlVisibility(true)
2039
+ *
2040
+ * // Hide the scale
2041
+ * JMap.Application.Print.setScaleControlVisibility(false)
2042
+ * ```
2043
+ */
2044
+ function setScaleControlVisibility(isVisible: boolean): void
2045
+
2046
+ /**
2047
+ * **JMap.Application.Print.isScaleControlVisible**
2048
+ *
2049
+ * Returns true if the scale control widget is visible, else false.
2050
+ *
2051
+ * @example ```ts
2052
+ *
2053
+ * // true if the scale controle widget is displayed
2054
+ * JMap.Application.Print.isScaleControlVisible()
2055
+ * ```
2056
+ */
2057
+ function isScaleControlVisible(): boolean
2058
+
2059
+ /**
2060
+ * **JMap.Application.Print.setPageTitle**
2061
+ *
2062
+ * Sets the title displayed in the bottom of the print layout.
2063
+ *
2064
+ * If empty string, will display no title.
2065
+ *
2066
+ * @throws if title is not a string
2067
+ * @param title The title displayed in the bottom of the print layout
2068
+ * @example ```ts
2069
+ *
2070
+ * // set title
2071
+ * JMap.Application.Print.setPageTitle("My custom title")
2072
+ * ```
2073
+ */
2074
+ function setPageTitle(title: string): void
2075
+
2076
+ /**
2077
+ * **JMap.Application.Print.getPageTitle**
2078
+ *
2079
+ * Returns the title displayed in the bottom of the print layout.
2080
+ *
2081
+ * @example ```ts
2082
+ *
2083
+ * // returns the displayed title
2084
+ * JMap.Application.Print.getPageTitle()
2085
+ * ```
2086
+ */
2087
+ function getPageTitle(): string
2088
+
2089
+ /**
2090
+ * **JMap.Application.Print.setPageSubTitle**
2091
+ *
2092
+ * Sets the subtitle displayed in the bottom of the print layout.
2093
+ *
2094
+ * @throws if subTitle is not a string
2095
+ * @param subTitle The subtitle displayed in the bottom of the print layout
2096
+ * @example ```ts
2097
+ *
2098
+ * // set subtitle
2099
+ * JMap.Application.Print.setPageSubTitle("My custom subtitle")
2100
+ * ```
2101
+ */
2102
+ function setPageSubTitle(subTitle: string): void
2103
+
2104
+ /**
2105
+ * **JMap.Application.Print.getPageSubTitle**
2106
+ *
2107
+ * Returns the subtitle displayed in the bottom of the print layout.
2108
+ *
2109
+ * @example ```ts
2110
+ *
2111
+ * // returns the displayed subtitle
2112
+ * JMap.Application.Print.getPageSubTitle()
2113
+ * ```
2114
+ */
2115
+ function getPageSubTitle(): string
2116
+
2117
+ /**
2118
+ * **JMap.Application.Print.isDateVisibile**
2119
+ *
2120
+ * Returns true if the date is displayed in the bottom of the print layout.
2121
+ *
2122
+ * @example ```ts
2123
+ *
2124
+ * // returns true if the date is visible
2125
+ * JMap.Application.Print.isDateVisibile()
2126
+ * ```
2127
+ */
2128
+ function isDateVisibile(): boolean
2129
+
2130
+ /**
2131
+ * **JMap.Application.Print.setDateVisibility**
2132
+ *
2133
+ * Sets the date visible or hidden in the bottom of the print layout.
2134
+ *
2135
+ * @param isVisible true to display, false to hide
2136
+ * @example ```ts
2137
+ *
2138
+ * // Hide the date
2139
+ * JMap.Application.Print.setDateVisibility(false)
2140
+ *
2141
+ * // Show the date
2142
+ * JMap.Application.Print.setDateVisibility(true)
2143
+ * ```
2144
+ */
2145
+ function setDateVisibility(isVisible: boolean): void
2146
+
2147
+ /**
2148
+ * **JMap.Application.Print.isNorthArrowVisible**
2149
+ *
2150
+ * Returns true if the north arrow is displayed in the bottom of the print layout.
2151
+ *
2152
+ * @example ```ts
2153
+ *
2154
+ * // returns true if the north arrow is visible
2155
+ * JMap.Application.Print.isNorthArrowVisible()
2156
+ * ```
2157
+ */
2158
+ function isNorthArrowVisible(): boolean
2159
+
2160
+ /**
2161
+ * **JMap.Application.Print.setNorthArrowVisibility**
2162
+ *
2163
+ * Sets the north arrow visible or hidden in the bottom of the print layout.
2164
+ *
2165
+ * @param isVisible true to display, false to hide
2166
+ * @example ```ts
2167
+ *
2168
+ * // Hide the north arrow
2169
+ * JMap.Application.Print.setNorthArrowVisibility(false)
2170
+ *
2171
+ * // Show the north arrow
2172
+ * JMap.Application.Print.setNorthArrowVisibility(true)
2173
+ * ```
2174
+ */
2175
+ function setNorthArrowVisibility(isVisible: boolean): void
2176
+
2177
+ /**
2178
+ * **JMap.Application.Print.getAllPaperFormats**
2179
+ *
2180
+ * Returns all available paper formats.
2181
+ *
2182
+ * Different sizes are available: "letter" | "legal" | "a3" | "a4".
2183
+ *
2184
+ * @deprecated will be removed in the futur
2185
+ * @example ```ts
2186
+ *
2187
+ * // returns all available paper formats
2188
+ * JMap.Application.Print.getAllPaperFormats()
2189
+ * ```
2190
+ */
2191
+ function getAllPaperFormats(): JAppPaperFormat[]
2192
+
2193
+ /**
2194
+ * **JMap.Application.Print.setPaperFormat**
2195
+ *
2196
+ * Sets the paper format of the print layout.
2197
+ *
2198
+ * Technical method, you should not use it.
2199
+ *
2200
+ * @deprecated will be removed in the futur
2201
+ * @throws if format is incorrect
2202
+ * @param the paper format object or a [[JAPP_PRINT_PAPER_SIZES]]
2203
+ * @example ```ts
2204
+ *
2205
+ * // set the letter paper format
2206
+ * JMap.Application.Print.setPaperFormat("letter")
2207
+ * ```
2208
+ */
2209
+ function setPaperFormat(format: JAppPaperFormat | string): void
2210
+
2211
+ /**
2212
+ * **JMap.Application.Print.getPaperFormat**
2213
+ *
2214
+ * Returns the active paper format.
2215
+ *
2216
+ * @deprecated will be removed in the futur
2217
+ * @example ```ts
2218
+ *
2219
+ * // returns active paper format
2220
+ * JMap.Application.Print.getPaperFormat()
2221
+ * ```
2222
+ */
2223
+ function getPaperFormat(): JAppPaperFormat
2224
+
2225
+ /**
2226
+ * **JMap.Application.Print.isOrientationPortrait**
2227
+ *
2228
+ * Returns true if the print layout is portrait, else false (landscape).
2229
+ *
2230
+ * @example ```ts
2231
+ *
2232
+ * // returns true if the print layout is portrait, else false (landscape)
2233
+ * JMap.Application.Print.isOrientationPortrait()
2234
+ * ```
2235
+ */
2236
+ function isOrientationPortrait(): boolean
2237
+
2238
+ /**
2239
+ * **JMap.Application.Print.setOrientation**
2240
+ *
2241
+ * Sets the print layout orientation as portrait or landscape.
2242
+ *
2243
+ * @throws if isPortrait is not a boolean
2244
+ * @param isPortrait true to display as portrait, false as landscape
2245
+ * @example ```ts
2246
+ *
2247
+ * // set the layout as portrait
2248
+ * JMap.Application.Print.setOrientation(true)
2249
+ *
2250
+ * // set the layout as landscape
2251
+ * JMap.Application.Print.setOrientation(false)
2252
+ * ```
2253
+ */
2254
+ function setOrientation(isPortrait: boolean): void
2255
+
2256
+ /**
2257
+ * **JMap.Application.Print.getFileType**
2258
+ *
2259
+ * Returns the current type of the file, that is used when downloading the print.
2260
+ *
2261
+ * One of the following: "png" | "jpeg" | "pdf"
2262
+ *
2263
+ * @example ```ts
2264
+ *
2265
+ * // returns "png", "jpeg", or "pdf"
2266
+ * JMap.Application.Print.getFileType()
2267
+ * ```
2268
+ */
2269
+ function getFileType(): JAPP_PRINT_FILE_TYPES
2270
+
2271
+ /**
2272
+ * **JMap.Application.Print.setFileType**
2273
+ *
2274
+ * Sets the type of file used when downloading the print.
2275
+ *
2276
+ * @throws if fileType is not correct
2277
+ * @param fileType "png", "jpeg", or "pdf"
2278
+ * @example ```ts
2279
+ *
2280
+ * // set the layout as portrait
2281
+ * JMap.Application.Print.setFileType("pdf")
2282
+ * ```
2283
+ */
2284
+ function setFileType(fileType: JAPP_PRINT_FILE_TYPES): void
2285
+
2286
+ /**
2287
+ * **JMap.Application.Print.setHiResolution**
2288
+ *
2289
+ * Sets the parameter determining if the map will be exported in hi resolution or not.
2290
+ *
2291
+ * @throws if isHiResolution is not a boolean
2292
+ * @param isHiResolution true or false
2293
+ * @example ```ts
2294
+ *
2295
+ * // set export mode to hi resolution
2296
+ * JMap.Application.Print.setHiResolution(true)
2297
+ * ```
2298
+ */
2299
+ function setHiResolution(isHiResolution: boolean): void
2300
+
2301
+ /**
2302
+ * **JMap.Application.Print.getHiResolution**
2303
+ *
2304
+ * Returns true if the map export is set to hi resolution, false otherwise.
2305
+ *
2306
+ * @example ```ts
2307
+ *
2308
+ * // get export resolution
2309
+ * JMap.Application.Print.getHiResolution()
2310
+ * // true
2311
+ * ```
2312
+ */
2313
+ function getHiResolution():boolean
2314
+
2315
+ /**
2316
+ * **JMap.Application.Print.takeCapture**
2317
+ *
2318
+ * Builds print image and launches downwnload of the file
2319
+ *
2320
+ * @example ```ts
2321
+ *
2322
+ * // build print image and launch downwnload of the file
2323
+ * JMap.Application.Print.takeCapture()
2324
+ * ```
2325
+ */
2326
+ function takeCapture(): void
2327
+ }
2328
+
2329
+ /**
2330
+ * **JMap.Application.Query**
2331
+ *
2332
+ * You can manage everything related to query here.
2333
+ */
2334
+ namespace Query {
2335
+ /**
2336
+ * **JMap.Application.Query.activateQuery**
2337
+ *
2338
+ * Activates a query by id and group id.
2339
+ *
2340
+ * It displays the query form (replacing the list of queries) in the query panel.
2341
+ *
2342
+ * @param groupId the query group id
2343
+ * @param queryId the query id
2344
+ * @example ```ts
2345
+ *
2346
+ * // activate query id=43 on group id=23
2347
+ * JMap.Application.Print.activateQuery(23, 43)
2348
+ * ```
2349
+ */
2350
+ function activateQuery(groupId: JId, queryId: string): void
2351
+
2352
+ /**
2353
+ * **JMap.Application.Query.deactivateQuery**
2354
+ *
2355
+ * Deactivatea the current query. If no query is active, does nothing.
2356
+ *
2357
+ * If a query form is active (= its form is displayed), hidea it and returns to the query list.
2358
+ *
2359
+ * @example ```ts
2360
+ *
2361
+ * // if a query form is displayed, hide it and return to the query list.
2362
+ * JMap.Application.Print.deactivateQuery()
2363
+ * ```
2364
+ */
2365
+ function deactivateQuery(): void
2366
+
2367
+ /**
2368
+ * **JMap.Application.Query.getDefaultData**
2369
+ *
2370
+ * Returns the current query form data.
2371
+ *
2372
+ * If there is no active form, warns in the console and returns an empty object {}.
2373
+ *
2374
+ * @example ```ts
2375
+ *
2376
+ * // returns the current query form data
2377
+ * JMap.Application.Print.getDefaultData()
2378
+ * ```
2379
+ */
2380
+ function getDefaultData(): { [id: string]: any }
2381
+
2382
+ /**
2383
+ * **JMap.Application.Query.setDefaultData**
2384
+ *
2385
+ * Sets active query form data. If there is no active form, this function throws.
2386
+ *
2387
+ * @throws if no query is active
2388
+ * @param values the form data, depends on the form
2389
+ * @example ```ts
2390
+ *
2391
+ * // set the current query form data
2392
+ * JMap.Application.Print.setDefaultData({
2393
+ * $param1: "black",
2394
+ * $param2: "white"
2395
+ * })
2396
+ * ```
2397
+ */
2398
+ function setDefaultData(values: any): void
2399
+
2400
+ /**
2401
+ * **JMap.Application.Query.clearDefaultData**
2402
+ *
2403
+ * Resets the current query form data.
2404
+ *
2405
+ * If there is no active form, does nothing.
2406
+ *
2407
+ * @example ```ts
2408
+ *
2409
+ * // clear the current query form data
2410
+ * JMap.Application.Print.clearDefaultData()
2411
+ * ```
2412
+ */
2413
+ function clearDefaultData(): void
2414
+
2415
+ /**
2416
+ * **JMap.Application.Query.displayInDialog**
2417
+ *
2418
+ * By default, the query form is displayed in the left panel with a simple layout, one field per line.
2419
+ *
2420
+ * But it is possible to display it in a modal window, with the layout defined in the project.
2421
+ *
2422
+ * @throws if isVisibleInDialog is not a boolean
2423
+ * @param isVisibleInDialog true in modal window, false in left panel
2424
+ * @example ```ts
2425
+ *
2426
+ * // display the current form in a modal window
2427
+ * JMap.Application.Print.displayInDialog(true)
2428
+ *
2429
+ * // display the current form in the left panel
2430
+ * JMap.Application.Print.displayInDialog(false)
2431
+ * ```
2432
+ */
2433
+ function displayInDialog(isVisibleInDialog: boolean): void
2434
+
2435
+ /**
2436
+ * **JMap.Application.Query.processQuery**
2437
+ *
2438
+ * Processes the active query form with the given values.
2439
+ *
2440
+ * Throws if no query is active.
2441
+ *
2442
+ * Resolves only if some features are found.
2443
+ *
2444
+ * If features are found, makes the layer selectable and visible if needed, then selects and zooms on found features.
2445
+ *
2446
+ * If no feature is found, the Promise rejects with a human readable error in the current user's locale.
2447
+ *
2448
+ * @throws if no query is active
2449
+ * @param value the form data, depends on the form
2450
+ * @example ```ts
2451
+ *
2452
+ * // display the current form in a modal window
2453
+ * JMap.Application.Print
2454
+ * .processQuery({
2455
+ * $param1: "black",
2456
+ * $param2: "white"
2457
+ * })
2458
+ * .then(features => console.info(`Found ${features.length} feature(s)`, features))
2459
+ * .catch(error => {
2460
+ * // pass here if no features are found, or other error
2461
+ * // thrown error is a readable error using the user locale
2462
+ * console.error(error)
2463
+ * })
2464
+ * ```
2465
+ */
2466
+ function processQuery(values: any): Promise<GeoJSON.Feature[]>
2467
+ }
2468
+
2469
+ /**
2470
+ * **JMap.Application.Event**
2471
+ *
2472
+ * From this section you can manage your own event listeners reacting to JMap Cloud NG library events.
2473
+ *
2474
+ * For all your listeners, you need to provide a listener id. We introduced this notion of listener ids in order
2475
+ * to be able to know what's the problem if something goes wrong in a listener.
2476
+ *
2477
+ * Like that we are able to identify more easily the problem in the javascript console.
2478
+ *
2479
+ * Listener ids have to be unique for the namespace, regardless to the type of event you register your listener to.
2480
+ *
2481
+ * For example, for all Map Context events, you can register only one listener named "***my-custom-listener***"".
2482
+ *
2483
+ * A good practice could be prefixing all your listener ids. For example if you work for the city of Montreal
2484
+ * they could all start with "***montreal-city-***"".
2485
+ *
2486
+ * Listeners can be deactivated and reactivated.
2487
+ *
2488
+ * Deactivating a listener keeps it in the JMap Cloud NG library, but ignores it when an event is triggered.
2489
+ */
2490
+ namespace Event {
2491
+ /**
2492
+ * ***JMap.Application.Event.Main***
2493
+ *
2494
+ * Here you can manage all JMap Cloud NG high level event listeners.
2495
+ *
2496
+ * Click to see all events available: ***[[JMap.Application.Event.Main.on]]***.
2497
+ */
2498
+ namespace Main {
2499
+ /**
2500
+ * ***JMap.Application.Event.Main.on***
2501
+ *
2502
+ * Here you have all JMap Cloud NG high level available events on which you can attach a listener.
2503
+ */
2504
+ namespace on {
2505
+ /**
2506
+ * ***JMap.Application.Event.Main.on.appReady***
2507
+ *
2508
+ * This event is triggered once when:
2509
+ * * all of the application services are loaded,
2510
+ * * the redux store and its reducers are also loaded,
2511
+ * * the initial session validation has been executed. At thas point, if the session has successfully been validated, the logged-in user will also be available.
2512
+ *
2513
+ * @param listenerId Your listener id (must be unique)
2514
+ * @param fn Your listener function
2515
+ * @example ```ts
2516
+ *
2517
+ * // log a message in the console once the application is loaded
2518
+ * JMap.Application.Event.Main.on.appReady(
2519
+ * "custom-app-ready",
2520
+ * () => {
2521
+ * if (JMap.User.getToken() !== "-1") {
2522
+ * console.log(`Logged in username is: "${JMap.User.getUsername()}"`)
2523
+ * } else {
2524
+ * console.log(`No user logged in`)
2525
+ * }
2526
+ * }
2527
+ * )
2528
+ * ```
2529
+ */
2530
+ function appReady(listenerId: string, fn: () => void): void
2531
+ }
2532
+
2533
+ /**
2534
+ * ***JMap.Application.Event.Main.activate***
2535
+ *
2536
+ * Activates the listener.
2537
+ *
2538
+ * If the listener is already active, does nothing.
2539
+ *
2540
+ * If the listener is inactive, it will be reactivated and will be called again ...
2541
+ *
2542
+ * @param listenerId The listener id
2543
+ * @example ```ts
2544
+ *
2545
+ * // activate the listener "my-main-listener"
2546
+ * JMap.Application.Event.Main.activate("my-main-listener")
2547
+ * ```
2548
+ */
2549
+ function activate(listenerId: string): void
2550
+
2551
+ /**
2552
+ * ***JMap.Application.Event.Main.deactivate***
2553
+ *
2554
+ * Deactivates the listener.
2555
+ *
2556
+ * If the listener id doesn't exist or if the listener is already inactive, does nothing.
2557
+ *
2558
+ * If the listener is active, it will be deactivated and will be ignored ...
2559
+ *
2560
+ * @param listenerId The listener id
2561
+ * @example ```ts
2562
+ *
2563
+ * // deactivate the listener "my-main-listener"
2564
+ * JMap.Application.Event.Main.deactivate("my-main-listener")
2565
+ * ```
2566
+ */
2567
+ function deactivate(listenerId: string): void
2568
+
2569
+ /**
2570
+ * ***JMap.Application.Event.Main.remove***
2571
+ *
2572
+ * Removes the listener.
2573
+ *
2574
+ * If the listener doesn't exist, does nothing.
2575
+ *
2576
+ * Removes the listener from JMap Cloud NG. The listener is deleted and never called again after that.
2577
+ *
2578
+ * @param listenerId The listener id
2579
+ * @example ```ts
2580
+ *
2581
+ * // remove the listener "my-main-listener"
2582
+ * JMap.Application.Event.Main.remove("my-main-listener")
2583
+ * ```
2584
+ */
2585
+ function remove(listenerId: string): void
2586
+ }
2587
+
2588
+ /**
2589
+ * ***JMap.Application.Event.Layer***
2590
+ *
2591
+ * Here you can manage all JMap Cloud NG layer event listeners.
2592
+ *
2593
+ * Click to see all events available: ***[[JMap.Application.Event.Layer.on]]***.
2594
+ */
2595
+ namespace Layer {
2596
+ /**
2597
+ * ***JMap.Application.Event.Layer.on***
2598
+ *
2599
+ * Here you have all JMap Cloud NG available layer events on which you can attach a listener.
2600
+ */
2601
+ namespace on {
2602
+ /**
2603
+ * ***JMap.Application.Event.Layer.on.doubleClick***
2604
+ *
2605
+ * This event is triggered when a user double clicks on a layer name in the hierarchical tree of the layers panel.
2606
+ *
2607
+ * The layer is received as a param property of the event, you can then take any action that would be executed on double click for this layer.
2608
+ *
2609
+ * @param listenerId Your listener id (must be unique)
2610
+ * @param fn Your listener function
2611
+ * @example ```ts
2612
+ *
2613
+ * // Triggered when a user double clicks on a layer name
2614
+ * JMap.Application.Event.Layer.on.doubleClick("my-layer-double-click-listener", params => {
2615
+ * const layer = params.layer
2616
+ * console.info(`The following layer has been double clicked by the current user: "${layer.name}". Its visibility will be toggled`)
2617
+ * if (!JMap.Layer.isVisible(layer.id)) {
2618
+ * JMap.Layer.ensureLayerIsVisible(layer.id)
2619
+ * } else {
2620
+ * JMap.Layer.setVisible(layer.id, false)
2621
+ * }
2622
+ * })
2623
+ * ```
2624
+ */
2625
+ function doubleClick(listenerId: string, fn: (params: JAppLayerEventParams) => void): void
2626
+ }
2627
+
2628
+ /**
2629
+ * ***JMap.Application.Event.Layer.activate***
2630
+ *
2631
+ * Activates the listener.
2632
+ *
2633
+ * If the listener is already active, does nothing.
2634
+ *
2635
+ * If the listener is inactive, it will be reactivated and will be called again ...
2636
+ *
2637
+ * @param listenerId The listener id
2638
+ * @example ```ts
2639
+ *
2640
+ * // activate the listener "my-layer-listener"
2641
+ * JMap.Application.Event.Layer.activate("my-layer-listener")
2642
+ * ```
2643
+ */
2644
+ function activate(listenerId: string): void
2645
+
2646
+ /**
2647
+ * ***JMap.Application.Event.Layer.deactivate***
2648
+ *
2649
+ * Deactivates the listener.
2650
+ *
2651
+ * If the listener id doesn't exist or if the listener is already inactive, does nothing.
2652
+ *
2653
+ * If the listener is active, it will be deactivated and will be ignored ...
2654
+ *
2655
+ * @param listenerId The listener id
2656
+ * @example ```ts
2657
+ *
2658
+ * // deactivate the listener "my-layer-listener"
2659
+ * JMap.Application.Event.Layer.deactivate("my-layer-listener")
2660
+ * ```
2661
+ */
2662
+ function deactivate(listenerId: string): void
2663
+
2664
+ /**
2665
+ * ***JMap.Application.Event.Layer.remove***
2666
+ *
2667
+ * Removes the listener.
2668
+ *
2669
+ * If the listener doesn't exist, does nothing.
2670
+ *
2671
+ * Removes the listener from JMap Cloud NG. The listener is deleted and never called again after that.
2672
+ *
2673
+ * @param listenerId The listener id
2674
+ * @example ```ts
2675
+ *
2676
+ * // remove the listener "my-layer-listener"
2677
+ * JMap.Application.Event.Layer.remove("my-layer-listener")
2678
+ * ```
2679
+ */
2680
+ function remove(listenerId: string): void
2681
+ }
2682
+
2683
+ /**
2684
+ * ***JMap.Application.Event.Extension***
2685
+ *
2686
+ * Here you can manage all JMap Cloud NG extension event listeners.
2687
+ *
2688
+ * Click to see all events available: ***[[JMap.Application.Event.Extension.on]]***.
2689
+ */
2690
+ namespace Extension {
2691
+ /**
2692
+ * ***JMap.Application.Event.Extension.on***
2693
+ *
2694
+ * Here you have all JMap Cloud NG available extension events on which you can attach a listener.
2695
+ */
2696
+ namespace on {
2697
+ /**
2698
+ * ***JMap.Application.Event.Extension.on.registration***
2699
+ *
2700
+ * This event is triggered after a user registers his own JMap Cloud NG extension.
2701
+ *
2702
+ * The extension id is received as a param property of the event.
2703
+ *
2704
+ * @param listenerId Your listener id (must be unique)
2705
+ * @param fn Your listener function
2706
+ * @example ```ts
2707
+ *
2708
+ * // Triggered when a user register a new extension
2709
+ * JMap.Application.Event.Extension.on.registration("my-extension-listener", params => {
2710
+ * const extensionId = params.extensionId
2711
+ * console.info(`The following extension has been registered by the current user: "${extensionId}".`)
2712
+ * })
2713
+ * ```
2714
+ */
2715
+ function registration(listenerId: string, fn: (params: JAppExtensionEventParams) => void): void
2716
+ }
2717
+ /**
2718
+ * ***JMap.Application.Event.Extension.activate***
2719
+ *
2720
+ * Activates the listener.
2721
+ *
2722
+ * If the listener is already active, does nothing.
2723
+ *
2724
+ * If the listener is inactive, it will be reactivated and will be called again ...
2725
+ *
2726
+ * @param listenerId The listener id
2727
+ * @example ```ts
2728
+ *
2729
+ * // activate the listener "my-extension-listener"
2730
+ * JMap.Application.Event.Extension.activate("my-extension-listener")
2731
+ * ```
2732
+ */
2733
+ function activate(listenerId: string): void
2734
+
2735
+ /**
2736
+ * ***JMap.Application.Event.Extension.deactivate***
2737
+ *
2738
+ * Deactivates the listener.
2739
+ *
2740
+ * If the listener id doesn't exist or if the listener is already inactive, does nothing.
2741
+ *
2742
+ * If the listener is active, it will be deactivated and will be ignored ...
2743
+ *
2744
+ * @param listenerId The listener id
2745
+ * @example ```ts
2746
+ *
2747
+ * // deactivate the listener "my-extension-listener"
2748
+ * JMap.Application.Event.Extension.deactivate("my-extension-listener")
2749
+ * ```
2750
+ */
2751
+ function deactivate(listenerId: string): void
2752
+
2753
+ /**
2754
+ * ***JMap.Application.Event.Extension.remove***
2755
+ *
2756
+ * Removes the listener.
2757
+ *
2758
+ * If the listener doesn't exist, does nothing.
2759
+ *
2760
+ * Removes the listener from JMap Cloud NG. The listener is deleted and never called again after that.
2761
+ *
2762
+ * @param listenerId The listener id
2763
+ * @example ```ts
2764
+ *
2765
+ * // remove the listener "my-extension-listener"
2766
+ * JMap.Application.Event.Extension.remove("my-extension-listener")
2767
+ * ```
2768
+ */
2769
+ function remove(listenerId: string): void
2770
+ }
2771
+
2772
+ /**
2773
+ * ***JMap.Application.Event.UI***
2774
+ *
2775
+ * Here you can manage all JMap Cloud NG high level event listeners.
2776
+ *
2777
+ * Click to see all events available: ***[[JMap.Application.Event.Main.on]]***.
2778
+ */
2779
+ namespace UI {
2780
+ /**
2781
+ * ***JMap.Application.Event.UI.on***
2782
+ *
2783
+ * Here you have all JMap Cloud NG high level available events on which you can attach a listener.
2784
+ */
2785
+ namespace on {
2786
+ /**
2787
+ * ***JMap.Application.Event.UI.on.sidePanelVisibilityChanged***
2788
+ *
2789
+ * This event is triggered when the side panel is closed or opened.
2790
+ *
2791
+ * @param listenerId Your listener id (must be unique)
2792
+ * @param fn Your listener function
2793
+ * @example ```ts
2794
+ *
2795
+ * // log a message in the console when the side panel is closed or opened
2796
+ * JMap.Application.Event.UI.on.sidePanelVisibilityChanged(
2797
+ * "custom-side-panel-visibility-changed",
2798
+ * params => console.log(`New panel visibility: ${params.isVisible}"`)
2799
+ * )
2800
+ * ```
2801
+ */
2802
+ function sidePanelVisibilityChanged(
2803
+ listenerId: string,
2804
+ fn: (params: JAppUISidePanelVisibilityChangedEventParams) => void
2805
+ ): void
2806
+
2807
+ /**
2808
+ * ***JMap.Application.Event.UI.on.sidePanelWidthChanged***
2809
+ *
2810
+ * This event is triggered when the side panel width changes.
2811
+ *
2812
+ * @param listenerId Your listener id (must be unique)
2813
+ * @param fn Your listener function
2814
+ * @example ```ts
2815
+ *
2816
+ * // log a message in the console when the side panel width changes
2817
+ * JMap.Application.Event.UI.on.sidePanelWidthChanged(
2818
+ * "custom-side-panel-width-changed",
2819
+ * params => console.log(`New panel width ${params.width}"`)
2820
+ * )
2821
+ * ```
2822
+ */
2823
+ function sidePanelWidthChanged(
2824
+ listenerId: string,
2825
+ fn: (params: JAppUISidePanelWidthChangedEventParams) => void
2826
+ ): void
2827
+ }
2828
+
2829
+ /**
2830
+ * ***JMap.Application.Event.UI.activate***
2831
+ *
2832
+ * Activates the listener.
2833
+ *
2834
+ * If the listener is already active, does nothing.
2835
+ *
2836
+ * If the listener is inactive, it will be reactivated and will be called again ...
2837
+ *
2838
+ * @param listenerId The listener id
2839
+ * @example ```ts
2840
+ *
2841
+ * // activate the listener "my-ui-listener"
2842
+ * JMap.Application.Event.UI.activate("my-ui-listener")
2843
+ * ```
2844
+ */
2845
+ function activate(listenerId: string): void
2846
+
2847
+ /**
2848
+ * ***JMap.Application.Event.UI.deactivate***
2849
+ *
2850
+ * Deactivates the listener.
2851
+ *
2852
+ * If the listener id doesn't exist or if the listener is already inactive, does nothing.
2853
+ *
2854
+ * If the listener is active, it will be deactivated and will be ignored ...
2855
+ *
2856
+ * @param listenerId The listener id
2857
+ * @example ```ts
2858
+ *
2859
+ * // deactivate the listener "my-ui-listener"
2860
+ * JMap.Application.Event.UI.deactivate("my-ui-listener")
2861
+ * ```
2862
+ */
2863
+ function deactivate(listenerId: string): void
2864
+
2865
+ /**
2866
+ * ***JMap.Application.Event.UI.remove***
2867
+ *
2868
+ * Removes the listener.
2869
+ *
2870
+ * If the listener doesn't exist, does nothing.
2871
+ *
2872
+ * Removes the listener from JMap Cloud NG. The listener is deleted and never called again after that.
2873
+ *
2874
+ * @param listenerId The listener id
2875
+ * @example ```ts
2876
+ *
2877
+ * // remove the listener "my-ui-listener"
2878
+ * JMap.Application.Event.UI.remove("my-ui-listener")
2879
+ * ```
2880
+ */
2881
+ function remove(listenerId: string): void
2882
+ }
2883
+
2884
+ /**
2885
+ * ***JMap.Application.Event.MapContext***
2886
+ *
2887
+ * Here you can manage all JMap Cloud NG map context event listeners.
2888
+ *
2889
+ * Click to see all events available: ***[[JMap.Application.Event.MapContext.on]]***.
2890
+ */
2891
+ namespace MapContext {
2892
+ /**
2893
+ * ***JMap.Application.Event.MapContext.on***
2894
+ *
2895
+ * Here you have all JMap Cloud NG available map context events on which you can attach a listener.
2896
+ */
2897
+ namespace on {
2898
+ /**
2899
+ * ***JMap.Application.Event.MapContext.on.afterApply***
2900
+ *
2901
+ * This event is triggered after:
2902
+ * - The NG Core event JMap.Event.MapContext.on.afterApply has been triggered
2903
+ * - NG App map-context related things has been applied or processed
2904
+ *
2905
+ * You can access extension's data from this event, see example below.
2906
+ *
2907
+ * @param listenerId Your listener id (must be unique)
2908
+ * @param fn Your listener function
2909
+ * @example ```ts
2910
+ *
2911
+ * // Triggered after a map-context is applied
2912
+ * JMap.Application.Event.MapContext.on.afterApply("my-after-apply-listener", params => {
2913
+ * console.info(`After apply map context id="${params.context.title}"`, params.context)
2914
+ * const isExtensionDataSet = params.isExtensionDataSetById("my-extension")
2915
+ * if (!isExtensionDataSet) {
2916
+ * console.info("No extension data in map-context")
2917
+ * } else {
2918
+ * console.info("Extension map context data = ", params.getExtensionDataById("my-extension"))
2919
+ * }
2920
+ * })
2921
+ * ```
2922
+ */
2923
+ function afterApply(listenerId: string, fn: (params: JMapContextAfterApplyEventParams) => void): void
2924
+ }
2925
+
2926
+ /**
2927
+ * ***JMap.Application.Event.MapContext.activate***
2928
+ *
2929
+ * Activates the listener.
2930
+ *
2931
+ * If the listener is already active, does nothing.
2932
+ *
2933
+ * If the listener is inactive, it will be reactivated and will be called again ...
2934
+ *
2935
+ * @param listenerId The listener id
2936
+ * @example ```ts
2937
+ *
2938
+ * // activate the listener "my-mapcontext-listener"
2939
+ * JMap.Application.Event.MapContext.activate("my-mapcontext-listener")
2940
+ * ```
2941
+ */
2942
+ function activate(listenerId: string): void
2943
+
2944
+ /**
2945
+ * ***JMap.Application.Event.MapContext.deactivate***
2946
+ *
2947
+ * Deactivates the listener.
2948
+ *
2949
+ * If the listener id doesn't exists or if the listener is already inactive, does nothing.
2950
+ *
2951
+ * If the listener is active, it will be deactivated and will be ignored ...
2952
+ *
2953
+ * @param listenerId The listener id
2954
+ * @example ```ts
2955
+ *
2956
+ * // deactivate the listener "my-mapcontext-listener"
2957
+ * JMap.Application.Event.MapContext.deactivate("my-mapcontext-listener")
2958
+ * ```
2959
+ */
2960
+ function deactivate(listenerId: string): void
2961
+
2962
+ /**
2963
+ * ***JMap.Application.Event.MapContext.remove***
2964
+ *
2965
+ * Removes the listener.
2966
+ *
2967
+ * If the listener doesn't exist, does nothing.
2968
+ *
2969
+ * Remove the listener from JMap Cloud NG Core library. The listener is deleted and never called again after that.
2970
+ *
2971
+ * @param listenerId The listener id
2972
+ * @example ```ts
2973
+ *
2974
+ * // remove the listener "my-mapcontext-listener"
2975
+ * JMap.Application.Event.MapContext.remove("my-mapcontext-listener")
2976
+ * ```
2977
+ */
2978
+ function remove(listenerId: string): void
2979
+ }
2980
+ }
2981
+
2982
+ /**
2983
+ * **JMap.Application.User**
2984
+ *
2985
+ * You can manage everything related to user in JMap Cloud NG here.
2986
+ */
2987
+ namespace User {
2988
+ /**
2989
+ * **JMap.Application.User.addPopupMenuAction**
2990
+ *
2991
+ * Adds an action to the JMap User menu (visible in the project selection panel).
2992
+ *
2993
+ * An action must set the "href" OR the "onCLick" parameters, but not both.
2994
+ *
2995
+ * **Displaying the action's label in the UI**
2996
+ * The action's label will be translated by JMap Cloud NG translation engine if a JTranslationItem is passed,
2997
+ * otherwise the simple string will be used.
2998
+ * (see See [[JMap.Language.translate]] and [[JMap.Language.addBundle]] for more details on translations)
2999
+ *
3000
+ * @param action : the action to add
3001
+ * @param index : will insert at a specific index in the menu. Start at 0. If index is not correct insert at the end
3002
+ * @example ```ts
3003
+ *
3004
+ * JMap.Application.User.addPopupMenuAction({
3005
+ * id: "my-unique-id",
3006
+ * icon: "fas fa-info-circle",
3007
+ * label: { key: "my.custom.menu.item.translation.key", bundleId: "myTranslationBundleId"}, // label can also be a simple string
3008
+ * isHelp: true, // if true will be displayed in the JMap help menu
3009
+ * onClick: () => window.open("https://link-to-my-documentation", "_blanck")
3010
+ * }, 2)
3011
+ * ```
3012
+ */
3013
+ function addPopupMenuAction(action: JAppUserAction, index?: number): void
3014
+
3015
+ /**
3016
+ * ***JMap.Application.User.existsPopupMenuActionById***
3017
+ *
3018
+ * Returns true if an action menu exists for the given id, else false.
3019
+ *
3020
+ * @param actionId the action menu id
3021
+ * @throws if actionId is not a string (non empty)
3022
+ * @example ```ts
3023
+ *
3024
+ * // returns true if the action menu id="my-custom-action-menu" exists, else false
3025
+ * JMap.Application.User.existsPopupMenuActionById("my-custom-action-menu")
3026
+ * ```
3027
+ */
3028
+ function existsPopupMenuActionById(actionId: string): boolean
3029
+
3030
+ /**
3031
+ * ***JMap.Application.User.removePopupMenuActionById***
3032
+ *
3033
+ * Removes an existing action menu
3034
+ *
3035
+ * @param actionId the action menu id
3036
+ * @throws if actionId is not valid, or not found
3037
+ * @example ```ts
3038
+ *
3039
+ * // remove the action menu id="my-custom-action-menu"
3040
+ * JMap.Application.User.removePopupMenuActionById("my-custom-action-menu")
3041
+ * ```
3042
+ */
3043
+ function removePopupMenuActionById(actionId: string): void
3044
+ }
3045
+
3046
+ /**
3047
+ * **JMap.Application.Extension**
3048
+ *
3049
+ * You can manage everything related to JMap Cloud NG extensions here.
3050
+ */
3051
+ namespace Extension {
3052
+ /**
3053
+ * ***JMap.Application.Extension.register***
3054
+ *
3055
+ * Registers your own JMap Cloud NG extension.
3056
+ *
3057
+ * @throws Error if a parameter is not correct
3058
+ * @param extensionModel The extension model
3059
+ * @example ```ts
3060
+ *
3061
+ * JMap.Application.Extension.register({
3062
+ * id: "MyExtension", // Unique id
3063
+ * initFn: () => {
3064
+ * // here you can start your UI component if needed
3065
+ * console.log("JMap Cloud NG is started and my extension has been successfuly started")
3066
+ * },
3067
+ * onPanelCreation: panelContainerId => {
3068
+ * console.info("Create your component here")
3069
+ * },
3070
+ * onPanelDestroy: panelContainerId => {
3071
+ * console.info("Destroy your component here")
3072
+ * },
3073
+ * onRegistrationDone: () => {
3074
+ * console.info("My extension has been successfully registered")
3075
+ * }
3076
+ * })
3077
+ * ```
3078
+ */
3079
+ function register(extension: JAppExtension): void
3080
+
3081
+ /**
3082
+ * ***JMap.Application.Extension.isRegistered***
3083
+ *
3084
+ * Tells if an JMap Cloud NG extension has been registered or not.
3085
+ *
3086
+ * It can be usefull to know if a JMap Cloud NG extension is in use or not.
3087
+ *
3088
+ * @throws Error if extensionId format is not correct
3089
+ * @param extensionId The extension id
3090
+ * @example ```ts
3091
+ *
3092
+ * // returns true if extension id="my-extension" is in use or not
3093
+ * JMap.Extension.isRegistered("my-extension")
3094
+ * ```
3095
+ */
3096
+ function isRegistered(extensionId: string): boolean
3097
+
3098
+ /**
3099
+ * ***JMap.Application.Extension.getAllRegisteredIds***
3100
+ *
3101
+ * Returns all JMap Cloud NG registered extension ids.
3102
+ *
3103
+ * Desn't list JMap Cloud NG Core extensions, only JMap Cloud NG extensions.
3104
+ *
3105
+ * @example ```ts
3106
+ *
3107
+ * // Could returns [ "my-first-extension", "my-second-extension" ]
3108
+ * JMap.Extension.getAllRegisteredIds()
3109
+ * ```
3110
+ */
3111
+ function getAllRegisteredIds(): string[]
3112
+ }
3113
+
3114
+ /**
3115
+ * **JMap.Application.Message**
3116
+ *
3117
+ * You can manage the application Messages here.
3118
+ */
3119
+ namespace Message {
3120
+ /**
3121
+ * ***JMap.Application.Message.error***
3122
+ *
3123
+ * Adds an error message in the application message stack for the current session.
3124
+ *
3125
+ * @param message the text of the message
3126
+ * @param options a JAppMessageOptions object
3127
+ * @example ```ts
3128
+ *
3129
+ * const message = "This operation is not allowed"
3130
+ * JMap.Application.Message.error(message, { duration: 5000 })
3131
+ * ```
3132
+ */
3133
+ function error(message: string, options?: JAppMessageOptions): void
3134
+
3135
+ /**
3136
+ * ***JMap.Application.Message.warning***
3137
+ *
3138
+ * Adds an warning message in the application message stack for the current session.
3139
+ *
3140
+ * @param message the text of the message
3141
+ * @param options a JAppMessageOptions object
3142
+ * @example ```ts
3143
+ *
3144
+ * const message = "This operation has no effect"
3145
+ * JMap.Application.Message.warning(message, { duration: 5000 })
3146
+ * ```
3147
+ */
3148
+ function warning(message: string, options?: JAppMessageOptions): void
3149
+
3150
+ /**
3151
+ * ***JMap.Application.Message.info***
3152
+ *
3153
+ * Adds an info message in the application message stack for the current session.
3154
+ *
3155
+ * @param message the text of the message
3156
+ * @param options a JAppMessageOptions object
3157
+ * @example ```ts
3158
+ *
3159
+ * const message = "You are here"
3160
+ * JMap.Application.Message.info(message, { duration: 5000 })
3161
+ * ```
3162
+ */
3163
+ function info(message: string, options?: JAppMessageOptions): void
3164
+
3165
+ /**
3166
+ * ***JMap.Application.Message.success***
3167
+ *
3168
+ * Adds an success message in the application message stack for the current session.
3169
+ *
3170
+ * @param message the text of the message
3171
+ * @param options a JAppMessageOptions object
3172
+ * @example ```ts
3173
+ *
3174
+ * const message = "The operation was successful"
3175
+ * JMap.Application.Message.success(message, { duration: 5000 })
3176
+ * ```
3177
+ */
3178
+ function success(message: string, options?: JAppMessageOptions): void
3179
+
3180
+ /**
3181
+ * ***JMap.Application.Message.confirmMessage***
3182
+ *
3183
+ * Prompts a confirmation dialog message on the screen.
3184
+ *
3185
+ * The onSuccess callback is called when the user clicked "confirm" button.
3186
+ *
3187
+ * If it's an input confirm message, the onSuccess will get the input, else an empty string.
3188
+ *
3189
+ * The optional onCancel callback is called when the cancel button is clicked.
3190
+ *
3191
+ * @param params message parameters
3192
+ * @example ```ts
3193
+ *
3194
+ * JMap.Application.Message.confirmMessage({
3195
+ * message: "Are you sure to do a given action ?",
3196
+ * onSuccess: () => console.log(`The user is sure`),
3197
+ * onCancel: () => console.info("The user is not sure")
3198
+ * })
3199
+ *
3200
+ * JMap.Application.Message.confirmMessage({
3201
+ * message: "City name :",
3202
+ * isInputMessage: true,
3203
+ * onSuccess: cityName => console.log(`City name input = ${cityName}`),
3204
+ * onCancel: () => console.info("Input has been canceled")
3205
+ * })
3206
+ * ```
3207
+ */
3208
+ function confirmMessage(params: JAppConfirmMessage): void
3209
+
3210
+ /**
3211
+ * ***JMap.Application.Message.display***
3212
+ *
3213
+ * Adds an generic message in the application message stack for the current session.
3214
+ * severity level should be passed (will default to "info")
3215
+ *
3216
+ * @param message the text of the message
3217
+ * @param options a JAppMessageOptions object
3218
+ * @example ```ts
3219
+ *
3220
+ * const message = "The operation has failed"
3221
+ * const level = "error"
3222
+ * JMap.Application.Message.display(message, { duration: 5000 , severity: level})
3223
+ * ```
3224
+ */
3225
+ function display(message: string, options?: JAppMessageOptions): void
3226
+
3227
+ /**
3228
+ * ***JMap.Application.Message.displayWaitingOverlay***
3229
+ *
3230
+ * Opens an overlay panel that displays your message and a loading bar.
3231
+ *
3232
+ * User cannot hide or close this overlay, it aims to avoid user interactions while you are doing an async processing.
3233
+ *
3234
+ * If overlay is already displaying a previous message, it will display only the new message and hide the previous message (until you close the new message).
3235
+ *
3236
+ * Overlay is displayed all the time until you call the method [[JMap.Application.Message.closeWaitingOverlay]].
3237
+ *
3238
+ * This method is used to close one or more messages:
3239
+ * - Called without params, it will close all messages
3240
+ * - Called with a messageId, it will close only the message for the given message id
3241
+ *
3242
+ * @param message the message to display
3243
+ * @throws if message is not a non empty string
3244
+ * @returns the message id, usefull when you display multiple messages at the same time, but want to close only one.
3245
+ * @example ```ts
3246
+ *
3247
+ * // display a waiting overlay, making the app unavailable for user as long it is displayed
3248
+ * const messageId = JMap.Application.Message.displayWaitingOverlay("Please wait, processing data")
3249
+ * // NG app is now unavailable for the user
3250
+ * // You can do some asynchronous processing
3251
+ * myAsyncProcess()
3252
+ * .then(() => {
3253
+ * // close the waiting overlay
3254
+ * JMap.Application.Message.closeWaitingOverlay(messageId)
3255
+ * // NG App is now available again
3256
+ * JMap.Application.Message.success("The process was successfully completed")
3257
+ * })
3258
+ * .catch(error => {
3259
+ * // close the waiting overlay
3260
+ * JMap.Application.Message.closeWaitingOverlay(messageId)
3261
+ * // NG App is now available again
3262
+ * console.error(error)
3263
+ * JMap.Application.Message.error("An error has occurred while processing")
3264
+ * })
3265
+ * ```
3266
+ */
3267
+ function displayWaitingOverlay(message: string): string
3268
+
3269
+ /**
3270
+ * ***JMap.Application.Message.closeWaitingOverlay***
3271
+ *
3272
+ * Close all overlay messages or just one.
3273
+ *
3274
+ * If no overlay is displayed, do nothing.
3275
+ *
3276
+ * @param messageId the message to close
3277
+ * @throws if you pass a message id that is not found
3278
+ * @example ```ts
3279
+ *
3280
+ * // display a waiting overlay, making the app unavailable for user as long it is displayed
3281
+ * const messageId = JMap.Application.Message.displayWaitingOverlay("Please wait, processing data")
3282
+ * // NG app is now unavailable for the user
3283
+ * // You can do some asynchronous processing
3284
+ * myAsyncProcess()
3285
+ * .then(() => {
3286
+ * // close the waiting overlay
3287
+ * JMap.Application.Message.closeWaitingOverlay(messageId)
3288
+ * // NG App is now available again
3289
+ * JMap.Application.Message.success("The process was successfully completed")
3290
+ * })
3291
+ * .catch(error => {
3292
+ * // close the waiting overlay
3293
+ * JMap.Application.Message.closeWaitingOverlay(messageId)
3294
+ * // NG App is now available again
3295
+ * console.error(error)
3296
+ * JMap.Application.Message.error("An error has occurred while processing")
3297
+ * })
3298
+ * ```
3299
+ */
3300
+ function closeWaitingOverlay(messageId?: string): void
3301
+ }
3302
+
3303
+ /**
3304
+ * **JMap.Application.Form**
3305
+ *
3306
+ * You can render forms using this.
3307
+ */
3308
+ namespace Form {
3309
+ /**
3310
+ * ***JMap.Application.Form.render***
3311
+ *
3312
+ * Renders a form with given params in a container.
3313
+ *
3314
+ * @param containerId id of the container where the form will be rendered
3315
+ * @param formParams a JFormParams object
3316
+ * @example ```ts
3317
+ *
3318
+ * // this example will show you how to create a custom form in an extension
3319
+ * // it will render the form in the extension panel
3320
+ * window.JMAP_OPTIONS = {
3321
+ * ...
3322
+ * application: {
3323
+ * extensions: [{
3324
+ * id: "test-form",
3325
+ * panelTitle: "Test of form component API",
3326
+ * initFn: () => {},
3327
+ * onPanelCreation: panelContainerId => {
3328
+ * document.getElementById(panelContainerId).style.padding = "1rem"
3329
+ * // create a custom form in the extension panel container
3330
+ * JMap.Application.Form.render(panelContainerId, {
3331
+ * id: "search-form",
3332
+ * schema: {
3333
+ * properties: {
3334
+ * name: {
3335
+ * title: "Office Name",
3336
+ * type: "string",
3337
+ * isRequired: true,
3338
+ * maxLength: 255
3339
+ * },
3340
+ * type: {
3341
+ * title: "Office type",
3342
+ * type: "number",
3343
+ * // default: 2,
3344
+ * enum: [1, 2, 3],
3345
+ * enumNames: ["Local", "External", "Mixte"]
3346
+ * }
3347
+ * }
3348
+ * },
3349
+ * uiSchema: [
3350
+ * {
3351
+ * type: "Tab",
3352
+ * controls: [
3353
+ * {
3354
+ * id: "name",
3355
+ * label: "Office name",
3356
+ * widget: "input",
3357
+ * scope: "#/properties/name"
3358
+ * },
3359
+ * {
3360
+ * id: "type",
3361
+ * label: "Office type",
3362
+ * widget: "select",
3363
+ * scope: "#/properties/type"
3364
+ * }
3365
+ * ]
3366
+ * }
3367
+ * ],
3368
+ * defaultValueById: { // defaultValueById is optional
3369
+ * name: "default value",
3370
+ * type: 2
3371
+ * },
3372
+ * validate: (values, formMetaData) => JMap.Form.validateData(formMetaData, JMap.Form.getPreparedData(formMetaData, values)),
3373
+ * onSubmit: values => {
3374
+ * // saving your data
3375
+ * // return a string if an error occurred
3376
+ * // return a promise, and the form will display a loading button until the promise resolved
3377
+ * JMap.Application.Message.info(`Submitted values: ${JSON.stringify(values)}`)
3378
+ * }
3379
+ * })
3380
+ * },
3381
+ * onPanelDestroy: panelContainerId => {
3382
+ * JMap.Application.Form.destroyByContainerId(panelContainerId)
3383
+ * }
3384
+ * }]
3385
+ * }
3386
+ * }
3387
+ * ```
3388
+ *
3389
+ */
3390
+ function render(containerId: string, formParams: JFormParams): JFormMetaData
3391
+
3392
+ /**
3393
+ *
3394
+ * ***JMap.Application.Form.destroyByContainerId***
3395
+ *
3396
+ * Unmounts form by using container Id where it was rendered
3397
+ *
3398
+ * @param containerId id of the container to unmount
3399
+ * @example ```ts
3400
+ *
3401
+ * JMap.Application.Form.destroy("new-form")
3402
+ * ```
3403
+ */
3404
+ function destroyByContainerId(containerId: string): void
3405
+ }
3406
+ }
3407
+ }