maplibre-gl-components 0.17.3 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{ControlGrid-BBBM8qLm.cjs → ControlGrid-BUNfuXTI.cjs} +232 -232
- package/dist/{ControlGrid-mWA6ezKk.js → ControlGrid-DxeDI-Uo.js} +17996 -17497
- package/dist/{DuckDBConverter-AYRXGnkT.js → DuckDBConverter-BFlaIx_B.js} +1 -1
- package/dist/{DuckDBConverter-BCFB3t23.cjs → DuckDBConverter-BbDoZzve.cjs} +1 -1
- package/dist/{ShapefileConverter-CO3Odi6Z.js → ShapefileConverter-B4VbwMAU.js} +1 -1
- package/dist/{ShapefileConverter-GIKUtH5Q.cjs → ShapefileConverter-cTnNg_Wi.cjs} +1 -1
- package/dist/{geotiff-BCanNDRY.js → geotiff-CIwO_lK2.js} +2 -2
- package/dist/{geotiff-1T_xRuZY.cjs → geotiff-rJr7EH3E.cjs} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{lerc-C6881AhL.cjs → lerc-CW8uLXzQ.cjs} +1 -1
- package/dist/{lerc-CvqemrAo.js → lerc-q2Sjma2n.js} +1 -1
- package/dist/{maplibre-geoman.es-Gqeh7dIq.cjs → maplibre-geoman.es-DdAb0aoL.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.mjs +13 -10
- package/dist/types/lib/core/CogLayer.d.ts +1 -0
- package/dist/types/lib/core/CogLayer.d.ts.map +1 -1
- package/dist/types/lib/core/Colorbar.d.ts +54 -0
- package/dist/types/lib/core/Colorbar.d.ts.map +1 -1
- package/dist/types/lib/core/ColorbarGuiControl.d.ts +10 -1
- package/dist/types/lib/core/ColorbarGuiControl.d.ts.map +1 -1
- package/dist/types/lib/core/ColorbarReact.d.ts.map +1 -1
- package/dist/types/lib/core/HtmlControl.d.ts +65 -0
- package/dist/types/lib/core/HtmlControl.d.ts.map +1 -1
- package/dist/types/lib/core/HtmlControlReact.d.ts.map +1 -1
- package/dist/types/lib/core/HtmlGuiControl.d.ts +10 -0
- package/dist/types/lib/core/HtmlGuiControl.d.ts.map +1 -1
- package/dist/types/lib/core/Legend.d.ts +59 -0
- package/dist/types/lib/core/Legend.d.ts.map +1 -1
- package/dist/types/lib/core/LegendGuiControl.d.ts +10 -0
- package/dist/types/lib/core/LegendGuiControl.d.ts.map +1 -1
- package/dist/types/lib/core/LegendReact.d.ts.map +1 -1
- package/dist/types/lib/core/types.d.ts +106 -37
- package/dist/types/lib/core/types.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -21,6 +21,8 @@ import { LegendOptions, LegendState, LegendItem, ComponentEvent, ComponentEventH
|
|
|
21
21
|
export declare class Legend implements IControl {
|
|
22
22
|
private _container?;
|
|
23
23
|
private _options;
|
|
24
|
+
private _legendOptions?;
|
|
25
|
+
private _legends;
|
|
24
26
|
private _state;
|
|
25
27
|
private _eventHandlers;
|
|
26
28
|
private _map?;
|
|
@@ -107,6 +109,34 @@ export declare class Legend implements IControl {
|
|
|
107
109
|
* @param handler - The callback function to remove.
|
|
108
110
|
*/
|
|
109
111
|
off(event: ComponentEvent, handler: ComponentEventHandler<LegendState>): void;
|
|
112
|
+
/**
|
|
113
|
+
* Resolves configured legend entries against the control defaults.
|
|
114
|
+
*
|
|
115
|
+
* @returns Array of resolved legend options.
|
|
116
|
+
*/
|
|
117
|
+
private _resolveLegends;
|
|
118
|
+
/**
|
|
119
|
+
* Creates public state from the current legend entries.
|
|
120
|
+
*
|
|
121
|
+
* @returns The current legend state.
|
|
122
|
+
*/
|
|
123
|
+
private _createState;
|
|
124
|
+
/**
|
|
125
|
+
* Creates public state for a single legend entry.
|
|
126
|
+
*
|
|
127
|
+
* @param legend - The resolved legend options.
|
|
128
|
+
* @param index - The legend entry index.
|
|
129
|
+
* @returns The current legend entry state.
|
|
130
|
+
*/
|
|
131
|
+
private _createLegendState;
|
|
132
|
+
/**
|
|
133
|
+
* Gets an entry's configured visibility.
|
|
134
|
+
*
|
|
135
|
+
* @param index - The entry index.
|
|
136
|
+
* @param fallback - The fallback visibility value.
|
|
137
|
+
* @returns Whether the entry is configured as visible.
|
|
138
|
+
*/
|
|
139
|
+
private _getLegendEntryVisible;
|
|
110
140
|
/**
|
|
111
141
|
* Emits an event to all registered handlers.
|
|
112
142
|
*
|
|
@@ -121,6 +151,20 @@ export declare class Legend implements IControl {
|
|
|
121
151
|
* Updates the display state based on visibility and zoom level.
|
|
122
152
|
*/
|
|
123
153
|
private _updateDisplayState;
|
|
154
|
+
/**
|
|
155
|
+
* Checks whether a legend entry is visible at the current zoom.
|
|
156
|
+
*
|
|
157
|
+
* @param legend - The resolved legend options.
|
|
158
|
+
* @param index - The legend entry index.
|
|
159
|
+
* @returns Whether the legend should be rendered.
|
|
160
|
+
*/
|
|
161
|
+
private _isLegendVisible;
|
|
162
|
+
/**
|
|
163
|
+
* Checks whether any legend entry should be visible.
|
|
164
|
+
*
|
|
165
|
+
* @returns Whether at least one legend should be visible.
|
|
166
|
+
*/
|
|
167
|
+
private _hasVisibleLegends;
|
|
124
168
|
/**
|
|
125
169
|
* Creates the main container element.
|
|
126
170
|
*
|
|
@@ -131,9 +175,24 @@ export declare class Legend implements IControl {
|
|
|
131
175
|
* Creates a color swatch element.
|
|
132
176
|
*
|
|
133
177
|
* @param item - Legend item configuration.
|
|
178
|
+
* @param legend - The resolved legend options.
|
|
134
179
|
* @returns The swatch element.
|
|
135
180
|
*/
|
|
136
181
|
private _createSwatch;
|
|
182
|
+
/**
|
|
183
|
+
* Toggles a legend entry.
|
|
184
|
+
*
|
|
185
|
+
* @param index - The legend entry index.
|
|
186
|
+
*/
|
|
187
|
+
private _toggleLegend;
|
|
188
|
+
/**
|
|
189
|
+
* Creates a legend entry element.
|
|
190
|
+
*
|
|
191
|
+
* @param legend - The resolved legend options.
|
|
192
|
+
* @param index - The legend entry index.
|
|
193
|
+
* @returns The legend entry element.
|
|
194
|
+
*/
|
|
195
|
+
private _createLegendElement;
|
|
137
196
|
/**
|
|
138
197
|
* Renders the legend content.
|
|
139
198
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/Legend.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/Legend.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAGV,aAAa,EACb,WAAW,EACX,UAAU,EACV,cAAc,EACd,qBAAqB,EACtB,MAAM,SAAS,CAAC;AA2BjB;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,MAAO,YAAW,QAAQ;IACrC,OAAO,CAAC,UAAU,CAAC,CAAc;IACjC,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,cAAc,CAAC,CAAsB;IAC7C,OAAO,CAAC,QAAQ,CAA0B;IAC1C,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,cAAc,CAGR;IACd,OAAO,CAAC,IAAI,CAAC,CAAc;IAC3B,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,OAAO,CAAC,YAAY,CAAiB;IAErC;;;;OAIG;gBACS,OAAO,CAAC,EAAE,aAAa;IASnC;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,WAAW,GAAG,WAAW;IAepC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAWhB;;OAEG;IACH,IAAI,IAAI,IAAI;IASZ;;OAEG;I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OAAO,CAAC,OAAO;CAsBhB"}
|
|
@@ -28,12 +28,16 @@ export declare class LegendGuiControl implements IControl {
|
|
|
28
28
|
private _handleZoom?;
|
|
29
29
|
private _zoomVisible;
|
|
30
30
|
private _legend?;
|
|
31
|
+
private _legends;
|
|
32
|
+
private _legendEntries;
|
|
33
|
+
private _legendSelect?;
|
|
31
34
|
private _titleInput?;
|
|
32
35
|
private _positionSelect?;
|
|
33
36
|
private _itemsContainer?;
|
|
34
37
|
private _dictTextarea?;
|
|
35
38
|
private _dictErrorEl?;
|
|
36
39
|
private _addBtn?;
|
|
40
|
+
private _updateBtn?;
|
|
37
41
|
private _removeBtn?;
|
|
38
42
|
constructor(options?: LegendGuiControlOptions);
|
|
39
43
|
onAdd(map: MapLibreMap): HTMLElement;
|
|
@@ -53,10 +57,16 @@ export declare class LegendGuiControl implements IControl {
|
|
|
53
57
|
private _renderItems;
|
|
54
58
|
private _addItem;
|
|
55
59
|
private _importFromDict;
|
|
60
|
+
private _getFormEntry;
|
|
61
|
+
private _applyEntryToForm;
|
|
62
|
+
private _createLegend;
|
|
63
|
+
private _selectLegend;
|
|
64
|
+
private _renderLegendSelect;
|
|
56
65
|
private _addLegend;
|
|
57
66
|
private _updateLegend;
|
|
58
67
|
private _removeLegend;
|
|
59
68
|
private _updateButtonStates;
|
|
69
|
+
private _removeAllLegends;
|
|
60
70
|
private _togglePanel;
|
|
61
71
|
private _showPanel;
|
|
62
72
|
private _hidePanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendGuiControl.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/LegendGuiControl.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACV,QAAQ,EACR,GAAG,IAAI,WAAW,EAClB,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,
|
|
1
|
+
{"version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1B,GAAG,EACH,aAAa,EACb,QAAwB,EACxB,GAAG,OAAO,EACX,EAAE,gBAAgB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"LegendReact.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/LegendReact.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,SAAS,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,aAAa,EACb,QAAwB,EACxB,GAAG,OAAO,EACX,EAAE,gBAAgB,GAAG,IAAI,CA6DzB"}
|
|
@@ -35,9 +35,9 @@ export interface TickConfig {
|
|
|
35
35
|
length?: number;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* Options for configuring
|
|
38
|
+
* Options for configuring a single colorbar entry.
|
|
39
39
|
*/
|
|
40
|
-
export interface
|
|
40
|
+
export interface ColorbarItemOptions {
|
|
41
41
|
/** Colormap name or custom color array. */
|
|
42
42
|
colormap?: ColormapName | string[];
|
|
43
43
|
/** Custom color stops for fine-grained control. */
|
|
@@ -52,8 +52,6 @@ export interface ColorbarOptions {
|
|
|
52
52
|
units?: string;
|
|
53
53
|
/** Orientation of the colorbar. */
|
|
54
54
|
orientation?: ColorbarOrientation;
|
|
55
|
-
/** Position on the map. */
|
|
56
|
-
position?: ControlPosition;
|
|
57
55
|
/** Width in pixels (for vertical) or height (for horizontal) of the gradient bar. */
|
|
58
56
|
barThickness?: number;
|
|
59
57
|
/** Length of the colorbar in pixels. */
|
|
@@ -82,9 +80,18 @@ export interface ColorbarOptions {
|
|
|
82
80
|
maxzoom?: number;
|
|
83
81
|
}
|
|
84
82
|
/**
|
|
85
|
-
*
|
|
83
|
+
* Options for configuring the Colorbar control.
|
|
86
84
|
*/
|
|
87
|
-
export interface
|
|
85
|
+
export interface ColorbarOptions extends ColorbarItemOptions {
|
|
86
|
+
/** Position on the map. */
|
|
87
|
+
position?: ControlPosition;
|
|
88
|
+
/** Multiple colorbar entries to display in this control. */
|
|
89
|
+
colorbars?: ColorbarItemOptions[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Internal state of a single colorbar entry.
|
|
93
|
+
*/
|
|
94
|
+
export interface ColorbarItemState {
|
|
88
95
|
/** Whether the colorbar is visible. */
|
|
89
96
|
visible: boolean;
|
|
90
97
|
/** Current vmin value. */
|
|
@@ -94,6 +101,13 @@ export interface ColorbarState {
|
|
|
94
101
|
/** Current colormap. */
|
|
95
102
|
colormap: ColormapName | string[];
|
|
96
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Internal state of the Colorbar control.
|
|
106
|
+
*/
|
|
107
|
+
export interface ColorbarState extends ColorbarItemState {
|
|
108
|
+
/** State for all rendered colorbar entries. */
|
|
109
|
+
colorbars?: ColorbarItemState[];
|
|
110
|
+
}
|
|
97
111
|
/**
|
|
98
112
|
* Props for the React Colorbar wrapper component.
|
|
99
113
|
*/
|
|
@@ -119,15 +133,13 @@ export interface LegendItem {
|
|
|
119
133
|
icon?: string;
|
|
120
134
|
}
|
|
121
135
|
/**
|
|
122
|
-
* Options for configuring
|
|
136
|
+
* Options for configuring a single legend entry.
|
|
123
137
|
*/
|
|
124
|
-
export interface
|
|
138
|
+
export interface LegendItemOptions {
|
|
125
139
|
/** Legend title. */
|
|
126
140
|
title?: string;
|
|
127
141
|
/** Legend items to display. */
|
|
128
142
|
items?: LegendItem[];
|
|
129
|
-
/** Position on the map. */
|
|
130
|
-
position?: ControlPosition;
|
|
131
143
|
/** Custom CSS class name. */
|
|
132
144
|
className?: string;
|
|
133
145
|
/** Whether the legend is initially visible. */
|
|
@@ -160,9 +172,18 @@ export interface LegendOptions {
|
|
|
160
172
|
maxzoom?: number;
|
|
161
173
|
}
|
|
162
174
|
/**
|
|
163
|
-
*
|
|
175
|
+
* Options for configuring the Legend control.
|
|
164
176
|
*/
|
|
165
|
-
export interface
|
|
177
|
+
export interface LegendOptions extends LegendItemOptions {
|
|
178
|
+
/** Position on the map. */
|
|
179
|
+
position?: ControlPosition;
|
|
180
|
+
/** Multiple legend entries to display in this control. */
|
|
181
|
+
legends?: LegendItemOptions[];
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Internal state of a single legend entry.
|
|
185
|
+
*/
|
|
186
|
+
export interface LegendItemState {
|
|
166
187
|
/** Whether the legend is visible. */
|
|
167
188
|
visible: boolean;
|
|
168
189
|
/** Whether the legend is collapsed. */
|
|
@@ -170,6 +191,13 @@ export interface LegendState {
|
|
|
170
191
|
/** Current legend items. */
|
|
171
192
|
items: LegendItem[];
|
|
172
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Internal state of the Legend control.
|
|
196
|
+
*/
|
|
197
|
+
export interface LegendState extends LegendItemState {
|
|
198
|
+
/** State for all rendered legend entries. */
|
|
199
|
+
legends?: LegendItemState[];
|
|
200
|
+
}
|
|
173
201
|
/**
|
|
174
202
|
* Props for the React Legend wrapper component.
|
|
175
203
|
*/
|
|
@@ -180,17 +208,15 @@ export interface LegendReactProps extends LegendOptions {
|
|
|
180
208
|
onStateChange?: (state: LegendState) => void;
|
|
181
209
|
}
|
|
182
210
|
/**
|
|
183
|
-
* Options for configuring
|
|
211
|
+
* Options for configuring a single HtmlControl entry.
|
|
184
212
|
*/
|
|
185
|
-
export interface
|
|
213
|
+
export interface HtmlControlItemOptions {
|
|
186
214
|
/** HTML content string. */
|
|
187
215
|
html?: string;
|
|
188
216
|
/** Or provide an element directly. */
|
|
189
217
|
element?: HTMLElement;
|
|
190
218
|
/** Title for the control header (shown when collapsible). */
|
|
191
219
|
title?: string;
|
|
192
|
-
/** Position on the map. */
|
|
193
|
-
position?: ControlPosition;
|
|
194
220
|
/** Custom CSS class name. */
|
|
195
221
|
className?: string;
|
|
196
222
|
/** Whether the control is initially visible. */
|
|
@@ -221,9 +247,18 @@ export interface HtmlControlOptions {
|
|
|
221
247
|
maxzoom?: number;
|
|
222
248
|
}
|
|
223
249
|
/**
|
|
224
|
-
*
|
|
250
|
+
* Options for configuring the HtmlControl.
|
|
251
|
+
*/
|
|
252
|
+
export interface HtmlControlOptions extends HtmlControlItemOptions {
|
|
253
|
+
/** Position on the map. */
|
|
254
|
+
position?: ControlPosition;
|
|
255
|
+
/** Multiple HTML entries to display in this control. */
|
|
256
|
+
htmls?: HtmlControlItemOptions[];
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Internal state of a single HtmlControl entry.
|
|
225
260
|
*/
|
|
226
|
-
export interface
|
|
261
|
+
export interface HtmlControlItemState {
|
|
227
262
|
/** Whether the control is visible. */
|
|
228
263
|
visible: boolean;
|
|
229
264
|
/** Whether the control is collapsed. */
|
|
@@ -231,6 +266,13 @@ export interface HtmlControlState {
|
|
|
231
266
|
/** Current HTML content. */
|
|
232
267
|
html: string;
|
|
233
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Internal state of the HtmlControl.
|
|
271
|
+
*/
|
|
272
|
+
export interface HtmlControlState extends HtmlControlItemState {
|
|
273
|
+
/** State for all rendered HTML entries. */
|
|
274
|
+
htmls?: HtmlControlItemState[];
|
|
275
|
+
}
|
|
234
276
|
/**
|
|
235
277
|
* Props for the React HtmlControl wrapper component.
|
|
236
278
|
*/
|
|
@@ -988,13 +1030,9 @@ export interface ColorbarGuiControlOptions {
|
|
|
988
1030
|
maxzoom?: number;
|
|
989
1031
|
}
|
|
990
1032
|
/**
|
|
991
|
-
*
|
|
1033
|
+
* Configured colorbar entry managed by the ColorbarGuiControl.
|
|
992
1034
|
*/
|
|
993
|
-
export interface
|
|
994
|
-
/** Whether the control is visible. */
|
|
995
|
-
visible: boolean;
|
|
996
|
-
/** Whether the panel is collapsed. */
|
|
997
|
-
collapsed: boolean;
|
|
1035
|
+
export interface ColorbarGuiEntryState {
|
|
998
1036
|
/** Colorbar mode: 'named' for predefined colormaps, 'custom' for user-defined colors. */
|
|
999
1037
|
mode: "named" | "custom";
|
|
1000
1038
|
/** Selected colormap name (used when mode is 'named'). */
|
|
@@ -1013,8 +1051,21 @@ export interface ColorbarGuiControlState {
|
|
|
1013
1051
|
orientation: ColorbarOrientation;
|
|
1014
1052
|
/** Position of the colorbar on the map. */
|
|
1015
1053
|
colorbarPosition: ControlPosition;
|
|
1054
|
+
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Internal state of the ColorbarGuiControl.
|
|
1057
|
+
*/
|
|
1058
|
+
export interface ColorbarGuiControlState extends ColorbarGuiEntryState {
|
|
1059
|
+
/** Whether the control is visible. */
|
|
1060
|
+
visible: boolean;
|
|
1061
|
+
/** Whether the panel is collapsed. */
|
|
1062
|
+
collapsed: boolean;
|
|
1016
1063
|
/** Whether a colorbar is currently active on the map. */
|
|
1017
1064
|
hasColorbar: boolean;
|
|
1065
|
+
/** Index of the selected colorbar entry. */
|
|
1066
|
+
selectedColorbarIndex: number;
|
|
1067
|
+
/** Configured colorbars currently active on the map. */
|
|
1068
|
+
colorbars: ColorbarGuiEntryState[];
|
|
1018
1069
|
}
|
|
1019
1070
|
/**
|
|
1020
1071
|
* ColorbarGuiControl event types.
|
|
@@ -1059,21 +1110,30 @@ export interface LegendGuiControlOptions {
|
|
|
1059
1110
|
maxzoom?: number;
|
|
1060
1111
|
}
|
|
1061
1112
|
/**
|
|
1062
|
-
*
|
|
1113
|
+
* Configured legend entry managed by the LegendGuiControl.
|
|
1063
1114
|
*/
|
|
1064
|
-
export interface
|
|
1065
|
-
/** Whether the control is visible. */
|
|
1066
|
-
visible: boolean;
|
|
1067
|
-
/** Whether the panel is collapsed. */
|
|
1068
|
-
collapsed: boolean;
|
|
1115
|
+
export interface LegendGuiEntryState {
|
|
1069
1116
|
/** Legend title. */
|
|
1070
1117
|
title: string;
|
|
1071
1118
|
/** Current legend items. */
|
|
1072
1119
|
items: LegendItem[];
|
|
1073
1120
|
/** Position of the legend on the map. */
|
|
1074
1121
|
legendPosition: ControlPosition;
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* Internal state of the LegendGuiControl.
|
|
1125
|
+
*/
|
|
1126
|
+
export interface LegendGuiControlState extends LegendGuiEntryState {
|
|
1127
|
+
/** Whether the control is visible. */
|
|
1128
|
+
visible: boolean;
|
|
1129
|
+
/** Whether the panel is collapsed. */
|
|
1130
|
+
collapsed: boolean;
|
|
1075
1131
|
/** Whether a legend is currently active on the map. */
|
|
1076
1132
|
hasLegend: boolean;
|
|
1133
|
+
/** Index of the selected legend entry. */
|
|
1134
|
+
selectedLegendIndex: number;
|
|
1135
|
+
/** Configured legends currently active on the map. */
|
|
1136
|
+
legends: LegendGuiEntryState[];
|
|
1077
1137
|
}
|
|
1078
1138
|
/**
|
|
1079
1139
|
* LegendGuiControl event types.
|
|
@@ -1118,13 +1178,9 @@ export interface HtmlGuiControlOptions {
|
|
|
1118
1178
|
maxzoom?: number;
|
|
1119
1179
|
}
|
|
1120
1180
|
/**
|
|
1121
|
-
*
|
|
1181
|
+
* Configured HTML entry managed by the HtmlGuiControl.
|
|
1122
1182
|
*/
|
|
1123
|
-
export interface
|
|
1124
|
-
/** Whether the control is visible. */
|
|
1125
|
-
visible: boolean;
|
|
1126
|
-
/** Whether the panel is collapsed. */
|
|
1127
|
-
collapsed: boolean;
|
|
1183
|
+
export interface HtmlGuiEntryState {
|
|
1128
1184
|
/** Title for the HTML control. */
|
|
1129
1185
|
title: string;
|
|
1130
1186
|
/** Current HTML content. */
|
|
@@ -1133,8 +1189,21 @@ export interface HtmlGuiControlState {
|
|
|
1133
1189
|
htmlPosition: ControlPosition;
|
|
1134
1190
|
/** Whether the HTML control is collapsible. */
|
|
1135
1191
|
collapsible: boolean;
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* Internal state of the HtmlGuiControl.
|
|
1195
|
+
*/
|
|
1196
|
+
export interface HtmlGuiControlState extends HtmlGuiEntryState {
|
|
1197
|
+
/** Whether the control is visible. */
|
|
1198
|
+
visible: boolean;
|
|
1199
|
+
/** Whether the panel is collapsed. */
|
|
1200
|
+
collapsed: boolean;
|
|
1136
1201
|
/** Whether an HTML control is currently active on the map. */
|
|
1137
1202
|
hasHtmlControl: boolean;
|
|
1203
|
+
/** Index of the selected HTML entry. */
|
|
1204
|
+
selectedHtmlIndex: number;
|
|
1205
|
+
/** Configured HTML controls currently active on the map. */
|
|
1206
|
+
htmls: HtmlGuiEntryState[];
|
|
1138
1207
|
}
|
|
1139
1208
|
/**
|
|
1140
1209
|
* HtmlGuiControl event types.
|
|
@@ -1302,7 +1371,7 @@ export interface CogLayerControlOptions {
|
|
|
1302
1371
|
defaultRescaleMin?: number;
|
|
1303
1372
|
/** Default rescale maximum. Default: 255. */
|
|
1304
1373
|
defaultRescaleMax?: number;
|
|
1305
|
-
/** Default nodata value. */
|
|
1374
|
+
/** Default nodata value. If omitted, TIFF metadata is used when available. */
|
|
1306
1375
|
defaultNodata?: number;
|
|
1307
1376
|
/** Default opacity (0-1). Default: 1. */
|
|
1308
1377
|
defaultOpacity?: number;
|