jmapcloud-ng-core-types 2.0.13-qa.2 → 2.0.13-qa.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +11 -0
- package/package.json +1 -1
- package/public/core.d.ts +68 -0
- package/public/jmap/layer.d.ts +1 -0
- package/public/jmap/map.d.ts +12 -0
- package/public/state.d.ts +12 -0
package/index.d.ts
CHANGED
|
@@ -12,9 +12,11 @@ export type {
|
|
|
12
12
|
JFormState,
|
|
13
13
|
JGeocodingState,
|
|
14
14
|
JGeolocationState,
|
|
15
|
+
JLegendState,
|
|
15
16
|
JLanguageState,
|
|
16
17
|
JLayerState,
|
|
17
18
|
JMapContextState,
|
|
19
|
+
JMapLegendMode,
|
|
18
20
|
JMapState,
|
|
19
21
|
JProjectState,
|
|
20
22
|
JServerState,
|
|
@@ -521,6 +523,7 @@ export interface JMapService {
|
|
|
521
523
|
Selection: JMapSelectionService
|
|
522
524
|
Basemap: JMapBasemapService
|
|
523
525
|
Attribution: JMapAttributionService
|
|
526
|
+
Legend: JMapLegendService
|
|
524
527
|
getMap(): maplibregl.Map
|
|
525
528
|
getMapJSLib(): any
|
|
526
529
|
getDomContainerId(): string
|
|
@@ -610,6 +613,14 @@ export interface JMapService {
|
|
|
610
613
|
getPixelRatio(): number
|
|
611
614
|
}
|
|
612
615
|
|
|
616
|
+
export interface JMapLegendService {
|
|
617
|
+
getVisible(): boolean
|
|
618
|
+
isControlVisible(): boolean
|
|
619
|
+
setControlVisibility(isVisible: boolean): void
|
|
620
|
+
setMode(mode: JMapLegendMode): void
|
|
621
|
+
setVisible(isVisible: boolean): void
|
|
622
|
+
}
|
|
623
|
+
|
|
613
624
|
export interface JMapBasemapService {
|
|
614
625
|
getAllIds(): string[]
|
|
615
626
|
isActive(): boolean
|
package/package.json
CHANGED
package/public/core.d.ts
CHANGED
|
@@ -4356,6 +4356,74 @@ export namespace JMap {
|
|
|
4356
4356
|
*
|
|
4357
4357
|
*/
|
|
4358
4358
|
function getPixelRatio(): number
|
|
4359
|
+
/**
|
|
4360
|
+
* **JMap.Map.Legend**
|
|
4361
|
+
*
|
|
4362
|
+
* This section contains map legend related methods.
|
|
4363
|
+
*/
|
|
4364
|
+
namespace Legend {
|
|
4365
|
+
/**
|
|
4366
|
+
* **JMap.Map.Legend.getVisible**
|
|
4367
|
+
*
|
|
4368
|
+
* Returns whether the map legend is currently visible.
|
|
4369
|
+
*
|
|
4370
|
+
* @example
|
|
4371
|
+
* ```ts
|
|
4372
|
+
* JMap.Map.Legend.getVisible()
|
|
4373
|
+
* ```
|
|
4374
|
+
*/
|
|
4375
|
+
function getVisible(): boolean
|
|
4376
|
+
/**
|
|
4377
|
+
* **JMap.Map.Legend.isControlVisible**
|
|
4378
|
+
*
|
|
4379
|
+
* Returns true if the legend button is visible on the map.
|
|
4380
|
+
*
|
|
4381
|
+
* @example
|
|
4382
|
+
* ```ts
|
|
4383
|
+
* JMap.Map.Legend.isControlVisible()
|
|
4384
|
+
* ```
|
|
4385
|
+
*/
|
|
4386
|
+
function isControlVisible(): boolean
|
|
4387
|
+
/**
|
|
4388
|
+
* **JMap.Map.Legend.setControlVisibility**
|
|
4389
|
+
*
|
|
4390
|
+
* Changes the legend button visibility on the map.
|
|
4391
|
+
*
|
|
4392
|
+
* @param isVisible true to display the legend button, false to hide
|
|
4393
|
+
* @example
|
|
4394
|
+
* ```ts
|
|
4395
|
+
* JMap.Map.Legend.setControlVisibility(true)
|
|
4396
|
+
* JMap.Map.Legend.setControlVisibility(false)
|
|
4397
|
+
* ```
|
|
4398
|
+
*/
|
|
4399
|
+
function setControlVisibility(isVisible: boolean): void
|
|
4400
|
+
/**
|
|
4401
|
+
* **JMap.Map.Legend.setMode**
|
|
4402
|
+
*
|
|
4403
|
+
* Changes the map legend mode.
|
|
4404
|
+
*
|
|
4405
|
+
* @param mode `"dynamic"` to only show what is currently visible on the map, `"static"` to always show all legend-enabled layers
|
|
4406
|
+
* @example
|
|
4407
|
+
* ```ts
|
|
4408
|
+
* JMap.Map.Legend.setMode("dynamic")
|
|
4409
|
+
* JMap.Map.Legend.setMode("static")
|
|
4410
|
+
* ```
|
|
4411
|
+
*/
|
|
4412
|
+
function setMode(mode: JMapLegendMode): void
|
|
4413
|
+
/**
|
|
4414
|
+
* **JMap.Map.Legend.setVisible**
|
|
4415
|
+
*
|
|
4416
|
+
* Changes the map legend visibility.
|
|
4417
|
+
*
|
|
4418
|
+
* @param isVisible true to display the legend, false to hide it
|
|
4419
|
+
* @example
|
|
4420
|
+
* ```ts
|
|
4421
|
+
* JMap.Map.Legend.setVisible(true)
|
|
4422
|
+
* JMap.Map.Legend.setVisible(false)
|
|
4423
|
+
* ```
|
|
4424
|
+
*/
|
|
4425
|
+
function setVisible(isVisible: boolean): void
|
|
4426
|
+
}
|
|
4359
4427
|
/**
|
|
4360
4428
|
* **JMap.Map.resetRasterLayerTransparency**
|
|
4361
4429
|
*
|
package/public/jmap/layer.d.ts
CHANGED
|
@@ -330,6 +330,7 @@ export interface JLayer extends JLayerTreeElement {
|
|
|
330
330
|
// TODO JMAP8-3266 : use a localized type instad of a graphQL one
|
|
331
331
|
dynamicFilters: JDynamicFilterGraphQL[]
|
|
332
332
|
allowClientSideEditing: boolean
|
|
333
|
+
includeInLegend: boolean
|
|
333
334
|
baseFilter?: JAnyFilterCondition
|
|
334
335
|
}
|
|
335
336
|
|
package/public/jmap/map.d.ts
CHANGED
|
@@ -397,6 +397,18 @@ export interface JCoreMapOptions {
|
|
|
397
397
|
* ```
|
|
398
398
|
*/
|
|
399
399
|
navigationHistoryControlVisible?: boolean
|
|
400
|
+
/**
|
|
401
|
+
* By default the legend button is visible on the map.
|
|
402
|
+
*
|
|
403
|
+
* But if ***legendControlVisible*** is false, it will be hidden on the map.
|
|
404
|
+
*/
|
|
405
|
+
legendControlVisible?: boolean
|
|
406
|
+
/**
|
|
407
|
+
* By default the legend panel is hidden.
|
|
408
|
+
*
|
|
409
|
+
* But if ***legendVisible*** is true, it will be displayed on startup.
|
|
410
|
+
*/
|
|
411
|
+
legendVisible?: boolean
|
|
400
412
|
/**
|
|
401
413
|
* By default the scale control panel is visible.
|
|
402
414
|
*
|
package/public/state.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export interface JCoreState {
|
|
|
19
19
|
map: JMapState
|
|
20
20
|
project: JProjectState
|
|
21
21
|
layer: JLayerState
|
|
22
|
+
legend: JLegendState
|
|
22
23
|
table: JTableState
|
|
23
24
|
user: JUserState
|
|
24
25
|
language: JLanguageState
|
|
@@ -98,6 +99,16 @@ export interface JGeolocationState {
|
|
|
98
99
|
currentLocation: JLocation | undefined
|
|
99
100
|
}
|
|
100
101
|
|
|
102
|
+
export type JMapLegendMode = "dynamic" | "static"
|
|
103
|
+
|
|
104
|
+
export interface JLegendState {
|
|
105
|
+
height: string
|
|
106
|
+
mode: JMapLegendMode
|
|
107
|
+
position: JLocation
|
|
108
|
+
visible: boolean
|
|
109
|
+
width: string
|
|
110
|
+
}
|
|
111
|
+
|
|
101
112
|
export interface JMapState {
|
|
102
113
|
pitch: number
|
|
103
114
|
rotation: number
|
|
@@ -122,6 +133,7 @@ export interface JMapState {
|
|
|
122
133
|
isTerrainActive: boolean
|
|
123
134
|
isScaleControlVisible: boolean
|
|
124
135
|
isInitialExtentControlVisible: boolean
|
|
136
|
+
isLegendControlVisible: boolean
|
|
125
137
|
isMapRotationControlVisible: boolean
|
|
126
138
|
isTerrainControlVisible: boolean
|
|
127
139
|
isMapInfoControlVisible: boolean
|