/
app.d.ts
3407 lines (3224 loc) · 110 KB
/
app.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
declare namespace JMap {
/**
* **JMap.Application**
*
* This is the JMap NG App API documentation.
*
* JMap NG App depends on the JMap NG Core library ([[JMap]]).
*
* Examples are available <a href="https://doc.k2geospatial.com/jmap/doc/ng_dev/examples.html" target="_blank">here</a>.
*
* You can customize JMap NG App by providing startup options ([[JApplicationOptions]]).
*/
namespace Application {
/**
* **JMap.Application.getVersion**
*
* Returns the application build version.
*
* @example ```ts
*
* // return the build version, for example "1.0.1"
* JMap.Application.getVersion()
* ```
*/
function getVersion(): string
/**
* **JMap.Application.getApiVersion**
*
* Returns the application API (Typescript interfaces) version.
*
* For the same API version, multiple implementation versions can exist.
*
* @example ```ts
*
* // return the build version, for example "1.0.1"
* JMap.Application.getApiVersion()
* ```
*/
function getApiVersion(): string
/**
* **JMap.Application.openDocumentation**
*
* Opens JMap NG App online JS API documentation, in a new tab.
*
* @example ```ts
*
* // open JMap NG App online documentation, in a new tab
* JMap.Application.openDocumentation()
* ```
*/
function openDocumentation(): void
/**
* **JMap.Application.openUserManual**
*
* Opens the JMap NG App online user manual, in a new tab.
*
* @example ```ts
*
* // Open the JMap NG App online user manual, in a new tab
* JMap.Application.openUserManual()
* ```
*/
function openUserManual(): void
/**
* **JMap.Application.Annotation**
*
* You can manage everything related to annotations here.
*/
namespace Annotation {
/**
* **JMap.Application.Annotation.getDrawMode**
*
* Returns the current draw mode.
*
* @example ```ts
*
* // return the current draw mode
* JMap.Application.Annotation.getDrawMode()
* ```
*/
function getDrawMode(): JAPP_DRAW_MODES
/**
* **JMap.Application.Annotation.setDrawMode**
*
* Sets the annotation draw mode.
*
* @param drawMode the new draw mode
* @example ```ts
*
* // Set the annotation draw mode to "draw"
* JMap.Application.Annotation.setDrawMode("draw")
* ```
*/
function setDrawMode(drawMode: JAPP_DRAW_MODES): void
/**
* **JMap.Application.Annotation.getDrawType**
*
* Returns the current draw type.
*
* @example ```ts
*
* // return the current draw type
* JMap.Application.Annotation.getDrawType()
* ```
*/
function getDrawType(): JAPP_DRAW_TYPES
/**
* **JMap.Application.Annotation.setDrawMode**
*
* Sets the annotation draw mode.
*
* @param drawType the new draw type
* @example ```ts
*
* // Set the annotation draw mode to "draw"
* JMap.Application.Annotation.setDrawMode("draw")
* ```
*/
function setDrawType(drawType: JAPP_DRAW_TYPES): void
/**
* **JMap.Application.Annotation.existsById**
*
* Returns true if annotation exists for the given id, else false
*
* @throws if the annotationId param is not a valid string
* @param annotationId the given annotation id
* @example ```ts
*
* // return true if annotation exists, else false
* JMap.Application.Annotation.existsById("d68385b01be3c241c7b6298b2788839d")
* ```
*/
function existsById(annotationId: string): boolean
/**
* **JMap.Application.Annotation.getById**
*
* Returns the annotation for the given id.
*
* @throws if the annotationId param is not a valid string, or annotation is not found
* @param annotationId the given annotation id
* @example ```ts
*
* // return the annotation for the given id
* JMap.Application.Annotation.getById("d68385b01be3c241c7b6298b2788839d")
* ```
*/
function getById(annotationId: string): JAppAnnotation
/**
* **JMap.Application.Annotation.getAll**
*
* Returns all annotations.
*
* @example ```ts
*
* // return all annotations
* JMap.Application.Annotation.getAll()
* ```
*/
function getAll(): JAppAnnotation[]
/**
* **JMap.Application.Annotation.getSelectedIds**
*
* Returns the ids of the selected annotations.
*
* Empty array if no annotation is selected
*
* @example ```ts
*
* // return ids of selected annotations
* JMap.Application.Annotation.getSelectedIds()
* ```
*/
function getSelectedIds(): string[]
/**
* **JMap.Application.Annotation.deleteAll**
*
* Deletes all annotations.
*
* Does nothing if no annotation exists.
*
* @example ```ts
*
* // Delete all annotations
* JMap.Application.Annotation.deleteAll()
* ```
*/
function deleteAll(): void
/**
* **JMap.Application.Annotation.deleteByType**
*
* Deletes the annotations for the given type.
*
* Does nothing if no annotation exist for the type.
*
* @param annotationType the annotation type : "point", "polygon", "line_string", "rectangle", "circle", or "text"
* @throws if the annotation type is not correct
* @example ```ts
*
* // Delete all text annotations if exist
* JMap.Application.Annotation.deleteByType("text")
* ```
*/
function deleteByType(annotationType: JAPP_DRAW_TYPES): void
/**
* **JMap.Application.Annotation.deleteByIds**
*
* Deletes the annotations for the given ids.
*
* @param annotationIds an array of annotation id
* @throws if an annotation array is empty or an annotation is not found for the given ids.
* @example ```ts
*
* // Delete two annotations
* JMap.Application.Annotation.deleteByIds([
* "d68385b01be3c241c7b6298b2788839d",
* "98ef8ad4476f0e6fa26be416d58d0734"
* ])
* ```
*/
function deleteByIds(annotationIds: string[]): void
/**
* **JMap.Application.Annotation.deleteSelected**
*
* Deletes the selected annotations.
*
* Does nothing if no selection.
*
* @example ```ts
*
* // Delete selected annotations
* JMap.Application.Annotation.deleteSelected()
* ```
*/
function deleteSelected(): void
/**
* **JMap.Application.Annotation.getStyle**
*
* Returns the current style in use for annotation drawing.
*
* @example ```ts
*
* // return the current style in use for annotation drawing
* JMap.Application.Annotation.getStyle()
* ```
*/
function getStyle(): JAppDrawStyle
/**
* **JMap.Application.Annotation.updateStyle**
*
* Updates annotation style, for the next annotations that will be drawn.
*
* Merges the new options with current one.
*
* @example ```ts
*
* // Set the line width as 3px
* JMap.Application.Annotation.updateStyle({
* lineWidth: 3
* })
* ```
*/
function updateStyle(style: JAppDrawStyle): void
/**
* **JMap.Application.Annotation.setStyleByAnnotationIds**
*
* For given ids, updates annotation style.
*
* @example ```ts
*
* const annotationIds = [
* "d68385b01be3c241c7b6298b2788839d",
* "98ef8ad4476f0e6fa26be416d58d0734"
* ]
*
* const customStyle = {
* lineWidth: 3
* }
*
* // Set custom style for 2 annotations
* JMap.Application.Annotation.setStyleByAnnotationIds(annotationIds, customStyle)
* ```
*/
function setStyleByAnnotationIds(annotationIds: string[], style: JAppDrawStyle): void
/**
* **JMap.Application.Annotation.setPresetColors**
*
* Set the preset colors of color pickers using the given colors.
* @param presetColors A array of preset hex colors
* @throws if presetColors not an array, does not contain string or is too big
* @example ```ts
*
* // Set the preset colors with 2 color
* const presetColors = [
* "#29D1EA",
* "#D2FDDF"
* ]
*
* JMap.Application.Annotation.setPresetColors(presetColors)
* ```
*/
function setPresetColors(presetColors: string[]): void
/**
* **JMap.Application.Annotation.addPresetColor**
*
* Add the given color to the preset colors of color pickers if not already present.
*
* @param presetColor A hex color
* @throws if presetColor not an string or is empty
* @example ```ts
*
* // Add the color #D2FDDF to the preset colors
* const presetColor = "#D2FDDF"
*
* JMap.Application.Annotation.addPresetColor(presetColor)
* ```
*/
function addPresetColor(presetColor: string): void
/**
* **JMap.Application.Annotation.deletePresetColor**
*
* Delete the given color to the preset colors of color pickers if present.
*
* @param presetColor A hex color
* @throws if presetColor not an string or is empty
* @example ```ts
*
* // Delete the color #D2FDDF from the preset colors
* const presetColor = "#D2FDDF"
*
* JMap.Application.Annotation.deletePresetColor(presetColor)
* ```
*/
function deletePresetColor(presetColor: string): void
/**
* **JMap.Application.Annotation.getPresetColors**
*
* Return the preset colors used by the application's color pickers.
*
* @example ```ts
*
* // Get the current preset colors
* JMap.Application.Annotation.getPresetColors()
* ```
*/
function getPresetColors(): string[]
}
/**
* **JMap.Application.Panel**
*
* You can manage UI panels (on the left in the screen) here.
*
* There is one diplayed and active panel at a time.
*/
namespace Panel {
/**
* **JMap.Application.Panel.getActive**
*
* Returns the active panel.
*
* @example ```ts
*
* // return the currently active panel
* JMap.Application.Panel.getActive()
* ```
*/
function getActive(): JAppPanel
/**
* **JMap.Application.Panel.getAll**
*
* Returns all application panels available.
*
* @example ```ts
*
* // return all available application panels
* JMap.Application.Panel.getAll()
* ```
*/
function getAll(): JAppPanel[]
/**
* **JMap.Application.Panel.existById**
*
* Returns true if the panel exists for a given panel id.
*
* @param panelId The panel id to test
* @example ```ts
*
* // return true if panel id="layer" exists
* JMap.Application.Panel.existById("custom-panel")
* ```
*/
function existById(panelId: string): boolean
/**
* **JMap.Application.Panel.activateById**
*
* Changes the JMap NG App panel.
*
* If no panelId is provided, will activate the "layer" panel by default, if the
* "layer" panel is disabled will activate the first available panel.
*
* @throws if panel is not found
* @param panelId The new application panel to activate
* @param params optionnal parameters
* @example ```ts
*
* // will activate and display the panel id="layer"
* JMap.Application.Panel.activateById("layer")
* ```
*/
function activateById(panelId?: string, params?: JAppPanelActivationParams): void
/**
* **JMap.Application.Panel.deactivateCurrent**
*
* Deactivates the current panel, except if the current panel is the layer panel, or if there is only one panel available.
*
* @param params optionnal parameters
* @example ```ts
*
* // will activate the current panel
* JMap.Application.Panel.deactivateCurrent()
* ```
*/
function deactivateCurrent(params?: JAppPanelDeactivationParams): void
/**
* **JMap.Application.Panel.add**
*
* Adds a custom panel for a given panel definition to JMap NG App.
*
* @throws if panel format is not correct
* @param panel an object that is the definition of the new panel
* @example ```ts
*
* const customPanelId = "custom-panel"
* // will add the new panel, here an empty panel just for the example
* JMap.Application.Panel.add({
* id: customPanelId,
* // Can be an image encoded as a base64 url or an svg tag as a string.
* // 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.
* icon: "http://url-to-my-image/custom-icon.png",
* iconTooltip: "My custom panel tooltip display when mouse is hover the icon",
* title: "Custom panel"
* })
* // The panel has been created but not displayed, if you want to display it:
* JMap.Applcation.activate(customPanelId)
* ```
*/
function add(panel: JAppPanel): void
/**
* **JMap.Application.Panel.removeById**
*
* Removes a panel for a given panel id from JMap NG App.
*
* If the panel was active, will activate the first panel the application finds.
*
* @throws if panel is not found or if this is the last panel
* @param panelId The application panel id to remove
* @example ```ts
*
* // will remove the "custom-panel" panel
* JMap.Application.Panel.removeById("custom-panel")
* ```
*/
function removeById(panelId: string): void
}
/**
* **JMap.Application.Feature**
*
* You can manage everything related to app features here.
*/
namespace Feature {
/**
* **JMap.Application.Feature.openEditMenuById**
*
* Opens the feature edit menu for a single feature.
*
* @param layerId the JMap layer id
* @param featureId the feature id
* @example ```ts
*
* // open edit menu (single feature) for layer id=5, and feature id=234
* JMap.Application.Feature.openEditMenuById(5, 234)
* ```
*/
function openEditMenuById(layerId: JId, featureId: JId): Promise<GeoJSON.Feature>
/**
* **JMap.Application.Feature.openEditMenuByIds**
*
* Opens the feature edit menu for multiple features.
*
* @param layerId the JMap layer id
* @param featureIds an array of features ids
* @example ```ts
*
* // open edit menu (multiple edition) for layer id=5, and features id=234, 452 and 176
* JMap.Application.Feature.openEditMenuByIds(5, [234, 452, 176])
* ```
*/
function openEditMenuByIds(layerId: JId, featureIds: JId[]): Promise<GeoJSON.Feature[]>
/**
* **JMap.Application.Feature.closeEditMenu**
*
* Closes the feature edit menu if visible.
*
* If not visible, does nothing.
*
* @param layerId the JMap layer id
* @param featureIds an array of features ids
* @example ```ts
*
* // close the edit menu if visible
* JMap.Application.Feature.closeEditMenu()
* ```
*/
function closeEditMenu(): void
/**
* **JMap.Application.Feature.deleteByIds**
*
* Deletes features (on the server), refreshes the layer on the map and displays a success or error message when done.
*
* @param layerId the JMap layer id
* @param featureIds an array of features ids
* @example ```ts
*
* // delete 2 features on layer id=4
* JMap.Application.Feature.deleteByIds(4, [23, 76]).then(result => console.log("Delete result", result))
* ```
*/
function deleteByIds(layerId: JId, featureIds: JId[]): Promise<JFeatureDeleteByIdsResult>
}
/**
* **JMap.Application.Geometry**
*
* You can manage everything related to app geometry creation or update here.
*/
namespace Geometry {
/**
* **JMap.Application.Geometry.openPanelForCreation**
*
* Opens the geometry panel in order to create a new feature.
*
* @throws if no layer is editable
* @example ```ts
*
* // will open the geometry panel
* JMap.Application.Geometry.openPanelForCreation()
* ```
*/
function openPanelForCreation(): void
/**
* **JMap.Application.Geometry.openPanelForUpdate**
*
* Opens the geometry panel in order to update a feature geometry.
*
* @throws if the given layer or feature are not editable
* @param JAppGeometryUpdateParams function parameters
* @example ```ts
*
* // will open the geometry panel in order to update the feature geometry
* JMap.Application.Geometry.openPanelForUpdate()
* ```
*/
function openPanelForUpdate(params: JAppGeometryUpdateParams): void
/**
* **JMap.Application.Geometry.selectLayer**
*
* Selects the layer that will be used to create the geometry and the feature.
*
* @throws if layer not found
* @param layerId The JMap layer id
* @example ```ts
*
* // will select the layer id=3
* JMap.Application.Geometry.selectLayer(3)
* ```
*/
function selectLayer(layerId: JId): void
/**
* **JMap.Application.Geometry.startCreationDrawing**
*
* Enables drawing of the geometry on the map.
*
* @throws if no layer is selected
* @example ```ts
*
* // enable drawing of the geometry on the map
* JMap.Application.Geometry.startCreationDrawing()
* ```
*/
function startCreationDrawing(): void
/**
* **JMap.Application.Geometry.stopCreationDrawing**
*
* Stops the geometry creation, when drawing on the map, and displays the layer selection panel.
*
* @example ```ts
*
* // stop drawing the geometry on the map
* JMap.Application.Geometry.stopCreationDrawing()
* ```
*/
function stopCreationDrawing(): void
/**
* **JMap.Application.Geometry.finishCreate**
*
* Finishes geometry creation.
*
* @throws if panel is not in creation mode, or if geometry has not yet been created.
* @example ```ts
*
* // finishe creating or updating the geometry
* JMap.Application.Geometry.finishCreate()
* ```
*/
function finishCreate(): void
/**
* **JMap.Application.Geometry.finishUpdate**
*
* Finishes geometry update.
*
* @throws if panel is not in update mode
* @example ```ts
*
* // finishe updating the geometry
* JMap.Application.Geometry.finishUpdate()
* ```
*/
function finishUpdate(): Promise<void>
/**
* **JMap.Application.Geometry.closePanel**
*
* Closes the geometry creation or update panel without confirmation message.
*
* @example ```ts
*
* // close the geometry panel
* JMap.Application.Geometry.closePanel()
* ```
*/
function closePanel(): void
}
/**
* **JMap.Application.Selection**
*
* You can manage the application measure tools here.
*/
namespace Measure {
/**
* **JMap.Application.Measure.getAll**
*
* Returns all measures.
*
* @example ```ts
*
* // return currently drawn measures
* JMap.Application.Measure.getAll()
* ```
*/
function getAll(): JAppMeasure[]
/**
* **JMap.Application.Measure.existsById**
*
* Returns true if a measure exists for the given id, else false.
*
* @throws Error if measureId is not a string or an empty string
* @example ```ts
*
* // return true if the measure exists, else false
* JMap.Application.Measure.existsById("ac57b1bd83ca6d8e0013e4cf9f06847e")
*
* // throws an error
* JMap.Application.Measure.existsById("")
*
* // throws an error
* JMap.Application.Measure.existsById()
* ```
*/
function existsById(measureId: string): boolean
/**
* **JMap.Application.Measure.getById**
*
* Returns the measure for the given id.
*
* @throws Error if measureId is not a string or an empty string, or if measure is not found
* @example ```ts
*
* // return the measure for the given id
* JMap.Application.Measure.getById("ac57b1bd83ca6d8e0013e4cf9f06847e")
*
* // throws an error
* JMap.Application.Measure.getById("")
*
* // throws an error
* JMap.Application.Measure.getById()
* ```
*/
function getById(measureId: string): JAppMeasure
/**
* **JMap.Application.Measure.getAllLineMeasures**
*
* Returns all "line" measures. Result contains no polygon or circle measures.
*
* @example ```ts
*
* // return all line measures
* JMap.Application.Measure.getAllLineMeasures()
* ```
*/
function getAllLineMeasures(): JAppMeasure[]
/**
* **JMap.Application.Measure.getAllPolygonMeasures**
*
* Returns all "polygon" measures. Result contains no line or circle measures.
*
* @example ```ts
*
* // return all polygon measures
* JMap.Application.Measure.getAllPolygonMeasures()
* ```
*/
function getAllPolygonMeasures(): JAppMeasure[]
/**
* **JMap.Application.Measure.getAllCircleMeasures**
*
* Returns all "circle" measures. Result contains no line or polygon measures.
*
* @example ```ts
*
* // return all circle measures
* JMap.Application.Measure.getAllCircleMeasures()
* ```
*/
function getAllCircleMeasures(): JAppMeasure[]
/**
* **JMap.Application.Measure.setAllMeasures**
*
* Resets measures with provided measures.
*
* @example ```ts
*
* // remove all measures
* JMap.Application.Measure.setAllMeasures([])
* ```
*/
function setAllMeasures(measures: JAppMeasure[]): void
/**
* **JMap.Application.Measure.activateMeasureType**
*
* Activates a measure type for the drawing measurement tool.
* @param measureType The new measure type to apply
* @example ```ts
*
* // change the measure type to length
* JMap.Application.Measure.activateMeasureType("length")
* ```
*/
function activateMeasureType(measureType: JAPP_MEASURE_TYPES): void
/**
* **JMap.Application.Measure.getActiveMeasureType**
*
* Returns the current active measure type.
*
* @example ```ts
*
* // return active mesure type
* JMap.Application.Measure.getActiveMeasureType([])
* ```
*/
function getActiveMeasureType(): JAPP_MEASURE_TYPES
/**
* **JMap.Application.Measure.getSelectedIds**
*
* Returns the current measure selection.
*
* @example ```ts
*
* // return current measure selection
* JMap.Application.Measure.getSelectedIds([])
* ```
*/
function getSelectedIds(): string[]
/**
* **JMap.Application.Measure.setSelectionActive**
*
* Activates or deactivates the measurement selection mode.
*
* If active, measures can be selected by clicking on the map (then changed or removed).
*
* @param isSelectionActive true to activate selection mode, false to deactivate
* @example ```ts
*
* // activate selection of measures
* JMap.Application.Measure.setSelectionActive(true)
*
* // deactivate selection of measure
* JMap.Application.Measure.setSelectionActive(false)
* ```
*/
function setSelectionActive(isSelectionActive: boolean): void
/**
* **JMap.Application.Measure.deleteAll**
*
* Deletes all measures.
*
* Returns deleted measure count.
*
* @example ```ts
*
* // delete all measures
* const deletedMeasuresCount = JMap.Application.Measure.deleteAll()
* ```
*/
function deleteAll(): number
/**
* **JMap.Application.Measure.deleteSelected**
*
* Deletes all selected measures.
*
* Returns deleted measure count.
*
* @example ```ts
*
* // delete all selected measures
* const deletedMeasuresCount = JMap.Application.Measure.deleteSelected()
* ```
*/
function deleteSelected(): number
/**
* **JMap.Application.Measure.deleteMeasuresById**
*
* Deletes a measure for a given id.
*
* @throws if measure is not found
* @param measureIds list of measure ids
* @example ```ts
*
* // delete measure having id="bc4fc07f2e84eb50f5962d3d41c836cb"
* const deletedMeasuresCount = JMap.Application.Measure.deleteMeasuresById("bc4fc07f2e84eb50f5962d3d41c836cb")
* ```
*/
function deleteMeasuresById(measureIds: string[]): number
/**
* **JMap.Application.Measure.deleteAllLines**
*
* Deletes all measures having type === "line_string".
*
* Returns deleted measure count.
*
* @example ```ts
*
* // delete all line measures (if exist)
* const deletedMeasuresCount = JMap.Application.Measure.deleteAllLines()
* ```
*/
function deleteAllLines(): number
/**
* **JMap.Application.Measure.deleteAllPolygons**
*
* Deletes all measures having type === "polygon".
*
* Returns deleted measure count.
*
* @example ```ts
*
* // delete all polygon measures (if exist)
* const deletedMeasuresCount = JMap.Application.Measure.deleteAllPolygons()
* ```
*/
function deleteAllPolygons(): number
/**
* **JMap.Application.Measure.deleteAllCircles**
*
* Deletes all measures having type === "circle".
*
* Returns deleted measure count.
*
* @example ```ts
*
* // delete all circle measures (if exist)
* const deletedMeasuresCount = JMap.Application.Measure.deleteAllCircles()
* ```
*/
function deleteAllCircles(): number
/**
* **JMap.Application.Measure.getMeasurementSystem**
*
* Returns the current measurement system used by the Measurements Panel
*
* @example ```ts
*
* // get the current measurement system
* console.log(JMap.Application.Measure.getMeasurementSystem())
* // "geodetic"
* ```
*/
function getMeasurementSystem(): JAPP_MEASUREMENT_SYSTEMS
/**
* **JMap.Application.Measure.setMeasurementSystem**
*
* 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 jmap-core-js methods like [[JMap.Geometry.getDistance]], which always return geodetic values.**
*
* **This method should not be called in regular situations.**
*
* 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.
*
* 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".
*
* 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.
*
* @param measurementSystem "geodetic" (default) or "planar"
* @example ```ts
*
* // set the current measurement system to "geodetic"
* JMap.Application.Measure.setMeasurementSystem("geodetic")
* ```
*/
function setMeasurementSystem(measurementSystem: JAPP_MEASUREMENT_SYSTEMS): void
}
/**
* **JMap.Application.Selection**
*
* You can manage the application selection tools here.
*/
namespace Selection {
/**
* **JMap.Application.Selection.getDisplayedLayerId**
*
* The selection of only one layer can be diplayed at a time.
*
* This function returns the id of the layer for which the selection is displayed.
*
* @example ```ts
*
* // return the layer id of the displayed selection
* JMap.Application.Selection.getDisplayedLayerId()
* ```
*/
function getDisplayedLayerId(): JId
/**
* **JMap.Application.Selection.setDisplayedLayerId**
*