jmapcloud-ng-types 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/public/app.d.ts +389 -387
- package/public/startup-options.d.ts +27 -26
package/public/app.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ declare namespace JMap {
|
|
|
16
16
|
*
|
|
17
17
|
* Returns the application build version.
|
|
18
18
|
*
|
|
19
|
-
* @example
|
|
20
|
-
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
21
|
* // return the build version, for example "1.0.1"
|
|
22
22
|
* JMap.Application.getVersion()
|
|
23
23
|
* ```
|
|
@@ -31,8 +31,8 @@ declare namespace JMap {
|
|
|
31
31
|
*
|
|
32
32
|
* For the same API version, multiple implementation versions can exist.
|
|
33
33
|
*
|
|
34
|
-
* @example
|
|
35
|
-
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
36
|
* // return the build version, for example "1.0.1"
|
|
37
37
|
* JMap.Application.getApiVersion()
|
|
38
38
|
* ```
|
|
@@ -44,8 +44,8 @@ declare namespace JMap {
|
|
|
44
44
|
*
|
|
45
45
|
* Opens JMap Cloud NG's online JS API documentation, in a new tab.
|
|
46
46
|
*
|
|
47
|
-
* @example
|
|
48
|
-
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
49
|
* // open JMap Cloud NG's online documentation, in a new tab
|
|
50
50
|
* JMap.Application.openDocumentation()
|
|
51
51
|
* ```
|
|
@@ -57,8 +57,8 @@ declare namespace JMap {
|
|
|
57
57
|
*
|
|
58
58
|
* Opens JMap Cloud NG's online user manual, in a new tab.
|
|
59
59
|
*
|
|
60
|
-
* @example
|
|
61
|
-
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
62
|
* // Open JMap Cloud NG's online user manual, in a new tab
|
|
63
63
|
* JMap.Application.openUserManual()
|
|
64
64
|
* ```
|
|
@@ -76,8 +76,8 @@ declare namespace JMap {
|
|
|
76
76
|
*
|
|
77
77
|
* Returns the current draw mode.
|
|
78
78
|
*
|
|
79
|
-
* @example
|
|
80
|
-
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
81
|
* // return the current draw mode
|
|
82
82
|
* JMap.Application.Annotation.getDrawMode()
|
|
83
83
|
* ```
|
|
@@ -90,8 +90,8 @@ declare namespace JMap {
|
|
|
90
90
|
* Sets the annotation draw mode.
|
|
91
91
|
*
|
|
92
92
|
* @param drawMode the new draw mode
|
|
93
|
-
* @example
|
|
94
|
-
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
95
|
* // Set the annotation draw mode to "draw"
|
|
96
96
|
* JMap.Application.Annotation.setDrawMode("draw")
|
|
97
97
|
* ```
|
|
@@ -103,8 +103,8 @@ declare namespace JMap {
|
|
|
103
103
|
*
|
|
104
104
|
* Returns the current draw type.
|
|
105
105
|
*
|
|
106
|
-
* @example
|
|
107
|
-
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
108
|
* // return the current draw type
|
|
109
109
|
* JMap.Application.Annotation.getDrawType()
|
|
110
110
|
* ```
|
|
@@ -117,8 +117,8 @@ declare namespace JMap {
|
|
|
117
117
|
* Sets the annotation draw mode.
|
|
118
118
|
*
|
|
119
119
|
* @param drawType the new draw type
|
|
120
|
-
* @example
|
|
121
|
-
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
122
|
* // Set the annotation draw mode to "draw"
|
|
123
123
|
* JMap.Application.Annotation.setDrawMode("draw")
|
|
124
124
|
* ```
|
|
@@ -132,8 +132,8 @@ declare namespace JMap {
|
|
|
132
132
|
*
|
|
133
133
|
* @throws if the annotationId param is not a valid string
|
|
134
134
|
* @param annotationId the given annotation id
|
|
135
|
-
* @example
|
|
136
|
-
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```ts
|
|
137
137
|
* // return true if annotation exists, else false
|
|
138
138
|
* JMap.Application.Annotation.existsById("d68385b01be3c241c7b6298b2788839d")
|
|
139
139
|
* ```
|
|
@@ -147,8 +147,8 @@ declare namespace JMap {
|
|
|
147
147
|
*
|
|
148
148
|
* @throws if the annotationId param is not a valid string, or annotation is not found
|
|
149
149
|
* @param annotationId the given annotation id
|
|
150
|
-
* @example
|
|
151
|
-
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```ts
|
|
152
152
|
* // return the annotation for the given id
|
|
153
153
|
* JMap.Application.Annotation.getById("d68385b01be3c241c7b6298b2788839d")
|
|
154
154
|
* ```
|
|
@@ -160,8 +160,8 @@ declare namespace JMap {
|
|
|
160
160
|
*
|
|
161
161
|
* Returns all annotations.
|
|
162
162
|
*
|
|
163
|
-
* @example
|
|
164
|
-
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```ts
|
|
165
165
|
* // return all annotations
|
|
166
166
|
* JMap.Application.Annotation.getAll()
|
|
167
167
|
* ```
|
|
@@ -175,8 +175,8 @@ declare namespace JMap {
|
|
|
175
175
|
*
|
|
176
176
|
* Empty array if no annotation is selected
|
|
177
177
|
*
|
|
178
|
-
* @example
|
|
179
|
-
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```ts
|
|
180
180
|
* // return ids of selected annotations
|
|
181
181
|
* JMap.Application.Annotation.getSelectedIds()
|
|
182
182
|
* ```
|
|
@@ -190,8 +190,8 @@ declare namespace JMap {
|
|
|
190
190
|
*
|
|
191
191
|
* Does nothing if no annotation exists.
|
|
192
192
|
*
|
|
193
|
-
* @example
|
|
194
|
-
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```ts
|
|
195
195
|
* // Delete all annotations
|
|
196
196
|
* JMap.Application.Annotation.deleteAll()
|
|
197
197
|
* ```
|
|
@@ -207,8 +207,8 @@ declare namespace JMap {
|
|
|
207
207
|
*
|
|
208
208
|
* @param annotationType the annotation type : "point", "polygon", "line_string", "rectangle", "circle", or "text"
|
|
209
209
|
* @throws if the annotation type is not correct
|
|
210
|
-
* @example
|
|
211
|
-
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```ts
|
|
212
212
|
* // Delete all text annotations if exist
|
|
213
213
|
* JMap.Application.Annotation.deleteByType("text")
|
|
214
214
|
* ```
|
|
@@ -222,8 +222,8 @@ declare namespace JMap {
|
|
|
222
222
|
*
|
|
223
223
|
* @param annotationIds an array of annotation id
|
|
224
224
|
* @throws if an annotation array is empty or an annotation is not found for the given ids.
|
|
225
|
-
* @example
|
|
226
|
-
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```ts
|
|
227
227
|
* // Delete two annotations
|
|
228
228
|
* JMap.Application.Annotation.deleteByIds([
|
|
229
229
|
* "d68385b01be3c241c7b6298b2788839d",
|
|
@@ -240,8 +240,8 @@ declare namespace JMap {
|
|
|
240
240
|
*
|
|
241
241
|
* Does nothing if no selection.
|
|
242
242
|
*
|
|
243
|
-
* @example
|
|
244
|
-
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```ts
|
|
245
245
|
* // Delete selected annotations
|
|
246
246
|
* JMap.Application.Annotation.deleteSelected()
|
|
247
247
|
* ```
|
|
@@ -253,8 +253,8 @@ declare namespace JMap {
|
|
|
253
253
|
*
|
|
254
254
|
* Returns the current style in use for annotation drawing.
|
|
255
255
|
*
|
|
256
|
-
* @example
|
|
257
|
-
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```ts
|
|
258
258
|
* // return the current style in use for annotation drawing
|
|
259
259
|
* JMap.Application.Annotation.getStyle()
|
|
260
260
|
* ```
|
|
@@ -268,8 +268,8 @@ declare namespace JMap {
|
|
|
268
268
|
*
|
|
269
269
|
* Merges the new options with current one.
|
|
270
270
|
*
|
|
271
|
-
* @example
|
|
272
|
-
*
|
|
271
|
+
* @example
|
|
272
|
+
* ```ts
|
|
273
273
|
* // Set the line width as 3px
|
|
274
274
|
* JMap.Application.Annotation.updateStyle({
|
|
275
275
|
* lineWidth: 3
|
|
@@ -283,8 +283,8 @@ declare namespace JMap {
|
|
|
283
283
|
*
|
|
284
284
|
* For given ids, updates annotation style.
|
|
285
285
|
*
|
|
286
|
-
* @example
|
|
287
|
-
*
|
|
286
|
+
* @example
|
|
287
|
+
* ```ts
|
|
288
288
|
* const annotationIds = [
|
|
289
289
|
* "d68385b01be3c241c7b6298b2788839d",
|
|
290
290
|
* "98ef8ad4476f0e6fa26be416d58d0734"
|
|
@@ -306,8 +306,8 @@ declare namespace JMap {
|
|
|
306
306
|
* Set the preset colors of color pickers using the given colors.
|
|
307
307
|
* @param presetColors A array of preset hex colors
|
|
308
308
|
* @throws if presetColors not an array, does not contain string or is too big
|
|
309
|
-
* @example
|
|
310
|
-
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```ts
|
|
311
311
|
* // Set the preset colors with 2 color
|
|
312
312
|
* const presetColors = [
|
|
313
313
|
* "#29D1EA",
|
|
@@ -326,8 +326,8 @@ declare namespace JMap {
|
|
|
326
326
|
*
|
|
327
327
|
* @param presetColor A hex color
|
|
328
328
|
* @throws if presetColor not an string or is empty
|
|
329
|
-
* @example
|
|
330
|
-
*
|
|
329
|
+
* @example
|
|
330
|
+
* ```ts
|
|
331
331
|
* // Add the color #D2FDDF to the preset colors
|
|
332
332
|
* const presetColor = "#D2FDDF"
|
|
333
333
|
*
|
|
@@ -343,8 +343,8 @@ declare namespace JMap {
|
|
|
343
343
|
*
|
|
344
344
|
* @param presetColor A hex color
|
|
345
345
|
* @throws if presetColor not an string or is empty
|
|
346
|
-
* @example
|
|
347
|
-
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```ts
|
|
348
348
|
* // Delete the color #D2FDDF from the preset colors
|
|
349
349
|
* const presetColor = "#D2FDDF"
|
|
350
350
|
*
|
|
@@ -358,8 +358,8 @@ declare namespace JMap {
|
|
|
358
358
|
*
|
|
359
359
|
* Return the preset colors used by the application's color pickers.
|
|
360
360
|
*
|
|
361
|
-
* @example
|
|
362
|
-
*
|
|
361
|
+
* @example
|
|
362
|
+
* ```ts
|
|
363
363
|
* // Get the current preset colors
|
|
364
364
|
* JMap.Application.Annotation.getPresetColors()
|
|
365
365
|
* ```
|
|
@@ -373,8 +373,8 @@ declare namespace JMap {
|
|
|
373
373
|
*
|
|
374
374
|
* @param isEnabled true to enable snap mode, false to disable
|
|
375
375
|
* @throws if isEnabled is not a boolean
|
|
376
|
-
* @example
|
|
377
|
-
*
|
|
376
|
+
* @example
|
|
377
|
+
* ```ts
|
|
378
378
|
* // enable snap mode
|
|
379
379
|
* JMap.Application.Annotation.setSnapEnabled(true)
|
|
380
380
|
* ```
|
|
@@ -388,8 +388,8 @@ declare namespace JMap {
|
|
|
388
388
|
*
|
|
389
389
|
* @param layerId the JMap layer id
|
|
390
390
|
* @throws if layer not found
|
|
391
|
-
* @example
|
|
392
|
-
*
|
|
391
|
+
* @example
|
|
392
|
+
* ```ts
|
|
393
393
|
* // snap will target the features of the layer having id="36885146-7eed-4071-9f86-8e29c505af91"
|
|
394
394
|
* JMap.Application.Annotation.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
|
|
395
395
|
* ```
|
|
@@ -409,8 +409,8 @@ declare namespace JMap {
|
|
|
409
409
|
*
|
|
410
410
|
* Returns the active panel.
|
|
411
411
|
*
|
|
412
|
-
* @example
|
|
413
|
-
*
|
|
412
|
+
* @example
|
|
413
|
+
* ```ts
|
|
414
414
|
* // return the currently active panel
|
|
415
415
|
* JMap.Application.Panel.getActive()
|
|
416
416
|
* ```
|
|
@@ -422,8 +422,8 @@ declare namespace JMap {
|
|
|
422
422
|
*
|
|
423
423
|
* Returns all application panels available.
|
|
424
424
|
*
|
|
425
|
-
* @example
|
|
426
|
-
*
|
|
425
|
+
* @example
|
|
426
|
+
* ```ts
|
|
427
427
|
* // return all available application panels
|
|
428
428
|
* JMap.Application.Panel.getAll()
|
|
429
429
|
* ```
|
|
@@ -436,8 +436,8 @@ declare namespace JMap {
|
|
|
436
436
|
* Returns true if the panel exists for a given panel id.
|
|
437
437
|
*
|
|
438
438
|
* @param panelId The panel id to test
|
|
439
|
-
* @example
|
|
440
|
-
*
|
|
439
|
+
* @example
|
|
440
|
+
* ```ts
|
|
441
441
|
* // return true if panel id="layer" exists
|
|
442
442
|
* JMap.Application.Panel.existById("custom-panel")
|
|
443
443
|
* ```
|
|
@@ -455,8 +455,8 @@ declare namespace JMap {
|
|
|
455
455
|
* @throws if panel is not found
|
|
456
456
|
* @param panelId The new application panel to activate
|
|
457
457
|
* @param params optionnal parameters
|
|
458
|
-
* @example
|
|
459
|
-
*
|
|
458
|
+
* @example
|
|
459
|
+
* ```ts
|
|
460
460
|
* // will activate and display the panel id="layer"
|
|
461
461
|
* JMap.Application.Panel.activateById("layer")
|
|
462
462
|
* ```
|
|
@@ -469,8 +469,8 @@ declare namespace JMap {
|
|
|
469
469
|
* Deactivates the current panel, except if the current panel is the layer panel, or if there is only one panel available.
|
|
470
470
|
*
|
|
471
471
|
* @param params optionnal parameters
|
|
472
|
-
* @example
|
|
473
|
-
*
|
|
472
|
+
* @example
|
|
473
|
+
* ```ts
|
|
474
474
|
* // will activate the current panel
|
|
475
475
|
* JMap.Application.Panel.deactivateCurrent()
|
|
476
476
|
* ```
|
|
@@ -484,8 +484,8 @@ declare namespace JMap {
|
|
|
484
484
|
*
|
|
485
485
|
* @throws if panel format is not correct
|
|
486
486
|
* @param panel an object that is the definition of the new panel
|
|
487
|
-
* @example
|
|
488
|
-
*
|
|
487
|
+
* @example
|
|
488
|
+
* ```ts
|
|
489
489
|
* const customPanelId = "custom-panel"
|
|
490
490
|
* // will add the new panel, here an empty panel just for the example
|
|
491
491
|
* JMap.Application.Panel.add({
|
|
@@ -511,8 +511,8 @@ declare namespace JMap {
|
|
|
511
511
|
*
|
|
512
512
|
* @throws if panel is not found or if this is the last panel
|
|
513
513
|
* @param panelId The application panel id to remove
|
|
514
|
-
* @example
|
|
515
|
-
*
|
|
514
|
+
* @example
|
|
515
|
+
* ```ts
|
|
516
516
|
* // will remove the "custom-panel" panel
|
|
517
517
|
* JMap.Application.Panel.removeById("custom-panel")
|
|
518
518
|
* ```
|
|
@@ -533,8 +533,8 @@ declare namespace JMap {
|
|
|
533
533
|
*
|
|
534
534
|
* @param layerId the JMap layer id
|
|
535
535
|
* @param featureId the feature id
|
|
536
|
-
* @example
|
|
537
|
-
*
|
|
536
|
+
* @example
|
|
537
|
+
* ```ts
|
|
538
538
|
* // open edit menu (single feature) for layer id=5, and feature id=234
|
|
539
539
|
* JMap.Application.Feature.openEditMenuById(5, 234)
|
|
540
540
|
* ```
|
|
@@ -548,8 +548,8 @@ declare namespace JMap {
|
|
|
548
548
|
*
|
|
549
549
|
* @param layerId the JMap layer id
|
|
550
550
|
* @param featureIds an array of features ids
|
|
551
|
-
* @example
|
|
552
|
-
*
|
|
551
|
+
* @example
|
|
552
|
+
* ```ts
|
|
553
553
|
* // open edit menu (multiple edition) for layer id=5, and features id=234, 452 and 176
|
|
554
554
|
* JMap.Application.Feature.openEditMenuByIds(5, [234, 452, 176])
|
|
555
555
|
* ```
|
|
@@ -563,10 +563,8 @@ declare namespace JMap {
|
|
|
563
563
|
*
|
|
564
564
|
* If not visible, does nothing.
|
|
565
565
|
*
|
|
566
|
-
* @
|
|
567
|
-
*
|
|
568
|
-
* @example ```ts
|
|
569
|
-
*
|
|
566
|
+
* @example
|
|
567
|
+
* ```ts
|
|
570
568
|
* // close the edit menu if visible
|
|
571
569
|
* JMap.Application.Feature.closeEditMenu()
|
|
572
570
|
* ```
|
|
@@ -580,8 +578,8 @@ declare namespace JMap {
|
|
|
580
578
|
*
|
|
581
579
|
* @param layerId the JMap layer id
|
|
582
580
|
* @param featureIds an array of features ids
|
|
583
|
-
* @example
|
|
584
|
-
*
|
|
581
|
+
* @example
|
|
582
|
+
* ```ts
|
|
585
583
|
* // delete 2 features on layer id=4
|
|
586
584
|
* JMap.Application.Feature.deleteByIds(4, [23, 76]).then(result => console.log("Delete result", result))
|
|
587
585
|
* ```
|
|
@@ -601,8 +599,8 @@ declare namespace JMap {
|
|
|
601
599
|
* Opens the geometry panel in order to create a new feature.
|
|
602
600
|
*
|
|
603
601
|
* @throws if no layer is editable
|
|
604
|
-
* @example
|
|
605
|
-
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```ts
|
|
606
604
|
* // will open the geometry panel
|
|
607
605
|
* JMap.Application.Geometry.openPanelForCreation()
|
|
608
606
|
* ```
|
|
@@ -615,9 +613,9 @@ declare namespace JMap {
|
|
|
615
613
|
* Opens the geometry panel in order to update a feature geometry.
|
|
616
614
|
*
|
|
617
615
|
* @throws if the given layer or feature are not editable
|
|
618
|
-
* @param
|
|
619
|
-
* @example
|
|
620
|
-
*
|
|
616
|
+
* @param params function parameters
|
|
617
|
+
* @example
|
|
618
|
+
* ```ts
|
|
621
619
|
* // will open the geometry panel in order to update the feature geometry
|
|
622
620
|
* JMap.Application.Geometry.openPanelForUpdate()
|
|
623
621
|
* ```
|
|
@@ -631,8 +629,8 @@ declare namespace JMap {
|
|
|
631
629
|
*
|
|
632
630
|
* @throws if layer not found
|
|
633
631
|
* @param layerId The JMap layer id
|
|
634
|
-
* @example
|
|
635
|
-
*
|
|
632
|
+
* @example
|
|
633
|
+
* ```ts
|
|
636
634
|
* // will select the layer id=3
|
|
637
635
|
* JMap.Application.Geometry.selectLayer(3)
|
|
638
636
|
* ```
|
|
@@ -645,8 +643,8 @@ declare namespace JMap {
|
|
|
645
643
|
* Enables drawing of the geometry on the map.
|
|
646
644
|
*
|
|
647
645
|
* @throws if no layer is selected
|
|
648
|
-
* @example
|
|
649
|
-
*
|
|
646
|
+
* @example
|
|
647
|
+
* ```ts
|
|
650
648
|
* // enable drawing of the geometry on the map
|
|
651
649
|
* JMap.Application.Geometry.startCreationDrawing()
|
|
652
650
|
* ```
|
|
@@ -658,8 +656,8 @@ declare namespace JMap {
|
|
|
658
656
|
*
|
|
659
657
|
* Stops the geometry creation, when drawing on the map, and displays the layer selection panel.
|
|
660
658
|
*
|
|
661
|
-
* @example
|
|
662
|
-
*
|
|
659
|
+
* @example
|
|
660
|
+
* ```ts
|
|
663
661
|
* // stop drawing the geometry on the map
|
|
664
662
|
* JMap.Application.Geometry.stopCreationDrawing()
|
|
665
663
|
* ```
|
|
@@ -672,8 +670,8 @@ declare namespace JMap {
|
|
|
672
670
|
* Finishes geometry creation.
|
|
673
671
|
*
|
|
674
672
|
* @throws if panel is not in creation mode, or if geometry has not yet been created.
|
|
675
|
-
* @example
|
|
676
|
-
*
|
|
673
|
+
* @example
|
|
674
|
+
* ```ts
|
|
677
675
|
* // finishe creating or updating the geometry
|
|
678
676
|
* JMap.Application.Geometry.finishCreate()
|
|
679
677
|
* ```
|
|
@@ -686,8 +684,8 @@ declare namespace JMap {
|
|
|
686
684
|
* Finishes geometry update.
|
|
687
685
|
*
|
|
688
686
|
* @throws if panel is not in update mode
|
|
689
|
-
* @example
|
|
690
|
-
*
|
|
687
|
+
* @example
|
|
688
|
+
* ```ts
|
|
691
689
|
* // finishe updating the geometry
|
|
692
690
|
* JMap.Application.Geometry.finishUpdate()
|
|
693
691
|
* ```
|
|
@@ -699,8 +697,8 @@ declare namespace JMap {
|
|
|
699
697
|
*
|
|
700
698
|
* Closes the geometry creation or update panel without confirmation message.
|
|
701
699
|
*
|
|
702
|
-
* @example
|
|
703
|
-
*
|
|
700
|
+
* @example
|
|
701
|
+
* ```ts
|
|
704
702
|
* // close the geometry panel
|
|
705
703
|
* JMap.Application.Geometry.closePanel()
|
|
706
704
|
* ```
|
|
@@ -714,8 +712,8 @@ declare namespace JMap {
|
|
|
714
712
|
*
|
|
715
713
|
* @param isEnabled true to enable snap mode, false to disable
|
|
716
714
|
* @throws if isEnabled is not a boolean
|
|
717
|
-
* @example
|
|
718
|
-
*
|
|
715
|
+
* @example
|
|
716
|
+
* ```ts
|
|
719
717
|
* // enable snap mode
|
|
720
718
|
* JMap.Application.Geometry.setSnapEnabled(true)
|
|
721
719
|
* ```
|
|
@@ -729,8 +727,8 @@ declare namespace JMap {
|
|
|
729
727
|
*
|
|
730
728
|
* @param layerId the JMap layer id
|
|
731
729
|
* @throws if layer not found
|
|
732
|
-
* @example
|
|
733
|
-
*
|
|
730
|
+
* @example
|
|
731
|
+
* ```ts
|
|
734
732
|
* // snap will target the features of the layer having id="36885146-7eed-4071-9f86-8e29c505af91"
|
|
735
733
|
* JMap.Application.Geometry.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
|
|
736
734
|
* ```
|
|
@@ -749,8 +747,8 @@ declare namespace JMap {
|
|
|
749
747
|
*
|
|
750
748
|
* Returns all measures.
|
|
751
749
|
*
|
|
752
|
-
* @example
|
|
753
|
-
*
|
|
750
|
+
* @example
|
|
751
|
+
* ```ts
|
|
754
752
|
* // return currently drawn measures
|
|
755
753
|
* JMap.Application.Measure.getAll()
|
|
756
754
|
* ```
|
|
@@ -763,8 +761,8 @@ declare namespace JMap {
|
|
|
763
761
|
* Returns true if a measure exists for the given id, else false.
|
|
764
762
|
*
|
|
765
763
|
* @throws Error if measureId is not a string or an empty string
|
|
766
|
-
* @example
|
|
767
|
-
*
|
|
764
|
+
* @example
|
|
765
|
+
* ```ts
|
|
768
766
|
* // return true if the measure exists, else false
|
|
769
767
|
* JMap.Application.Measure.existsById("ac57b1bd83ca6d8e0013e4cf9f06847e")
|
|
770
768
|
*
|
|
@@ -783,8 +781,8 @@ declare namespace JMap {
|
|
|
783
781
|
* Returns the measure for the given id.
|
|
784
782
|
*
|
|
785
783
|
* @throws Error if measureId is not a string or an empty string, or if measure is not found
|
|
786
|
-
* @example
|
|
787
|
-
*
|
|
784
|
+
* @example
|
|
785
|
+
* ```ts
|
|
788
786
|
* // return the measure for the given id
|
|
789
787
|
* JMap.Application.Measure.getById("ac57b1bd83ca6d8e0013e4cf9f06847e")
|
|
790
788
|
*
|
|
@@ -802,8 +800,8 @@ declare namespace JMap {
|
|
|
802
800
|
*
|
|
803
801
|
* Returns all "line" measures. Result contains no polygon or circle measures.
|
|
804
802
|
*
|
|
805
|
-
* @example
|
|
806
|
-
*
|
|
803
|
+
* @example
|
|
804
|
+
* ```ts
|
|
807
805
|
* // return all line measures
|
|
808
806
|
* JMap.Application.Measure.getAllLineMeasures()
|
|
809
807
|
* ```
|
|
@@ -815,8 +813,8 @@ declare namespace JMap {
|
|
|
815
813
|
*
|
|
816
814
|
* Returns all "polygon" measures. Result contains no line or circle measures.
|
|
817
815
|
*
|
|
818
|
-
* @example
|
|
819
|
-
*
|
|
816
|
+
* @example
|
|
817
|
+
* ```ts
|
|
820
818
|
* // return all polygon measures
|
|
821
819
|
* JMap.Application.Measure.getAllPolygonMeasures()
|
|
822
820
|
* ```
|
|
@@ -828,8 +826,8 @@ declare namespace JMap {
|
|
|
828
826
|
*
|
|
829
827
|
* Returns all "circle" measures. Result contains no line or polygon measures.
|
|
830
828
|
*
|
|
831
|
-
* @example
|
|
832
|
-
*
|
|
829
|
+
* @example
|
|
830
|
+
* ```ts
|
|
833
831
|
* // return all circle measures
|
|
834
832
|
* JMap.Application.Measure.getAllCircleMeasures()
|
|
835
833
|
* ```
|
|
@@ -841,8 +839,8 @@ declare namespace JMap {
|
|
|
841
839
|
*
|
|
842
840
|
* Resets measures with provided measures.
|
|
843
841
|
*
|
|
844
|
-
* @example
|
|
845
|
-
*
|
|
842
|
+
* @example
|
|
843
|
+
* ```ts
|
|
846
844
|
* // remove all measures
|
|
847
845
|
* JMap.Application.Measure.setAllMeasures([])
|
|
848
846
|
* ```
|
|
@@ -854,8 +852,8 @@ declare namespace JMap {
|
|
|
854
852
|
*
|
|
855
853
|
* Activates a measure type for the drawing measurement tool.
|
|
856
854
|
* @param measureType The new measure type to apply
|
|
857
|
-
* @example
|
|
858
|
-
*
|
|
855
|
+
* @example
|
|
856
|
+
* ```ts
|
|
859
857
|
* // change the measure type to length
|
|
860
858
|
* JMap.Application.Measure.activateMeasureType("length")
|
|
861
859
|
* ```
|
|
@@ -867,8 +865,8 @@ declare namespace JMap {
|
|
|
867
865
|
*
|
|
868
866
|
* Returns the current active measure type.
|
|
869
867
|
*
|
|
870
|
-
* @example
|
|
871
|
-
*
|
|
868
|
+
* @example
|
|
869
|
+
* ```ts
|
|
872
870
|
* // return active mesure type
|
|
873
871
|
* JMap.Application.Measure.getActiveMeasureType([])
|
|
874
872
|
* ```
|
|
@@ -880,8 +878,8 @@ declare namespace JMap {
|
|
|
880
878
|
*
|
|
881
879
|
* Returns the current measure selection.
|
|
882
880
|
*
|
|
883
|
-
* @example
|
|
884
|
-
*
|
|
881
|
+
* @example
|
|
882
|
+
* ```ts
|
|
885
883
|
* // return current measure selection
|
|
886
884
|
* JMap.Application.Measure.getSelectedIds([])
|
|
887
885
|
* ```
|
|
@@ -896,8 +894,8 @@ declare namespace JMap {
|
|
|
896
894
|
* If active, measures can be selected by clicking on the map (then changed or removed).
|
|
897
895
|
*
|
|
898
896
|
* @param isSelectionActive true to activate selection mode, false to deactivate
|
|
899
|
-
* @example
|
|
900
|
-
*
|
|
897
|
+
* @example
|
|
898
|
+
* ```ts
|
|
901
899
|
* // activate selection of measures
|
|
902
900
|
* JMap.Application.Measure.setSelectionActive(true)
|
|
903
901
|
*
|
|
@@ -914,8 +912,8 @@ declare namespace JMap {
|
|
|
914
912
|
*
|
|
915
913
|
* Returns deleted measure count.
|
|
916
914
|
*
|
|
917
|
-
* @example
|
|
918
|
-
*
|
|
915
|
+
* @example
|
|
916
|
+
* ```ts
|
|
919
917
|
* // delete all measures
|
|
920
918
|
* const deletedMeasuresCount = JMap.Application.Measure.deleteAll()
|
|
921
919
|
* ```
|
|
@@ -929,8 +927,8 @@ declare namespace JMap {
|
|
|
929
927
|
*
|
|
930
928
|
* Returns deleted measure count.
|
|
931
929
|
*
|
|
932
|
-
* @example
|
|
933
|
-
*
|
|
930
|
+
* @example
|
|
931
|
+
* ```ts
|
|
934
932
|
* // delete all selected measures
|
|
935
933
|
* const deletedMeasuresCount = JMap.Application.Measure.deleteSelected()
|
|
936
934
|
* ```
|
|
@@ -944,8 +942,8 @@ declare namespace JMap {
|
|
|
944
942
|
*
|
|
945
943
|
* @throws if measure is not found
|
|
946
944
|
* @param measureIds list of measure ids
|
|
947
|
-
* @example
|
|
948
|
-
*
|
|
945
|
+
* @example
|
|
946
|
+
* ```ts
|
|
949
947
|
* // delete measure having id="bc4fc07f2e84eb50f5962d3d41c836cb"
|
|
950
948
|
* const deletedMeasuresCount = JMap.Application.Measure.deleteMeasuresById("bc4fc07f2e84eb50f5962d3d41c836cb")
|
|
951
949
|
* ```
|
|
@@ -959,8 +957,8 @@ declare namespace JMap {
|
|
|
959
957
|
*
|
|
960
958
|
* Returns deleted measure count.
|
|
961
959
|
*
|
|
962
|
-
* @example
|
|
963
|
-
*
|
|
960
|
+
* @example
|
|
961
|
+
* ```ts
|
|
964
962
|
* // delete all line measures (if exist)
|
|
965
963
|
* const deletedMeasuresCount = JMap.Application.Measure.deleteAllLines()
|
|
966
964
|
* ```
|
|
@@ -974,8 +972,8 @@ declare namespace JMap {
|
|
|
974
972
|
*
|
|
975
973
|
* Returns deleted measure count.
|
|
976
974
|
*
|
|
977
|
-
* @example
|
|
978
|
-
*
|
|
975
|
+
* @example
|
|
976
|
+
* ```ts
|
|
979
977
|
* // delete all polygon measures (if exist)
|
|
980
978
|
* const deletedMeasuresCount = JMap.Application.Measure.deleteAllPolygons()
|
|
981
979
|
* ```
|
|
@@ -989,8 +987,8 @@ declare namespace JMap {
|
|
|
989
987
|
*
|
|
990
988
|
* Returns deleted measure count.
|
|
991
989
|
*
|
|
992
|
-
* @example
|
|
993
|
-
*
|
|
990
|
+
* @example
|
|
991
|
+
* ```ts
|
|
994
992
|
* // delete all circle measures (if exist)
|
|
995
993
|
* const deletedMeasuresCount = JMap.Application.Measure.deleteAllCircles()
|
|
996
994
|
* ```
|
|
@@ -1002,8 +1000,8 @@ declare namespace JMap {
|
|
|
1002
1000
|
*
|
|
1003
1001
|
* Returns the current measurement system used by the Measurements Panel
|
|
1004
1002
|
*
|
|
1005
|
-
* @example
|
|
1006
|
-
*
|
|
1003
|
+
* @example
|
|
1004
|
+
* ```ts
|
|
1007
1005
|
* // get the current measurement system
|
|
1008
1006
|
* console.log(JMap.Application.Measure.getMeasurementSystem())
|
|
1009
1007
|
* // "geodetic"
|
|
@@ -1025,8 +1023,8 @@ declare namespace JMap {
|
|
|
1025
1023
|
* 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.
|
|
1026
1024
|
*
|
|
1027
1025
|
* @param measurementSystem "geodetic" (default) or "planar"
|
|
1028
|
-
* @example
|
|
1029
|
-
*
|
|
1026
|
+
* @example
|
|
1027
|
+
* ```ts
|
|
1030
1028
|
* // set the current measurement system to "geodetic"
|
|
1031
1029
|
* JMap.Application.Measure.setMeasurementSystem("geodetic")
|
|
1032
1030
|
* ```
|
|
@@ -1040,8 +1038,8 @@ declare namespace JMap {
|
|
|
1040
1038
|
*
|
|
1041
1039
|
* @param isEnabled true to enable snap mode, false to disable
|
|
1042
1040
|
* @throws if isEnabled is not a boolean
|
|
1043
|
-
* @example
|
|
1044
|
-
*
|
|
1041
|
+
* @example
|
|
1042
|
+
* ```ts
|
|
1045
1043
|
* // enable snap mode
|
|
1046
1044
|
* JMap.Application.Measure.setSnapEnabled(true)
|
|
1047
1045
|
* ```
|
|
@@ -1055,8 +1053,8 @@ declare namespace JMap {
|
|
|
1055
1053
|
*
|
|
1056
1054
|
* @param layerId the JMap layer id
|
|
1057
1055
|
* @throws if layer not found
|
|
1058
|
-
* @example
|
|
1059
|
-
*
|
|
1056
|
+
* @example
|
|
1057
|
+
* ```ts
|
|
1060
1058
|
* // snap will target the features of the layer having id="36885146-7eed-4071-9f86-8e29c505af91"
|
|
1061
1059
|
* JMap.Application.Measure.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
|
|
1062
1060
|
* ```
|
|
@@ -1077,8 +1075,8 @@ declare namespace JMap {
|
|
|
1077
1075
|
*
|
|
1078
1076
|
* This function returns the id of the layer for which the selection is displayed.
|
|
1079
1077
|
*
|
|
1080
|
-
* @example
|
|
1081
|
-
*
|
|
1078
|
+
* @example
|
|
1079
|
+
* ```ts
|
|
1082
1080
|
* // return the layer id of the displayed selection
|
|
1083
1081
|
* JMap.Application.Selection.getDisplayedLayerId()
|
|
1084
1082
|
* ```
|
|
@@ -1093,8 +1091,8 @@ declare namespace JMap {
|
|
|
1093
1091
|
* If layer selection has no selection, hides the layer selection list.
|
|
1094
1092
|
*
|
|
1095
1093
|
* @throws if layer not found for the given layer id
|
|
1096
|
-
* @example
|
|
1097
|
-
*
|
|
1094
|
+
* @example
|
|
1095
|
+
* ```ts
|
|
1098
1096
|
* // display the layer id=2 selection
|
|
1099
1097
|
* JMap.Application.Selection.setDisplayedLayerId(2)
|
|
1100
1098
|
* ```
|
|
@@ -1106,8 +1104,8 @@ declare namespace JMap {
|
|
|
1106
1104
|
*
|
|
1107
1105
|
* Changes the current type of selection
|
|
1108
1106
|
* @param selectionType The new selection type to apply
|
|
1109
|
-
* @example
|
|
1110
|
-
*
|
|
1107
|
+
* @example
|
|
1108
|
+
* ```ts
|
|
1111
1109
|
* // change the selection type to rectangle
|
|
1112
1110
|
* JMap.Application.Selection.activateSelectionType("rectangle")
|
|
1113
1111
|
* ```
|
|
@@ -1119,8 +1117,8 @@ declare namespace JMap {
|
|
|
1119
1117
|
*
|
|
1120
1118
|
* Returns the current active type of selection
|
|
1121
1119
|
*
|
|
1122
|
-
* @example
|
|
1123
|
-
*
|
|
1120
|
+
* @example
|
|
1121
|
+
* ```ts
|
|
1124
1122
|
* // return the current active selection type
|
|
1125
1123
|
* JMap.Application.Selection.getActiveSelectionType()
|
|
1126
1124
|
* ```
|
|
@@ -1132,8 +1130,8 @@ declare namespace JMap {
|
|
|
1132
1130
|
*
|
|
1133
1131
|
* Returns true if the selection data table is diaplayed.
|
|
1134
1132
|
*
|
|
1135
|
-
* @example
|
|
1136
|
-
*
|
|
1133
|
+
* @example
|
|
1134
|
+
* ```ts
|
|
1137
1135
|
* // return true if the selection data table is visible
|
|
1138
1136
|
* JMap.Application.Selection.getTableVisibility()
|
|
1139
1137
|
* ```
|
|
@@ -1145,8 +1143,8 @@ declare namespace JMap {
|
|
|
1145
1143
|
*
|
|
1146
1144
|
* Hides or shows the selection data table.
|
|
1147
1145
|
*
|
|
1148
|
-
* @example
|
|
1149
|
-
*
|
|
1146
|
+
* @example
|
|
1147
|
+
* ```ts
|
|
1150
1148
|
* // make selection data table visible
|
|
1151
1149
|
* JMap.Application.Selection.setTableVisibility(true)
|
|
1152
1150
|
*
|
|
@@ -1161,8 +1159,8 @@ declare namespace JMap {
|
|
|
1161
1159
|
*
|
|
1162
1160
|
* Returns true if the selection table is displayed in an external browser tab.
|
|
1163
1161
|
*
|
|
1164
|
-
* @example
|
|
1165
|
-
*
|
|
1162
|
+
* @example
|
|
1163
|
+
* ```ts
|
|
1166
1164
|
* // returns true if the selection table is displayed in an external browser tab.
|
|
1167
1165
|
* JMap.Application.Selection.isTableDisplayedInTab()
|
|
1168
1166
|
* ```
|
|
@@ -1176,8 +1174,8 @@ declare namespace JMap {
|
|
|
1176
1174
|
*
|
|
1177
1175
|
* If the table is not visible, make it visible.
|
|
1178
1176
|
*
|
|
1179
|
-
* @example
|
|
1180
|
-
*
|
|
1177
|
+
* @example
|
|
1178
|
+
* ```ts
|
|
1181
1179
|
* // displays the selection table in another tab.
|
|
1182
1180
|
* JMap.Application.Selection.openTableInTab()
|
|
1183
1181
|
* ```
|
|
@@ -1193,8 +1191,8 @@ declare namespace JMap {
|
|
|
1193
1191
|
*
|
|
1194
1192
|
* If the table is opened in another tab, close the tab and display the table over the map.
|
|
1195
1193
|
*
|
|
1196
|
-
* @example
|
|
1197
|
-
*
|
|
1194
|
+
* @example
|
|
1195
|
+
* ```ts
|
|
1198
1196
|
* // closes the selection table tab.
|
|
1199
1197
|
* JMap.Application.Selection.closeTableTab()
|
|
1200
1198
|
* ```
|
|
@@ -1207,8 +1205,8 @@ declare namespace JMap {
|
|
|
1207
1205
|
* Unselects all features for a given layer id.
|
|
1208
1206
|
*
|
|
1209
1207
|
* @param layerId the JMap layer id
|
|
1210
|
-
* @example
|
|
1211
|
-
*
|
|
1208
|
+
* @example
|
|
1209
|
+
* ```ts
|
|
1212
1210
|
* // clear the layer id=2 selection
|
|
1213
1211
|
* JMap.Application.Selection.clearSelectionForLayer(2)
|
|
1214
1212
|
* ```
|
|
@@ -1220,7 +1218,8 @@ declare namespace JMap {
|
|
|
1220
1218
|
*
|
|
1221
1219
|
* Clears the current selection
|
|
1222
1220
|
*
|
|
1223
|
-
* @example
|
|
1221
|
+
* @example
|
|
1222
|
+
* ```ts
|
|
1224
1223
|
* // Clear the current selection
|
|
1225
1224
|
* JMap.Application.Selection.clearSelection()
|
|
1226
1225
|
* ```
|
|
@@ -1234,7 +1233,8 @@ declare namespace JMap {
|
|
|
1234
1233
|
*
|
|
1235
1234
|
* @param feature the given feature
|
|
1236
1235
|
* @param selectionType if not provided the method use
|
|
1237
|
-
* @example
|
|
1236
|
+
* @example
|
|
1237
|
+
* ```ts
|
|
1238
1238
|
* // will select all features that intersect the provided line feature
|
|
1239
1239
|
* JMap.Application.Selection.selectFromFeature(lineFeature)
|
|
1240
1240
|
* ```
|
|
@@ -1248,7 +1248,8 @@ declare namespace JMap {
|
|
|
1248
1248
|
*
|
|
1249
1249
|
* If no selection, export an empty file.
|
|
1250
1250
|
*
|
|
1251
|
-
* @example
|
|
1251
|
+
* @example
|
|
1252
|
+
* ```ts
|
|
1252
1253
|
* // download the current selection as an excel file
|
|
1253
1254
|
* JMap.Application.Selection.exportAsExcelFile()
|
|
1254
1255
|
* ```
|
|
@@ -1261,7 +1262,8 @@ declare namespace JMap {
|
|
|
1261
1262
|
* Pans and zooms the map to display the current selection.
|
|
1262
1263
|
*
|
|
1263
1264
|
* @param options optional options
|
|
1264
|
-
* @example
|
|
1265
|
+
* @example
|
|
1266
|
+
* ```ts
|
|
1265
1267
|
* // fit the map to display selected features
|
|
1266
1268
|
* JMap.Application.Selection.fitMapToDisplayLayerSelection()
|
|
1267
1269
|
* ```
|
|
@@ -1287,8 +1289,8 @@ declare namespace JMap {
|
|
|
1287
1289
|
* @throws if project id invalid or project not found
|
|
1288
1290
|
* @param projectId the JMap project id
|
|
1289
1291
|
* @returns the project
|
|
1290
|
-
* @example
|
|
1291
|
-
*
|
|
1292
|
+
* @example
|
|
1293
|
+
* ```ts
|
|
1292
1294
|
* // activate project id=33
|
|
1293
1295
|
* JMap.Application.Project.activateById(33)
|
|
1294
1296
|
* ```
|
|
@@ -1300,8 +1302,8 @@ declare namespace JMap {
|
|
|
1300
1302
|
*
|
|
1301
1303
|
* Displays or hides the project list selection panel.
|
|
1302
1304
|
*
|
|
1303
|
-
* @example
|
|
1304
|
-
*
|
|
1305
|
+
* @example
|
|
1306
|
+
* ```ts
|
|
1305
1307
|
* // display the project list selection panel
|
|
1306
1308
|
* JMap.Application.Project.setSelectionPanelVisibility(true)
|
|
1307
1309
|
* ```
|
|
@@ -1336,8 +1338,8 @@ declare namespace JMap {
|
|
|
1336
1338
|
* diacritical characters insensitive.
|
|
1337
1339
|
*
|
|
1338
1340
|
* @param nameFilter the name filter to apply
|
|
1339
|
-
* @example
|
|
1340
|
-
*
|
|
1341
|
+
* @example
|
|
1342
|
+
* ```ts
|
|
1341
1343
|
* // In the layer panel will display only layers whose name matches "pro" (case-insensitive)
|
|
1342
1344
|
* JMap.Application.Layer.setName("pro")
|
|
1343
1345
|
* ```
|
|
@@ -1355,8 +1357,8 @@ declare namespace JMap {
|
|
|
1355
1357
|
* a) the name filter contains at least 2 characters
|
|
1356
1358
|
* b) one of the layer filters has been added to the filtering configuration
|
|
1357
1359
|
*
|
|
1358
|
-
* @example
|
|
1359
|
-
*
|
|
1360
|
+
* @example
|
|
1361
|
+
* ```ts
|
|
1360
1362
|
* // filter configuration is initially empty
|
|
1361
1363
|
*
|
|
1362
1364
|
* // activate the filters
|
|
@@ -1380,8 +1382,8 @@ declare namespace JMap {
|
|
|
1380
1382
|
* or by calling a JMap Cloud NG API method to activate it.
|
|
1381
1383
|
* See {@link JMap.Application.Layer.Tree.Filter.isApplied} for more details.
|
|
1382
1384
|
*
|
|
1383
|
-
* @example
|
|
1384
|
-
*
|
|
1385
|
+
* @example
|
|
1386
|
+
* ```ts
|
|
1385
1387
|
* // activate the filters
|
|
1386
1388
|
* JMap.Application.Layer.Tree.Filter.setActive(false)
|
|
1387
1389
|
*
|
|
@@ -1401,8 +1403,8 @@ declare namespace JMap {
|
|
|
1401
1403
|
* See {@link JMap.Application.Layer.Tree.Filter.isApplied} for more details
|
|
1402
1404
|
*
|
|
1403
1405
|
* @param active a boolean
|
|
1404
|
-
* @example
|
|
1405
|
-
*
|
|
1406
|
+
* @example
|
|
1407
|
+
* ```ts
|
|
1406
1408
|
* // activate the filters
|
|
1407
1409
|
* JMap.Application.Layer.Tree.Filter.setActive(false)
|
|
1408
1410
|
*
|
|
@@ -1418,8 +1420,8 @@ declare namespace JMap {
|
|
|
1418
1420
|
* Applies the current filter configuration on the map. All layers not matching the filter will be hidden, and only those
|
|
1419
1421
|
* that match the filter will stay visible on the map. If no filter is defined (or appliable), no change is applied on the map.
|
|
1420
1422
|
*
|
|
1421
|
-
* @example
|
|
1422
|
-
*
|
|
1423
|
+
* @example
|
|
1424
|
+
* ```ts
|
|
1423
1425
|
* // Apply the current filter
|
|
1424
1426
|
* JMap.Application.Layer.Tree.Filter.applyToMap()
|
|
1425
1427
|
* ```
|
|
@@ -1432,8 +1434,8 @@ declare namespace JMap {
|
|
|
1432
1434
|
* Tests if the specified filter exists.
|
|
1433
1435
|
*
|
|
1434
1436
|
* @param filterId the filter id
|
|
1435
|
-
* @example
|
|
1436
|
-
*
|
|
1437
|
+
* @example
|
|
1438
|
+
* ```ts
|
|
1437
1439
|
* // create a filter
|
|
1438
1440
|
* JMap.Application.Layer.Tree.Filter.add({
|
|
1439
1441
|
* 1,
|
|
@@ -1455,8 +1457,8 @@ declare namespace JMap {
|
|
|
1455
1457
|
* Tests if at least one filter associated with the specified metadata id exists.
|
|
1456
1458
|
*
|
|
1457
1459
|
* @param metadataId the metadata id
|
|
1458
|
-
* @example
|
|
1459
|
-
*
|
|
1460
|
+
* @example
|
|
1461
|
+
* ```ts
|
|
1460
1462
|
* // filter collection is initially empty
|
|
1461
1463
|
*
|
|
1462
1464
|
* // create a filter
|
|
@@ -1479,8 +1481,8 @@ declare namespace JMap {
|
|
|
1479
1481
|
*
|
|
1480
1482
|
* Returns an object containing the current name filter and an array of all current filters.
|
|
1481
1483
|
*
|
|
1482
|
-
* @example
|
|
1483
|
-
*
|
|
1484
|
+
* @example
|
|
1485
|
+
* ```ts
|
|
1484
1486
|
* // get filters configuration
|
|
1485
1487
|
* console.log(JMap.Application.Layer.Tree.Filter.getAll())
|
|
1486
1488
|
* // {
|
|
@@ -1507,8 +1509,8 @@ declare namespace JMap {
|
|
|
1507
1509
|
* Retrieves the specified filter by id.
|
|
1508
1510
|
*
|
|
1509
1511
|
* @param filterId the filter id
|
|
1510
|
-
* @example
|
|
1511
|
-
*
|
|
1512
|
+
* @example
|
|
1513
|
+
* ```ts
|
|
1512
1514
|
* // get filter id=1
|
|
1513
1515
|
* JMap.Application.Layer.Tree.Filter.getById(1)
|
|
1514
1516
|
* // {"id":1,
|
|
@@ -1530,8 +1532,8 @@ declare namespace JMap {
|
|
|
1530
1532
|
* Adds a filter. The list of available metadata schema items can be retieved by calling {@link JMap.Layer.getMetadataSchema}.
|
|
1531
1533
|
*
|
|
1532
1534
|
* @param filter a JAppAnyLayerFilter object
|
|
1533
|
-
* @example
|
|
1534
|
-
*
|
|
1535
|
+
* @example
|
|
1536
|
+
* ```ts
|
|
1535
1537
|
* // add a filter to the config
|
|
1536
1538
|
* JMap.Application.Layer.Tree.Filter.add({
|
|
1537
1539
|
* 1,
|
|
@@ -1550,8 +1552,8 @@ declare namespace JMap {
|
|
|
1550
1552
|
* Removes the specified filter from the filter configuration.
|
|
1551
1553
|
*
|
|
1552
1554
|
* @param filterId the id of the filter to delete
|
|
1553
|
-
* @example
|
|
1554
|
-
*
|
|
1555
|
+
* @example
|
|
1556
|
+
* ```ts
|
|
1555
1557
|
* // delete filter id=1
|
|
1556
1558
|
* JMap.Application.Layer.Tree.Filter.deleteById(1)
|
|
1557
1559
|
* ```
|
|
@@ -1563,8 +1565,8 @@ declare namespace JMap {
|
|
|
1563
1565
|
*
|
|
1564
1566
|
* Opens the Add Filter dialog box, and activates the Layer panel if it is not already active.
|
|
1565
1567
|
*
|
|
1566
|
-
* @example
|
|
1567
|
-
*
|
|
1568
|
+
* @example
|
|
1569
|
+
* ```ts
|
|
1568
1570
|
* // open Add Filter UI
|
|
1569
1571
|
* JMap.Application.Layer.Tree.Filter.openAddFilterDialog()
|
|
1570
1572
|
* ```
|
|
@@ -1576,8 +1578,8 @@ declare namespace JMap {
|
|
|
1576
1578
|
*
|
|
1577
1579
|
* Closes the Add Filter dialog box (without saving the filter).
|
|
1578
1580
|
*
|
|
1579
|
-
* @example
|
|
1580
|
-
*
|
|
1581
|
+
* @example
|
|
1582
|
+
* ```ts
|
|
1581
1583
|
* // close Add Filter UI
|
|
1582
1584
|
* JMap.Application.Layer.Tree.Filter.closeAddFilterDialog()
|
|
1583
1585
|
* ```
|
|
@@ -1605,8 +1607,8 @@ declare namespace JMap {
|
|
|
1605
1607
|
*
|
|
1606
1608
|
* @throws if layer not found
|
|
1607
1609
|
* @param layerId the JMap layer id
|
|
1608
|
-
* @example
|
|
1609
|
-
*
|
|
1610
|
+
* @example
|
|
1611
|
+
* ```ts
|
|
1610
1612
|
* // opens the edition panel, with the "dynamic-filter" tab activated, for layer id=3.
|
|
1611
1613
|
* JMap.Application.Layer.Edition.DynamicFilter.openPanel(3)
|
|
1612
1614
|
* ```
|
|
@@ -1618,8 +1620,8 @@ declare namespace JMap {
|
|
|
1618
1620
|
*
|
|
1619
1621
|
* If open, closes the edition panel.
|
|
1620
1622
|
*
|
|
1621
|
-
* @example
|
|
1622
|
-
*
|
|
1623
|
+
* @example
|
|
1624
|
+
* ```ts
|
|
1623
1625
|
* // closes the dynamic filter panel if open.
|
|
1624
1626
|
* JMap.Application.Layer.Edition.DynamicFilter.closePanel()
|
|
1625
1627
|
* ```
|
|
@@ -1633,8 +1635,8 @@ declare namespace JMap {
|
|
|
1633
1635
|
*
|
|
1634
1636
|
* @throws if layer not found
|
|
1635
1637
|
* @param layerId the JMap layer id
|
|
1636
|
-
* @example
|
|
1637
|
-
*
|
|
1638
|
+
* @example
|
|
1639
|
+
* ```ts
|
|
1638
1640
|
* // opens the dynamic filter creation dialog for layer id=3
|
|
1639
1641
|
* JMap.Application.Layer.Edition.DynamicFilter.openCreateDialog(3)
|
|
1640
1642
|
* ```
|
|
@@ -1649,8 +1651,8 @@ declare namespace JMap {
|
|
|
1649
1651
|
* @throws if layer or condition not found
|
|
1650
1652
|
* @param layerId the JMap layer id
|
|
1651
1653
|
* @param conditionId the JMap dynamic filter condition id
|
|
1652
|
-
* @example
|
|
1653
|
-
*
|
|
1654
|
+
* @example
|
|
1655
|
+
* ```ts
|
|
1654
1656
|
* // opens the dynamic filter condition creation dialog for layer id=3
|
|
1655
1657
|
* JMap.Application.Layer.Edition.DynamicFilter.openUpdateDialog(3)
|
|
1656
1658
|
* ```
|
|
@@ -1662,8 +1664,8 @@ declare namespace JMap {
|
|
|
1662
1664
|
*
|
|
1663
1665
|
* If open, close the dynamic filter dialog (as well for creation or update).
|
|
1664
1666
|
*
|
|
1665
|
-
* @example
|
|
1666
|
-
*
|
|
1667
|
+
* @example
|
|
1668
|
+
* ```ts
|
|
1667
1669
|
* // closes the edition (any tab) panel if open.
|
|
1668
1670
|
* JMap.Application.Layer.Edition.DynamicFilter.closeDialog()
|
|
1669
1671
|
* ```
|
|
@@ -1684,8 +1686,8 @@ declare namespace JMap {
|
|
|
1684
1686
|
*
|
|
1685
1687
|
* @throws if layer not found
|
|
1686
1688
|
* @param layerId the JMap layer id
|
|
1687
|
-
* @example
|
|
1688
|
-
*
|
|
1689
|
+
* @example
|
|
1690
|
+
* ```ts
|
|
1689
1691
|
* // open the edition panel, with "info" tab activated, for layer id=3.
|
|
1690
1692
|
* JMap.Application.Layer.Edition.Info.openPanel(3)
|
|
1691
1693
|
* ```
|
|
@@ -1697,8 +1699,8 @@ declare namespace JMap {
|
|
|
1697
1699
|
*
|
|
1698
1700
|
* If open, closes the edition panel.
|
|
1699
1701
|
*
|
|
1700
|
-
* @example
|
|
1701
|
-
*
|
|
1702
|
+
* @example
|
|
1703
|
+
* ```ts
|
|
1702
1704
|
* // closes the edition (any tab) panel if open.
|
|
1703
1705
|
* JMap.Application.Layer.Edition.DynamicFilter.closePanel()
|
|
1704
1706
|
* ```
|
|
@@ -1719,8 +1721,8 @@ declare namespace JMap {
|
|
|
1719
1721
|
*
|
|
1720
1722
|
* @throws if layer not found
|
|
1721
1723
|
* @param layerId the JMap layer id
|
|
1722
|
-
* @example
|
|
1723
|
-
*
|
|
1724
|
+
* @example
|
|
1725
|
+
* ```ts
|
|
1724
1726
|
* // opens the edition panel, with "thematics" tab activated, for layer id=3.
|
|
1725
1727
|
* JMap.Application.Layer.Edition.Thematic.openPanel(3)
|
|
1726
1728
|
* ```
|
|
@@ -1732,8 +1734,8 @@ declare namespace JMap {
|
|
|
1732
1734
|
*
|
|
1733
1735
|
* If open, closes the edition panel.
|
|
1734
1736
|
*
|
|
1735
|
-
* @example
|
|
1736
|
-
*
|
|
1737
|
+
* @example
|
|
1738
|
+
* ```ts
|
|
1737
1739
|
* // closes the edition (any tab) panel if open.
|
|
1738
1740
|
* JMap.Application.Layer.Edition.DynamicFilter.closePanel()
|
|
1739
1741
|
* ```
|
|
@@ -1753,8 +1755,8 @@ declare namespace JMap {
|
|
|
1753
1755
|
* @throws If layer is not found or layerId is correspond to a layer group, if activeTab is incorrect
|
|
1754
1756
|
* @param layerId JMap layer id
|
|
1755
1757
|
* @param activeTab the tab to display: "thematics" or "dynamic-filter"
|
|
1756
|
-
* @example
|
|
1757
|
-
*
|
|
1758
|
+
* @example
|
|
1759
|
+
* ```ts
|
|
1758
1760
|
* // edits the layer's id="3" thematics (if layer 3 has at least one thematic set)
|
|
1759
1761
|
* JMap.Application.Layer.Edition.openPanel(3, "thematics")
|
|
1760
1762
|
*
|
|
@@ -1769,8 +1771,8 @@ declare namespace JMap {
|
|
|
1769
1771
|
*
|
|
1770
1772
|
* If layer edition panel is opened, will close it. Will stop edition and show the layer tree panel.
|
|
1771
1773
|
*
|
|
1772
|
-
* @example
|
|
1773
|
-
*
|
|
1774
|
+
* @example
|
|
1775
|
+
* ```ts
|
|
1774
1776
|
* // closes the layer edition panel
|
|
1775
1777
|
* JMap.Application.Layer.Edition.closePanel()
|
|
1776
1778
|
* ```
|
|
@@ -1796,8 +1798,8 @@ declare namespace JMap {
|
|
|
1796
1798
|
*
|
|
1797
1799
|
* Returns the DOM div element id where application UI has been inserted.
|
|
1798
1800
|
*
|
|
1799
|
-
* @example
|
|
1800
|
-
*
|
|
1801
|
+
* @example
|
|
1802
|
+
* ```ts
|
|
1801
1803
|
* // return the dom container id, ex : "jmapcloud-ng-types"
|
|
1802
1804
|
* JMap.Application.UI.Container.getId()
|
|
1803
1805
|
* ```
|
|
@@ -1809,8 +1811,8 @@ declare namespace JMap {
|
|
|
1809
1811
|
*
|
|
1810
1812
|
* Returns the dom container width in pixel.
|
|
1811
1813
|
*
|
|
1812
|
-
* @example
|
|
1813
|
-
*
|
|
1814
|
+
* @example
|
|
1815
|
+
* ```ts
|
|
1814
1816
|
* // return the dom container width, ex : 1230
|
|
1815
1817
|
* JMap.Application.UI.Container.getWidth()
|
|
1816
1818
|
* ```
|
|
@@ -1822,8 +1824,8 @@ declare namespace JMap {
|
|
|
1822
1824
|
*
|
|
1823
1825
|
* Returns the dom container height in pixel.
|
|
1824
1826
|
*
|
|
1825
|
-
* @example
|
|
1826
|
-
*
|
|
1827
|
+
* @example
|
|
1828
|
+
* ```ts
|
|
1827
1829
|
* // return the dom container height, ex : 966
|
|
1828
1830
|
* JMap.Application.UI.Container.getHeight()
|
|
1829
1831
|
* ```
|
|
@@ -1836,8 +1838,8 @@ declare namespace JMap {
|
|
|
1836
1838
|
* Returns a polygon geometry representing the visible coordinates on the map.
|
|
1837
1839
|
* Works fine even if the map is pitched or rotated.
|
|
1838
1840
|
* @throws if map is not loaded
|
|
1839
|
-
* @example
|
|
1840
|
-
*
|
|
1841
|
+
* @example
|
|
1842
|
+
* ```ts
|
|
1841
1843
|
* // returns the polygon geometry representing the visible coordinates on the map.
|
|
1842
1844
|
* // ex :
|
|
1843
1845
|
* // {
|
|
@@ -1866,8 +1868,8 @@ declare namespace JMap {
|
|
|
1866
1868
|
* Sets the application left side panel visibility.
|
|
1867
1869
|
*
|
|
1868
1870
|
* @param isVisible if true, shows the panel, else hides it
|
|
1869
|
-
* @example
|
|
1870
|
-
*
|
|
1871
|
+
* @example
|
|
1872
|
+
* ```ts
|
|
1871
1873
|
* // Show the left side panel
|
|
1872
1874
|
* JMap.Application.UI.Sidepanel.setVisible(true)
|
|
1873
1875
|
*
|
|
@@ -1882,8 +1884,8 @@ declare namespace JMap {
|
|
|
1882
1884
|
*
|
|
1883
1885
|
* Returns true if the JMap Cloud NG main panel on the left is opened.
|
|
1884
1886
|
*
|
|
1885
|
-
* @example
|
|
1886
|
-
*
|
|
1887
|
+
* @example
|
|
1888
|
+
* ```ts
|
|
1887
1889
|
* // returns true if side panel is opened
|
|
1888
1890
|
* JMap.Application.UI.SidePanel.isVisible()
|
|
1889
1891
|
* ```
|
|
@@ -1899,8 +1901,8 @@ declare namespace JMap {
|
|
|
1899
1901
|
*
|
|
1900
1902
|
* If the panel is closed, it will open.
|
|
1901
1903
|
*
|
|
1902
|
-
* @example
|
|
1903
|
-
*
|
|
1904
|
+
* @example
|
|
1905
|
+
* ```ts
|
|
1904
1906
|
* // change the side panel visibility
|
|
1905
1907
|
* JMap.Application.UI.SidePanel.toggleVisibility()
|
|
1906
1908
|
* ```
|
|
@@ -1912,8 +1914,8 @@ declare namespace JMap {
|
|
|
1912
1914
|
*
|
|
1913
1915
|
* Returns the width of the opened side panel in rem.
|
|
1914
1916
|
*
|
|
1915
|
-
* @example
|
|
1916
|
-
*
|
|
1917
|
+
* @example
|
|
1918
|
+
* ```ts
|
|
1917
1919
|
* // returns "28.125rem"
|
|
1918
1920
|
* JMap.Application.UI.SidePanel.getWidthOpenInRem()
|
|
1919
1921
|
* ```
|
|
@@ -1925,8 +1927,8 @@ declare namespace JMap {
|
|
|
1925
1927
|
*
|
|
1926
1928
|
* Returns the width of the opened side panel in pixel.
|
|
1927
1929
|
*
|
|
1928
|
-
* @example
|
|
1929
|
-
*
|
|
1930
|
+
* @example
|
|
1931
|
+
* ```ts
|
|
1930
1932
|
* // returns 450
|
|
1931
1933
|
* JMap.Application.UI.SidePanel.getWidthOpenInPixel()
|
|
1932
1934
|
* ```
|
|
@@ -1938,8 +1940,8 @@ declare namespace JMap {
|
|
|
1938
1940
|
*
|
|
1939
1941
|
* Returns the minimum side panel width.
|
|
1940
1942
|
*
|
|
1941
|
-
* @example
|
|
1942
|
-
*
|
|
1943
|
+
* @example
|
|
1944
|
+
* ```ts
|
|
1943
1945
|
* // returns the minimum side panel width
|
|
1944
1946
|
* JMap.Application.UI.SidePanel.getMinimumWidthOpenInPixel()
|
|
1945
1947
|
* ```
|
|
@@ -1952,9 +1954,9 @@ declare namespace JMap {
|
|
|
1952
1954
|
* Returns the minimum side panel width.
|
|
1953
1955
|
*
|
|
1954
1956
|
* @throws if new width is not a number, or lower than minimum width
|
|
1955
|
-
* @param width
|
|
1956
|
-
* @example
|
|
1957
|
-
*
|
|
1957
|
+
* @param width new panel width in pixel
|
|
1958
|
+
* @example
|
|
1959
|
+
* ```ts
|
|
1958
1960
|
* const newWidth = 500
|
|
1959
1961
|
* if (JMap.Application.UI.SidePanel.getMinimumWidthOpenInPixel() <= newWidth) {
|
|
1960
1962
|
* // returns the minimum side panel width
|
|
@@ -1969,8 +1971,8 @@ declare namespace JMap {
|
|
|
1969
1971
|
*
|
|
1970
1972
|
* Returns the width of the closed side panel in rem.
|
|
1971
1973
|
*
|
|
1972
|
-
* @example
|
|
1973
|
-
*
|
|
1974
|
+
* @example
|
|
1975
|
+
* ```ts
|
|
1974
1976
|
* // returns "3.75rem"
|
|
1975
1977
|
* JMap.Application.UI.SidePanel.getWidthCloseInRem()
|
|
1976
1978
|
* ```
|
|
@@ -1982,8 +1984,8 @@ declare namespace JMap {
|
|
|
1982
1984
|
*
|
|
1983
1985
|
* Returns the width of the closed side panel in pixel.
|
|
1984
1986
|
*
|
|
1985
|
-
* @example
|
|
1986
|
-
*
|
|
1987
|
+
* @example
|
|
1988
|
+
* ```ts
|
|
1987
1989
|
* // returns 60
|
|
1988
1990
|
* JMap.Application.UI.SidePanel.getWidthCloseInPixel()
|
|
1989
1991
|
* ```
|
|
@@ -1995,8 +1997,8 @@ declare namespace JMap {
|
|
|
1995
1997
|
*
|
|
1996
1998
|
* Returns the width of the main panel (side panel width minus menu width) in rem.
|
|
1997
1999
|
*
|
|
1998
|
-
* @example
|
|
1999
|
-
*
|
|
2000
|
+
* @example
|
|
2001
|
+
* ```ts
|
|
2000
2002
|
* // returns "24.375rem"
|
|
2001
2003
|
* JMap.Application.UI.SidePanel.getMainPanelWidthInRem()
|
|
2002
2004
|
* ```
|
|
@@ -2008,8 +2010,8 @@ declare namespace JMap {
|
|
|
2008
2010
|
*
|
|
2009
2011
|
* Returns the width of the main panel (side panel width minus menu width) in pixel.
|
|
2010
2012
|
*
|
|
2011
|
-
* @example
|
|
2012
|
-
*
|
|
2013
|
+
* @example
|
|
2014
|
+
* ```ts
|
|
2013
2015
|
* // returns 390
|
|
2014
2016
|
* JMap.Application.UI.SidePanel.getMainPanelWidthInPixel()
|
|
2015
2017
|
* ```
|
|
@@ -2021,8 +2023,8 @@ declare namespace JMap {
|
|
|
2021
2023
|
*
|
|
2022
2024
|
* Returns the min height of the Panel header section (where the project name is displayed) in rem.
|
|
2023
2025
|
*
|
|
2024
|
-
* @example
|
|
2025
|
-
*
|
|
2026
|
+
* @example
|
|
2027
|
+
* ```ts
|
|
2026
2028
|
* // returns "5rem"
|
|
2027
2029
|
* JMap.Application.UI.SidePanel.getHeaderMinHeightInRem()
|
|
2028
2030
|
* ```
|
|
@@ -2034,8 +2036,8 @@ declare namespace JMap {
|
|
|
2034
2036
|
*
|
|
2035
2037
|
* Returns the min height of the Panel header section (where the project name is displayed) in pixels.
|
|
2036
2038
|
*
|
|
2037
|
-
* @example
|
|
2038
|
-
*
|
|
2039
|
+
* @example
|
|
2040
|
+
* ```ts
|
|
2039
2041
|
* // returns 80
|
|
2040
2042
|
* JMap.Application.UI.SidePanel.getHeaderMinHeightInPixel()
|
|
2041
2043
|
* ```
|
|
@@ -2047,8 +2049,8 @@ declare namespace JMap {
|
|
|
2047
2049
|
*
|
|
2048
2050
|
* Returns the min height of the Panel title section (where the panel name is displayed) in rem.
|
|
2049
2051
|
*
|
|
2050
|
-
* @example
|
|
2051
|
-
*
|
|
2052
|
+
* @example
|
|
2053
|
+
* ```ts
|
|
2052
2054
|
* // returns "4rem"
|
|
2053
2055
|
* JMap.Application.UI.SidePanel.getTitleMinHeightInRem()
|
|
2054
2056
|
* ```
|
|
@@ -2060,8 +2062,8 @@ declare namespace JMap {
|
|
|
2060
2062
|
*
|
|
2061
2063
|
* Returns the min height of the Panel title section (where the panel name is displayed) in pixels.
|
|
2062
2064
|
*
|
|
2063
|
-
* @example
|
|
2064
|
-
*
|
|
2065
|
+
* @example
|
|
2066
|
+
* ```ts
|
|
2065
2067
|
* // returns 64
|
|
2066
2068
|
* JMap.Application.UI.SidePanel.getTitleMinHeightInPixel()
|
|
2067
2069
|
* ```
|
|
@@ -2080,8 +2082,8 @@ declare namespace JMap {
|
|
|
2080
2082
|
*
|
|
2081
2083
|
* Returns true if the theme is currently dark.
|
|
2082
2084
|
*
|
|
2083
|
-
* @example
|
|
2084
|
-
*
|
|
2085
|
+
* @example
|
|
2086
|
+
* ```ts
|
|
2085
2087
|
* // true or false
|
|
2086
2088
|
* JMap.Application.UI.Theme.isDark()
|
|
2087
2089
|
* ```
|
|
@@ -2094,8 +2096,8 @@ declare namespace JMap {
|
|
|
2094
2096
|
* Changes the UI color theme in dark or light.
|
|
2095
2097
|
*
|
|
2096
2098
|
* @param isDark if true make the theme dark, else light
|
|
2097
|
-
* @example
|
|
2098
|
-
*
|
|
2099
|
+
* @example
|
|
2100
|
+
* ```ts
|
|
2099
2101
|
* // make the theme dark
|
|
2100
2102
|
* JMap.Application.UI.Theme.setDark()
|
|
2101
2103
|
*
|
|
@@ -2122,8 +2124,8 @@ declare namespace JMap {
|
|
|
2122
2124
|
* Displays or hides the scale control widget.
|
|
2123
2125
|
*
|
|
2124
2126
|
* @param isVisible true to display, false to hide
|
|
2125
|
-
* @example
|
|
2126
|
-
*
|
|
2127
|
+
* @example
|
|
2128
|
+
* ```ts
|
|
2127
2129
|
* // Display the scale
|
|
2128
2130
|
* JMap.Application.Print.setScaleControlVisibility(true)
|
|
2129
2131
|
*
|
|
@@ -2138,8 +2140,8 @@ declare namespace JMap {
|
|
|
2138
2140
|
*
|
|
2139
2141
|
* Returns true if the scale control widget is visible, else false.
|
|
2140
2142
|
*
|
|
2141
|
-
* @example
|
|
2142
|
-
*
|
|
2143
|
+
* @example
|
|
2144
|
+
* ```ts
|
|
2143
2145
|
* // true if the scale controle widget is displayed
|
|
2144
2146
|
* JMap.Application.Print.isScaleControlVisible()
|
|
2145
2147
|
* ```
|
|
@@ -2155,8 +2157,8 @@ declare namespace JMap {
|
|
|
2155
2157
|
*
|
|
2156
2158
|
* @throws if title is not a string
|
|
2157
2159
|
* @param title The title displayed in the bottom of the print layout
|
|
2158
|
-
* @example
|
|
2159
|
-
*
|
|
2160
|
+
* @example
|
|
2161
|
+
* ```ts
|
|
2160
2162
|
* // set title
|
|
2161
2163
|
* JMap.Application.Print.setPageTitle("My custom title")
|
|
2162
2164
|
* ```
|
|
@@ -2168,8 +2170,8 @@ declare namespace JMap {
|
|
|
2168
2170
|
*
|
|
2169
2171
|
* Returns the title displayed in the bottom of the print layout.
|
|
2170
2172
|
*
|
|
2171
|
-
* @example
|
|
2172
|
-
*
|
|
2173
|
+
* @example
|
|
2174
|
+
* ```ts
|
|
2173
2175
|
* // returns the displayed title
|
|
2174
2176
|
* JMap.Application.Print.getPageTitle()
|
|
2175
2177
|
* ```
|
|
@@ -2183,8 +2185,8 @@ declare namespace JMap {
|
|
|
2183
2185
|
*
|
|
2184
2186
|
* @throws if subTitle is not a string
|
|
2185
2187
|
* @param subTitle The subtitle displayed in the bottom of the print layout
|
|
2186
|
-
* @example
|
|
2187
|
-
*
|
|
2188
|
+
* @example
|
|
2189
|
+
* ```ts
|
|
2188
2190
|
* // set subtitle
|
|
2189
2191
|
* JMap.Application.Print.setPageSubTitle("My custom subtitle")
|
|
2190
2192
|
* ```
|
|
@@ -2196,8 +2198,8 @@ declare namespace JMap {
|
|
|
2196
2198
|
*
|
|
2197
2199
|
* Returns the subtitle displayed in the bottom of the print layout.
|
|
2198
2200
|
*
|
|
2199
|
-
* @example
|
|
2200
|
-
*
|
|
2201
|
+
* @example
|
|
2202
|
+
* ```ts
|
|
2201
2203
|
* // returns the displayed subtitle
|
|
2202
2204
|
* JMap.Application.Print.getPageSubTitle()
|
|
2203
2205
|
* ```
|
|
@@ -2209,8 +2211,8 @@ declare namespace JMap {
|
|
|
2209
2211
|
*
|
|
2210
2212
|
* Returns true if the date is displayed in the bottom of the print layout.
|
|
2211
2213
|
*
|
|
2212
|
-
* @example
|
|
2213
|
-
*
|
|
2214
|
+
* @example
|
|
2215
|
+
* ```ts
|
|
2214
2216
|
* // returns true if the date is visible
|
|
2215
2217
|
* JMap.Application.Print.isDateVisibile()
|
|
2216
2218
|
* ```
|
|
@@ -2223,8 +2225,8 @@ declare namespace JMap {
|
|
|
2223
2225
|
* Sets the date visible or hidden in the bottom of the print layout.
|
|
2224
2226
|
*
|
|
2225
2227
|
* @param isVisible true to display, false to hide
|
|
2226
|
-
* @example
|
|
2227
|
-
*
|
|
2228
|
+
* @example
|
|
2229
|
+
* ```ts
|
|
2228
2230
|
* // Hide the date
|
|
2229
2231
|
* JMap.Application.Print.setDateVisibility(false)
|
|
2230
2232
|
*
|
|
@@ -2239,8 +2241,8 @@ declare namespace JMap {
|
|
|
2239
2241
|
*
|
|
2240
2242
|
* Returns true if the north arrow is displayed in the bottom of the print layout.
|
|
2241
2243
|
*
|
|
2242
|
-
* @example
|
|
2243
|
-
*
|
|
2244
|
+
* @example
|
|
2245
|
+
* ```ts
|
|
2244
2246
|
* // returns true if the north arrow is visible
|
|
2245
2247
|
* JMap.Application.Print.isNorthArrowVisible()
|
|
2246
2248
|
* ```
|
|
@@ -2253,8 +2255,8 @@ declare namespace JMap {
|
|
|
2253
2255
|
* Sets the north arrow visible or hidden in the bottom of the print layout.
|
|
2254
2256
|
*
|
|
2255
2257
|
* @param isVisible true to display, false to hide
|
|
2256
|
-
* @example
|
|
2257
|
-
*
|
|
2258
|
+
* @example
|
|
2259
|
+
* ```ts
|
|
2258
2260
|
* // Hide the north arrow
|
|
2259
2261
|
* JMap.Application.Print.setNorthArrowVisibility(false)
|
|
2260
2262
|
*
|
|
@@ -2272,8 +2274,8 @@ declare namespace JMap {
|
|
|
2272
2274
|
* Different sizes are available: "letter" | "legal" | "a3" | "a4".
|
|
2273
2275
|
*
|
|
2274
2276
|
* @deprecated will be removed in the futur
|
|
2275
|
-
* @example
|
|
2276
|
-
*
|
|
2277
|
+
* @example
|
|
2278
|
+
* ```ts
|
|
2277
2279
|
* // returns all available paper formats
|
|
2278
2280
|
* JMap.Application.Print.getAllPaperFormats()
|
|
2279
2281
|
* ```
|
|
@@ -2289,9 +2291,9 @@ declare namespace JMap {
|
|
|
2289
2291
|
*
|
|
2290
2292
|
* @deprecated will be removed in the futur
|
|
2291
2293
|
* @throws if format is incorrect
|
|
2292
|
-
* @param the paper format object or a {@link JAPP_PRINT_PAPER_SIZES}
|
|
2293
|
-
* @example
|
|
2294
|
-
*
|
|
2294
|
+
* @param format the paper format object or a {@link JAPP_PRINT_PAPER_SIZES}
|
|
2295
|
+
* @example
|
|
2296
|
+
* ```ts
|
|
2295
2297
|
* // set the letter paper format
|
|
2296
2298
|
* JMap.Application.Print.setPaperFormat("letter")
|
|
2297
2299
|
* ```
|
|
@@ -2304,8 +2306,8 @@ declare namespace JMap {
|
|
|
2304
2306
|
* Returns the active paper format.
|
|
2305
2307
|
*
|
|
2306
2308
|
* @deprecated will be removed in the futur
|
|
2307
|
-
* @example
|
|
2308
|
-
*
|
|
2309
|
+
* @example
|
|
2310
|
+
* ```ts
|
|
2309
2311
|
* // returns active paper format
|
|
2310
2312
|
* JMap.Application.Print.getPaperFormat()
|
|
2311
2313
|
* ```
|
|
@@ -2317,8 +2319,8 @@ declare namespace JMap {
|
|
|
2317
2319
|
*
|
|
2318
2320
|
* Returns true if the print layout is portrait, else false (landscape).
|
|
2319
2321
|
*
|
|
2320
|
-
* @example
|
|
2321
|
-
*
|
|
2322
|
+
* @example
|
|
2323
|
+
* ```ts
|
|
2322
2324
|
* // returns true if the print layout is portrait, else false (landscape)
|
|
2323
2325
|
* JMap.Application.Print.isOrientationPortrait()
|
|
2324
2326
|
* ```
|
|
@@ -2332,8 +2334,8 @@ declare namespace JMap {
|
|
|
2332
2334
|
*
|
|
2333
2335
|
* @throws if isPortrait is not a boolean
|
|
2334
2336
|
* @param isPortrait true to display as portrait, false as landscape
|
|
2335
|
-
* @example
|
|
2336
|
-
*
|
|
2337
|
+
* @example
|
|
2338
|
+
* ```ts
|
|
2337
2339
|
* // set the layout as portrait
|
|
2338
2340
|
* JMap.Application.Print.setOrientation(true)
|
|
2339
2341
|
*
|
|
@@ -2350,8 +2352,8 @@ declare namespace JMap {
|
|
|
2350
2352
|
*
|
|
2351
2353
|
* One of the following: "png" | "jpeg" | "pdf"
|
|
2352
2354
|
*
|
|
2353
|
-
* @example
|
|
2354
|
-
*
|
|
2355
|
+
* @example
|
|
2356
|
+
* ```ts
|
|
2355
2357
|
* // returns "png", "jpeg", or "pdf"
|
|
2356
2358
|
* JMap.Application.Print.getFileType()
|
|
2357
2359
|
* ```
|
|
@@ -2365,8 +2367,8 @@ declare namespace JMap {
|
|
|
2365
2367
|
*
|
|
2366
2368
|
* @throws if fileType is not correct
|
|
2367
2369
|
* @param fileType "png", "jpeg", or "pdf"
|
|
2368
|
-
* @example
|
|
2369
|
-
*
|
|
2370
|
+
* @example
|
|
2371
|
+
* ```ts
|
|
2370
2372
|
* // set the layout as portrait
|
|
2371
2373
|
* JMap.Application.Print.setFileType("pdf")
|
|
2372
2374
|
* ```
|
|
@@ -2380,8 +2382,8 @@ declare namespace JMap {
|
|
|
2380
2382
|
*
|
|
2381
2383
|
* @throws if isHiResolution is not a boolean
|
|
2382
2384
|
* @param isHiResolution true or false
|
|
2383
|
-
* @example
|
|
2384
|
-
*
|
|
2385
|
+
* @example
|
|
2386
|
+
* ```ts
|
|
2385
2387
|
* // set export mode to hi resolution
|
|
2386
2388
|
* JMap.Application.Print.setHiResolution(true)
|
|
2387
2389
|
* ```
|
|
@@ -2393,8 +2395,8 @@ declare namespace JMap {
|
|
|
2393
2395
|
*
|
|
2394
2396
|
* Returns true if the map export is set to hi resolution, false otherwise.
|
|
2395
2397
|
*
|
|
2396
|
-
* @example
|
|
2397
|
-
*
|
|
2398
|
+
* @example
|
|
2399
|
+
* ```ts
|
|
2398
2400
|
* // get export resolution
|
|
2399
2401
|
* JMap.Application.Print.getHiResolution()
|
|
2400
2402
|
* // true
|
|
@@ -2407,8 +2409,8 @@ declare namespace JMap {
|
|
|
2407
2409
|
*
|
|
2408
2410
|
* Builds print image and launches downwnload of the file
|
|
2409
2411
|
*
|
|
2410
|
-
* @example
|
|
2411
|
-
*
|
|
2412
|
+
* @example
|
|
2413
|
+
* ```ts
|
|
2412
2414
|
* // build print image and launch downwnload of the file
|
|
2413
2415
|
* JMap.Application.Print.takeCapture()
|
|
2414
2416
|
* ```
|
|
@@ -2431,8 +2433,8 @@ declare namespace JMap {
|
|
|
2431
2433
|
*
|
|
2432
2434
|
* @param groupId the query group id
|
|
2433
2435
|
* @param queryId the query id
|
|
2434
|
-
* @example
|
|
2435
|
-
*
|
|
2436
|
+
* @example
|
|
2437
|
+
* ```ts
|
|
2436
2438
|
* // activate query id=43 on group id=23
|
|
2437
2439
|
* JMap.Application.Print.activateQuery(23, 43)
|
|
2438
2440
|
* ```
|
|
@@ -2446,8 +2448,8 @@ declare namespace JMap {
|
|
|
2446
2448
|
*
|
|
2447
2449
|
* If a query form is active (= its form is displayed), hidea it and returns to the query list.
|
|
2448
2450
|
*
|
|
2449
|
-
* @example
|
|
2450
|
-
*
|
|
2451
|
+
* @example
|
|
2452
|
+
* ```ts
|
|
2451
2453
|
* // if a query form is displayed, hide it and return to the query list.
|
|
2452
2454
|
* JMap.Application.Print.deactivateQuery()
|
|
2453
2455
|
* ```
|
|
@@ -2461,8 +2463,8 @@ declare namespace JMap {
|
|
|
2461
2463
|
*
|
|
2462
2464
|
* If there is no active form, warns in the console and returns an empty object {}.
|
|
2463
2465
|
*
|
|
2464
|
-
* @example
|
|
2465
|
-
*
|
|
2466
|
+
* @example
|
|
2467
|
+
* ```ts
|
|
2466
2468
|
* // returns the current query form data
|
|
2467
2469
|
* JMap.Application.Print.getDefaultData()
|
|
2468
2470
|
* ```
|
|
@@ -2476,8 +2478,8 @@ declare namespace JMap {
|
|
|
2476
2478
|
*
|
|
2477
2479
|
* @throws if no query is active
|
|
2478
2480
|
* @param values the form data, depends on the form
|
|
2479
|
-
* @example
|
|
2480
|
-
*
|
|
2481
|
+
* @example
|
|
2482
|
+
* ```ts
|
|
2481
2483
|
* // set the current query form data
|
|
2482
2484
|
* JMap.Application.Print.setDefaultData({
|
|
2483
2485
|
* $param1: "black",
|
|
@@ -2494,8 +2496,8 @@ declare namespace JMap {
|
|
|
2494
2496
|
*
|
|
2495
2497
|
* If there is no active form, does nothing.
|
|
2496
2498
|
*
|
|
2497
|
-
* @example
|
|
2498
|
-
*
|
|
2499
|
+
* @example
|
|
2500
|
+
* ```ts
|
|
2499
2501
|
* // clear the current query form data
|
|
2500
2502
|
* JMap.Application.Print.clearDefaultData()
|
|
2501
2503
|
* ```
|
|
@@ -2511,8 +2513,8 @@ declare namespace JMap {
|
|
|
2511
2513
|
*
|
|
2512
2514
|
* @throws if isVisibleInDialog is not a boolean
|
|
2513
2515
|
* @param isVisibleInDialog true in modal window, false in left panel
|
|
2514
|
-
* @example
|
|
2515
|
-
*
|
|
2516
|
+
* @example
|
|
2517
|
+
* ```ts
|
|
2516
2518
|
* // display the current form in a modal window
|
|
2517
2519
|
* JMap.Application.Print.displayInDialog(true)
|
|
2518
2520
|
*
|
|
@@ -2536,9 +2538,9 @@ declare namespace JMap {
|
|
|
2536
2538
|
* If no feature is found, the Promise rejects with a human readable error in the current user's locale.
|
|
2537
2539
|
*
|
|
2538
2540
|
* @throws if no query is active
|
|
2539
|
-
* @param
|
|
2540
|
-
* @example
|
|
2541
|
-
*
|
|
2541
|
+
* @param values the form data, depends on the form
|
|
2542
|
+
* @example
|
|
2543
|
+
* ```ts
|
|
2542
2544
|
* // display the current form in a modal window
|
|
2543
2545
|
* JMap.Application.Print
|
|
2544
2546
|
* .processQuery({
|
|
@@ -2602,8 +2604,8 @@ declare namespace JMap {
|
|
|
2602
2604
|
*
|
|
2603
2605
|
* @param listenerId Your listener id (must be unique)
|
|
2604
2606
|
* @param fn Your listener function
|
|
2605
|
-
* @example
|
|
2606
|
-
*
|
|
2607
|
+
* @example
|
|
2608
|
+
* ```ts
|
|
2607
2609
|
* // log a message in the console once the application is loaded
|
|
2608
2610
|
* JMap.Application.Event.Main.on.appReady(
|
|
2609
2611
|
* "custom-app-ready",
|
|
@@ -2630,8 +2632,8 @@ declare namespace JMap {
|
|
|
2630
2632
|
* If the listener is inactive, it will be reactivated and will be called again ...
|
|
2631
2633
|
*
|
|
2632
2634
|
* @param listenerId The listener id
|
|
2633
|
-
* @example
|
|
2634
|
-
*
|
|
2635
|
+
* @example
|
|
2636
|
+
* ```ts
|
|
2635
2637
|
* // activate the listener "my-main-listener"
|
|
2636
2638
|
* JMap.Application.Event.Main.activate("my-main-listener")
|
|
2637
2639
|
* ```
|
|
@@ -2648,8 +2650,8 @@ declare namespace JMap {
|
|
|
2648
2650
|
* If the listener is active, it will be deactivated and will be ignored ...
|
|
2649
2651
|
*
|
|
2650
2652
|
* @param listenerId The listener id
|
|
2651
|
-
* @example
|
|
2652
|
-
*
|
|
2653
|
+
* @example
|
|
2654
|
+
* ```ts
|
|
2653
2655
|
* // deactivate the listener "my-main-listener"
|
|
2654
2656
|
* JMap.Application.Event.Main.deactivate("my-main-listener")
|
|
2655
2657
|
* ```
|
|
@@ -2666,8 +2668,8 @@ declare namespace JMap {
|
|
|
2666
2668
|
* Removes the listener from JMap Cloud NG. The listener is deleted and never called again after that.
|
|
2667
2669
|
*
|
|
2668
2670
|
* @param listenerId The listener id
|
|
2669
|
-
* @example
|
|
2670
|
-
*
|
|
2671
|
+
* @example
|
|
2672
|
+
* ```ts
|
|
2671
2673
|
* // remove the listener "my-main-listener"
|
|
2672
2674
|
* JMap.Application.Event.Main.remove("my-main-listener")
|
|
2673
2675
|
* ```
|
|
@@ -2698,8 +2700,8 @@ declare namespace JMap {
|
|
|
2698
2700
|
*
|
|
2699
2701
|
* @param listenerId Your listener id (must be unique)
|
|
2700
2702
|
* @param fn Your listener function
|
|
2701
|
-
* @example
|
|
2702
|
-
*
|
|
2703
|
+
* @example
|
|
2704
|
+
* ```ts
|
|
2703
2705
|
* // Triggered when a user double clicks on a layer name
|
|
2704
2706
|
* JMap.Application.Event.Layer.on.doubleClick("my-layer-double-click-listener", params => {
|
|
2705
2707
|
* const layer = params.layer
|
|
@@ -2725,8 +2727,8 @@ declare namespace JMap {
|
|
|
2725
2727
|
* If the listener is inactive, it will be reactivated and will be called again ...
|
|
2726
2728
|
*
|
|
2727
2729
|
* @param listenerId The listener id
|
|
2728
|
-
* @example
|
|
2729
|
-
*
|
|
2730
|
+
* @example
|
|
2731
|
+
* ```ts
|
|
2730
2732
|
* // activate the listener "my-layer-listener"
|
|
2731
2733
|
* JMap.Application.Event.Layer.activate("my-layer-listener")
|
|
2732
2734
|
* ```
|
|
@@ -2743,8 +2745,8 @@ declare namespace JMap {
|
|
|
2743
2745
|
* If the listener is active, it will be deactivated and will be ignored ...
|
|
2744
2746
|
*
|
|
2745
2747
|
* @param listenerId The listener id
|
|
2746
|
-
* @example
|
|
2747
|
-
*
|
|
2748
|
+
* @example
|
|
2749
|
+
* ```ts
|
|
2748
2750
|
* // deactivate the listener "my-layer-listener"
|
|
2749
2751
|
* JMap.Application.Event.Layer.deactivate("my-layer-listener")
|
|
2750
2752
|
* ```
|
|
@@ -2761,8 +2763,8 @@ declare namespace JMap {
|
|
|
2761
2763
|
* Removes the listener from JMap Cloud NG. The listener is deleted and never called again after that.
|
|
2762
2764
|
*
|
|
2763
2765
|
* @param listenerId The listener id
|
|
2764
|
-
* @example
|
|
2765
|
-
*
|
|
2766
|
+
* @example
|
|
2767
|
+
* ```ts
|
|
2766
2768
|
* // remove the listener "my-layer-listener"
|
|
2767
2769
|
* JMap.Application.Event.Layer.remove("my-layer-listener")
|
|
2768
2770
|
* ```
|
|
@@ -2793,8 +2795,8 @@ declare namespace JMap {
|
|
|
2793
2795
|
*
|
|
2794
2796
|
* @param listenerId Your listener id (must be unique)
|
|
2795
2797
|
* @param fn Your listener function
|
|
2796
|
-
* @example
|
|
2797
|
-
*
|
|
2798
|
+
* @example
|
|
2799
|
+
* ```ts
|
|
2798
2800
|
* // Triggered when a user register a new extension
|
|
2799
2801
|
* JMap.Application.Event.Extension.on.registration("my-extension-listener", params => {
|
|
2800
2802
|
* const extensionId = params.extensionId
|
|
@@ -2814,8 +2816,8 @@ declare namespace JMap {
|
|
|
2814
2816
|
* If the listener is inactive, it will be reactivated and will be called again ...
|
|
2815
2817
|
*
|
|
2816
2818
|
* @param listenerId The listener id
|
|
2817
|
-
* @example
|
|
2818
|
-
*
|
|
2819
|
+
* @example
|
|
2820
|
+
* ```ts
|
|
2819
2821
|
* // activate the listener "my-extension-listener"
|
|
2820
2822
|
* JMap.Application.Event.Extension.activate("my-extension-listener")
|
|
2821
2823
|
* ```
|
|
@@ -2832,8 +2834,8 @@ declare namespace JMap {
|
|
|
2832
2834
|
* If the listener is active, it will be deactivated and will be ignored ...
|
|
2833
2835
|
*
|
|
2834
2836
|
* @param listenerId The listener id
|
|
2835
|
-
* @example
|
|
2836
|
-
*
|
|
2837
|
+
* @example
|
|
2838
|
+
* ```ts
|
|
2837
2839
|
* // deactivate the listener "my-extension-listener"
|
|
2838
2840
|
* JMap.Application.Event.Extension.deactivate("my-extension-listener")
|
|
2839
2841
|
* ```
|
|
@@ -2850,8 +2852,8 @@ declare namespace JMap {
|
|
|
2850
2852
|
* Removes the listener from JMap Cloud NG. The listener is deleted and never called again after that.
|
|
2851
2853
|
*
|
|
2852
2854
|
* @param listenerId The listener id
|
|
2853
|
-
* @example
|
|
2854
|
-
*
|
|
2855
|
+
* @example
|
|
2856
|
+
* ```ts
|
|
2855
2857
|
* // remove the listener "my-extension-listener"
|
|
2856
2858
|
* JMap.Application.Event.Extension.remove("my-extension-listener")
|
|
2857
2859
|
* ```
|
|
@@ -2880,8 +2882,8 @@ declare namespace JMap {
|
|
|
2880
2882
|
*
|
|
2881
2883
|
* @param listenerId Your listener id (must be unique)
|
|
2882
2884
|
* @param fn Your listener function
|
|
2883
|
-
* @example
|
|
2884
|
-
*
|
|
2885
|
+
* @example
|
|
2886
|
+
* ```ts
|
|
2885
2887
|
* // log a message in the console when the side panel is closed or opened
|
|
2886
2888
|
* JMap.Application.Event.UI.on.sidePanelVisibilityChanged(
|
|
2887
2889
|
* "custom-side-panel-visibility-changed",
|
|
@@ -2901,8 +2903,8 @@ declare namespace JMap {
|
|
|
2901
2903
|
*
|
|
2902
2904
|
* @param listenerId Your listener id (must be unique)
|
|
2903
2905
|
* @param fn Your listener function
|
|
2904
|
-
* @example
|
|
2905
|
-
*
|
|
2906
|
+
* @example
|
|
2907
|
+
* ```ts
|
|
2906
2908
|
* // log a message in the console when the side panel width changes
|
|
2907
2909
|
* JMap.Application.Event.UI.on.sidePanelWidthChanged(
|
|
2908
2910
|
* "custom-side-panel-width-changed",
|
|
@@ -2926,8 +2928,8 @@ declare namespace JMap {
|
|
|
2926
2928
|
* If the listener is inactive, it will be reactivated and will be called again ...
|
|
2927
2929
|
*
|
|
2928
2930
|
* @param listenerId The listener id
|
|
2929
|
-
* @example
|
|
2930
|
-
*
|
|
2931
|
+
* @example
|
|
2932
|
+
* ```ts
|
|
2931
2933
|
* // activate the listener "my-ui-listener"
|
|
2932
2934
|
* JMap.Application.Event.UI.activate("my-ui-listener")
|
|
2933
2935
|
* ```
|
|
@@ -2944,8 +2946,8 @@ declare namespace JMap {
|
|
|
2944
2946
|
* If the listener is active, it will be deactivated and will be ignored ...
|
|
2945
2947
|
*
|
|
2946
2948
|
* @param listenerId The listener id
|
|
2947
|
-
* @example
|
|
2948
|
-
*
|
|
2949
|
+
* @example
|
|
2950
|
+
* ```ts
|
|
2949
2951
|
* // deactivate the listener "my-ui-listener"
|
|
2950
2952
|
* JMap.Application.Event.UI.deactivate("my-ui-listener")
|
|
2951
2953
|
* ```
|
|
@@ -2962,8 +2964,8 @@ declare namespace JMap {
|
|
|
2962
2964
|
* Removes the listener from JMap Cloud NG. The listener is deleted and never called again after that.
|
|
2963
2965
|
*
|
|
2964
2966
|
* @param listenerId The listener id
|
|
2965
|
-
* @example
|
|
2966
|
-
*
|
|
2967
|
+
* @example
|
|
2968
|
+
* ```ts
|
|
2967
2969
|
* // remove the listener "my-ui-listener"
|
|
2968
2970
|
* JMap.Application.Event.UI.remove("my-ui-listener")
|
|
2969
2971
|
* ```
|
|
@@ -2996,8 +2998,8 @@ declare namespace JMap {
|
|
|
2996
2998
|
*
|
|
2997
2999
|
* @param listenerId Your listener id (must be unique)
|
|
2998
3000
|
* @param fn Your listener function
|
|
2999
|
-
* @example
|
|
3000
|
-
*
|
|
3001
|
+
* @example
|
|
3002
|
+
* ```ts
|
|
3001
3003
|
* // Triggered after a map-context is applied
|
|
3002
3004
|
* JMap.Application.Event.MapContext.on.afterApply("my-after-apply-listener", params => {
|
|
3003
3005
|
* console.info(`After apply map context id="${params.context.title}"`, params.context)
|
|
@@ -3023,8 +3025,8 @@ declare namespace JMap {
|
|
|
3023
3025
|
* If the listener is inactive, it will be reactivated and will be called again ...
|
|
3024
3026
|
*
|
|
3025
3027
|
* @param listenerId The listener id
|
|
3026
|
-
* @example
|
|
3027
|
-
*
|
|
3028
|
+
* @example
|
|
3029
|
+
* ```ts
|
|
3028
3030
|
* // activate the listener "my-mapcontext-listener"
|
|
3029
3031
|
* JMap.Application.Event.MapContext.activate("my-mapcontext-listener")
|
|
3030
3032
|
* ```
|
|
@@ -3041,8 +3043,8 @@ declare namespace JMap {
|
|
|
3041
3043
|
* If the listener is active, it will be deactivated and will be ignored ...
|
|
3042
3044
|
*
|
|
3043
3045
|
* @param listenerId The listener id
|
|
3044
|
-
* @example
|
|
3045
|
-
*
|
|
3046
|
+
* @example
|
|
3047
|
+
* ```ts
|
|
3046
3048
|
* // deactivate the listener "my-mapcontext-listener"
|
|
3047
3049
|
* JMap.Application.Event.MapContext.deactivate("my-mapcontext-listener")
|
|
3048
3050
|
* ```
|
|
@@ -3059,8 +3061,8 @@ declare namespace JMap {
|
|
|
3059
3061
|
* Remove the listener from JMap Cloud NG Core library. The listener is deleted and never called again after that.
|
|
3060
3062
|
*
|
|
3061
3063
|
* @param listenerId The listener id
|
|
3062
|
-
* @example
|
|
3063
|
-
*
|
|
3064
|
+
* @example
|
|
3065
|
+
* ```ts
|
|
3064
3066
|
* // remove the listener "my-mapcontext-listener"
|
|
3065
3067
|
* JMap.Application.Event.MapContext.remove("my-mapcontext-listener")
|
|
3066
3068
|
* ```
|
|
@@ -3089,8 +3091,8 @@ declare namespace JMap {
|
|
|
3089
3091
|
*
|
|
3090
3092
|
* @param action : the action to add
|
|
3091
3093
|
* @param index : will insert at a specific index in the menu. Start at 0. If index is not correct insert at the end
|
|
3092
|
-
* @example
|
|
3093
|
-
*
|
|
3094
|
+
* @example
|
|
3095
|
+
* ```ts
|
|
3094
3096
|
* JMap.Application.User.addPopupMenuAction({
|
|
3095
3097
|
* id: "my-unique-id",
|
|
3096
3098
|
* icon: "fas fa-info-circle",
|
|
@@ -3109,8 +3111,8 @@ declare namespace JMap {
|
|
|
3109
3111
|
*
|
|
3110
3112
|
* @param actionId the action menu id
|
|
3111
3113
|
* @throws if actionId is not a string (non empty)
|
|
3112
|
-
* @example
|
|
3113
|
-
*
|
|
3114
|
+
* @example
|
|
3115
|
+
* ```ts
|
|
3114
3116
|
* // returns true if the action menu id="my-custom-action-menu" exists, else false
|
|
3115
3117
|
* JMap.Application.User.existsPopupMenuActionById("my-custom-action-menu")
|
|
3116
3118
|
* ```
|
|
@@ -3124,8 +3126,8 @@ declare namespace JMap {
|
|
|
3124
3126
|
*
|
|
3125
3127
|
* @param actionId the action menu id
|
|
3126
3128
|
* @throws if actionId is not valid, or not found
|
|
3127
|
-
* @example
|
|
3128
|
-
*
|
|
3129
|
+
* @example
|
|
3130
|
+
* ```ts
|
|
3129
3131
|
* // remove the action menu id="my-custom-action-menu"
|
|
3130
3132
|
* JMap.Application.User.removePopupMenuActionById("my-custom-action-menu")
|
|
3131
3133
|
* ```
|
|
@@ -3145,9 +3147,9 @@ declare namespace JMap {
|
|
|
3145
3147
|
* Registers your own JMap Cloud NG extension.
|
|
3146
3148
|
*
|
|
3147
3149
|
* @throws Error if a parameter is not correct
|
|
3148
|
-
* @param
|
|
3149
|
-
* @example
|
|
3150
|
-
*
|
|
3150
|
+
* @param extension The extension
|
|
3151
|
+
* @example
|
|
3152
|
+
* ```ts
|
|
3151
3153
|
* JMap.Application.Extension.register({
|
|
3152
3154
|
* id: "MyExtension", // Unique id
|
|
3153
3155
|
* initFn: () => {
|
|
@@ -3177,8 +3179,8 @@ declare namespace JMap {
|
|
|
3177
3179
|
*
|
|
3178
3180
|
* @throws Error if extensionId format is not correct
|
|
3179
3181
|
* @param extensionId The extension id
|
|
3180
|
-
* @example
|
|
3181
|
-
*
|
|
3182
|
+
* @example
|
|
3183
|
+
* ```ts
|
|
3182
3184
|
* // returns true if extension id="my-extension" is in use or not
|
|
3183
3185
|
* JMap.Extension.isRegistered("my-extension")
|
|
3184
3186
|
* ```
|
|
@@ -3192,8 +3194,8 @@ declare namespace JMap {
|
|
|
3192
3194
|
*
|
|
3193
3195
|
* Desn't list JMap Cloud NG Core extensions, only JMap Cloud NG extensions.
|
|
3194
3196
|
*
|
|
3195
|
-
* @example
|
|
3196
|
-
*
|
|
3197
|
+
* @example
|
|
3198
|
+
* ```ts
|
|
3197
3199
|
* // Could returns [ "my-first-extension", "my-second-extension" ]
|
|
3198
3200
|
* JMap.Extension.getAllRegisteredIds()
|
|
3199
3201
|
* ```
|
|
@@ -3214,8 +3216,8 @@ declare namespace JMap {
|
|
|
3214
3216
|
*
|
|
3215
3217
|
* @param message the text of the message
|
|
3216
3218
|
* @param options a JAppMessageOptions object
|
|
3217
|
-
* @example
|
|
3218
|
-
*
|
|
3219
|
+
* @example
|
|
3220
|
+
* ```ts
|
|
3219
3221
|
* const message = "This operation is not allowed"
|
|
3220
3222
|
* JMap.Application.Message.error(message, { duration: 5000 })
|
|
3221
3223
|
* ```
|
|
@@ -3229,8 +3231,8 @@ declare namespace JMap {
|
|
|
3229
3231
|
*
|
|
3230
3232
|
* @param message the text of the message
|
|
3231
3233
|
* @param options a JAppMessageOptions object
|
|
3232
|
-
* @example
|
|
3233
|
-
*
|
|
3234
|
+
* @example
|
|
3235
|
+
* ```ts
|
|
3234
3236
|
* const message = "This operation has no effect"
|
|
3235
3237
|
* JMap.Application.Message.warning(message, { duration: 5000 })
|
|
3236
3238
|
* ```
|
|
@@ -3244,8 +3246,8 @@ declare namespace JMap {
|
|
|
3244
3246
|
*
|
|
3245
3247
|
* @param message the text of the message
|
|
3246
3248
|
* @param options a JAppMessageOptions object
|
|
3247
|
-
* @example
|
|
3248
|
-
*
|
|
3249
|
+
* @example
|
|
3250
|
+
* ```ts
|
|
3249
3251
|
* const message = "You are here"
|
|
3250
3252
|
* JMap.Application.Message.info(message, { duration: 5000 })
|
|
3251
3253
|
* ```
|
|
@@ -3259,8 +3261,8 @@ declare namespace JMap {
|
|
|
3259
3261
|
*
|
|
3260
3262
|
* @param message the text of the message
|
|
3261
3263
|
* @param options a JAppMessageOptions object
|
|
3262
|
-
* @example
|
|
3263
|
-
*
|
|
3264
|
+
* @example
|
|
3265
|
+
* ```ts
|
|
3264
3266
|
* const message = "The operation was successful"
|
|
3265
3267
|
* JMap.Application.Message.success(message, { duration: 5000 })
|
|
3266
3268
|
* ```
|
|
@@ -3279,8 +3281,8 @@ declare namespace JMap {
|
|
|
3279
3281
|
* The optional onCancel callback is called when the cancel button is clicked.
|
|
3280
3282
|
*
|
|
3281
3283
|
* @param params message parameters
|
|
3282
|
-
* @example
|
|
3283
|
-
*
|
|
3284
|
+
* @example
|
|
3285
|
+
* ```ts
|
|
3284
3286
|
* JMap.Application.Message.confirmMessage({
|
|
3285
3287
|
* message: "Are you sure to do a given action ?",
|
|
3286
3288
|
* onSuccess: () => console.log(`The user is sure`),
|
|
@@ -3305,8 +3307,8 @@ declare namespace JMap {
|
|
|
3305
3307
|
*
|
|
3306
3308
|
* @param message the text of the message
|
|
3307
3309
|
* @param options a JAppMessageOptions object
|
|
3308
|
-
* @example
|
|
3309
|
-
*
|
|
3310
|
+
* @example
|
|
3311
|
+
* ```ts
|
|
3310
3312
|
* const message = "The operation has failed"
|
|
3311
3313
|
* const level = "error"
|
|
3312
3314
|
* JMap.Application.Message.display(message, { duration: 5000 , severity: level})
|
|
@@ -3332,8 +3334,8 @@ declare namespace JMap {
|
|
|
3332
3334
|
* @param message the message to display
|
|
3333
3335
|
* @throws if message is not a non empty string
|
|
3334
3336
|
* @returns the message id, usefull when you display multiple messages at the same time, but want to close only one.
|
|
3335
|
-
* @example
|
|
3336
|
-
*
|
|
3337
|
+
* @example
|
|
3338
|
+
* ```ts
|
|
3337
3339
|
* // display a waiting overlay, making the app unavailable for user as long it is displayed
|
|
3338
3340
|
* const messageId = JMap.Application.Message.displayWaitingOverlay("Please wait, processing data")
|
|
3339
3341
|
* // NG app is now unavailable for the user
|
|
@@ -3365,8 +3367,8 @@ declare namespace JMap {
|
|
|
3365
3367
|
*
|
|
3366
3368
|
* @param messageId the message to close
|
|
3367
3369
|
* @throws if you pass a message id that is not found
|
|
3368
|
-
* @example
|
|
3369
|
-
*
|
|
3370
|
+
* @example
|
|
3371
|
+
* ```ts
|
|
3370
3372
|
* // display a waiting overlay, making the app unavailable for user as long it is displayed
|
|
3371
3373
|
* const messageId = JMap.Application.Message.displayWaitingOverlay("Please wait, processing data")
|
|
3372
3374
|
* // NG app is now unavailable for the user
|
|
@@ -3403,8 +3405,8 @@ declare namespace JMap {
|
|
|
3403
3405
|
*
|
|
3404
3406
|
* @param containerId id of the container where the form will be rendered
|
|
3405
3407
|
* @param formParams a JFormParams object
|
|
3406
|
-
* @example
|
|
3407
|
-
*
|
|
3408
|
+
* @example
|
|
3409
|
+
* ```ts
|
|
3408
3410
|
* // this example will show you how to create a custom form in an extension
|
|
3409
3411
|
* // it will render the form in the extension panel
|
|
3410
3412
|
* window.JMAP_OPTIONS = {
|
|
@@ -3486,8 +3488,8 @@ declare namespace JMap {
|
|
|
3486
3488
|
* Unmounts form by using container Id where it was rendered
|
|
3487
3489
|
*
|
|
3488
3490
|
* @param containerId id of the container to unmount
|
|
3489
|
-
* @example
|
|
3490
|
-
*
|
|
3491
|
+
* @example
|
|
3492
|
+
* ```ts
|
|
3491
3493
|
* JMap.Application.Form.destroy("new-form")
|
|
3492
3494
|
* ```
|
|
3493
3495
|
*/
|