@eox/layercontrol 0.29.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +2996 -2869
- package/dist/eox-layercontrol.umd.cjs +626 -565
- package/dist/material-symbols-outlined.woff2 +0 -0
- package/dist/material-symbols-rounded.woff2 +0 -0
- package/dist/material-symbols-sharp.woff2 +0 -0
- package/dist/material-symbols-subset.woff2 +0 -0
- package/package.json +8 -5
- package/src/components/add-layers.js +79 -179
- package/src/components/layer-config.js +22 -3
- package/src/components/layer-group.js +41 -18
- package/src/components/layer-legend.js +7 -4
- package/src/components/layer-list.js +27 -19
- package/src/components/layer-tools.js +60 -120
- package/src/components/layer.js +215 -59
- package/src/components/optional-list.js +32 -25
- package/src/components/tools-items.js +34 -31
- package/src/enums/index.js +1 -0
- package/src/enums/stories/index.js +4 -2
- package/src/helpers/clean-json-input.js +0 -1
- package/src/helpers/create-sortable.js +4 -1
- package/src/helpers/get-layer-type.js +2 -1
- package/src/helpers/get-start-vals.js +0 -3
- package/src/helpers/index.js +1 -0
- package/src/helpers/layer-tools.js +75 -13
- package/src/main.js +37 -7
- package/src/methods/layer-config/apply-updated-styles.js +1 -0
- package/src/methods/layercontrol/first-update.js +10 -4
- package/types/layercontrol/src/components/add-layers.d.ts +2 -2
- package/types/layercontrol/src/components/add-layers.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-config.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-datetime.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-group.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-legend.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-list.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-tools.d.ts +8 -4
- package/types/layercontrol/src/components/layer-tools.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer.d.ts +9 -0
- package/types/layercontrol/src/components/layer.d.ts.map +1 -1
- package/types/layercontrol/src/components/optional-list.d.ts.map +1 -1
- package/types/layercontrol/src/components/tools-items.d.ts.map +1 -1
- package/types/layercontrol/src/enums/index.d.ts +1 -1
- package/types/layercontrol/src/enums/stories/index.d.ts +1 -0
- package/types/layercontrol/src/enums/stories/index.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/clean-json-input.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/create-sortable.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/fetch-capabilities.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/filter-layers.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/get-layer-type.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/get-legend-config.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/get-start-vals.d.ts +1 -1
- package/types/layercontrol/src/helpers/get-start-vals.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/index.d.ts +1 -1
- package/types/layercontrol/src/helpers/layer-tools.d.ts +13 -3
- package/types/layercontrol/src/helpers/layer-tools.d.ts.map +1 -1
- package/types/layercontrol/src/main.d.ts +2 -2
- package/types/layercontrol/src/main.d.ts.map +1 -1
- package/types/layercontrol/src/methods/add-layer/wms-search-url.d.ts.map +1 -1
- package/types/layercontrol/src/methods/layer-config/apply-updated-styles.d.ts +1 -1
- package/types/layercontrol/src/methods/layer-config/apply-updated-styles.d.ts.map +1 -1
- package/types/layercontrol/src/methods/layercontrol/first-update.d.ts +2 -2
- package/types/layercontrol/src/methods/layercontrol/first-update.d.ts.map +1 -1
- package/types/map/src/components/compare.d.ts +2 -2
- package/types/map/src/components/compare.d.ts.map +1 -1
- package/types/map/src/components/tooltip.d.ts +7 -2
- package/types/map/src/components/tooltip.d.ts.map +1 -1
- package/types/map/src/controls/controls.d.ts +2 -8
- package/types/map/src/controls/controls.d.ts.map +1 -1
- package/types/map/src/controls/geo-location.d.ts +5 -5
- package/types/map/src/controls/geo-location.d.ts.map +1 -1
- package/types/map/src/controls/loading-indicator.d.ts +3 -3
- package/types/map/src/controls/loading-indicator.d.ts.map +1 -1
- package/types/map/src/custom/sources/FlatGeoBuf.d.ts +27 -0
- package/types/map/src/custom/sources/FlatGeoBuf.d.ts.map +1 -0
- package/types/map/src/custom/sources/WMTSCapabilities.d.ts +35 -0
- package/types/map/src/custom/sources/WMTSCapabilities.d.ts.map +1 -0
- package/types/map/src/helpers/add-new-feature.d.ts +2 -1
- package/types/map/src/helpers/add-new-feature.d.ts.map +1 -1
- package/types/map/src/helpers/center.d.ts.map +1 -1
- package/types/map/src/helpers/coordinates-roughly-equals.d.ts.map +1 -1
- package/types/map/src/helpers/draw.d.ts +6 -6
- package/types/map/src/helpers/draw.d.ts.map +1 -1
- package/types/map/src/helpers/generate.d.ts +13 -11
- package/types/map/src/helpers/generate.d.ts.map +1 -1
- package/types/map/src/helpers/interactions.d.ts.map +1 -1
- package/types/map/src/helpers/layer.d.ts +5 -5
- package/types/map/src/helpers/layer.d.ts.map +1 -1
- package/types/map/src/helpers/parse-feature.d.ts.map +1 -1
- package/types/map/src/helpers/parse-text.d.ts +3 -1
- package/types/map/src/helpers/parse-text.d.ts.map +1 -1
- package/types/map/src/helpers/register-projection-from-code.d.ts.map +1 -1
- package/types/map/src/helpers/register-projection.d.ts.map +1 -1
- package/types/map/src/helpers/select.d.ts +14 -14
- package/types/map/src/helpers/select.d.ts.map +1 -1
- package/types/map/src/helpers/tile-grid.d.ts +2 -2
- package/types/map/src/helpers/tile-grid.d.ts.map +1 -1
- package/types/map/src/helpers/transform.d.ts +2 -2
- package/types/map/src/helpers/transform.d.ts.map +1 -1
- package/types/map/src/layers.d.ts +116 -0
- package/types/map/src/layers.d.ts.map +1 -0
- package/types/map/src/main.d.ts +31 -31
- package/types/map/src/main.d.ts.map +1 -1
- package/types/map/src/methods/map/add-update-layer.d.ts +2 -2
- package/types/map/src/methods/map/add-update-layer.d.ts.map +1 -1
- package/types/map/src/methods/map/getters.d.ts.map +1 -1
- package/types/map/src/methods/map/setters.d.ts +12 -12
- package/types/map/src/methods/map/setters.d.ts.map +1 -1
- package/types/map/{types.d.ts → src/types.d.ts} +35 -34
- package/types/map/src/types.d.ts.map +1 -0
- package/types/map/types.d.ts.map +0 -1
|
@@ -89,31 +89,38 @@ export class EOxLayerControlOptionalList extends LitElement {
|
|
|
89
89
|
);
|
|
90
90
|
|
|
91
91
|
return html`
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
92
|
+
<nav class="bottom-padding large-padding">
|
|
93
|
+
<div class="field suffix border small max">
|
|
94
|
+
<!-- Dropdown select element -->
|
|
95
|
+
<select
|
|
96
|
+
name="optional"
|
|
97
|
+
data-cy="optionalLayers"
|
|
98
|
+
class="small-padding"
|
|
99
|
+
style="font-size: small"
|
|
100
|
+
>
|
|
101
|
+
<!-- Default placeholder option -->
|
|
102
|
+
<option disabled selected value>-- select --</option>
|
|
103
|
+
|
|
104
|
+
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
105
|
+
${filteredLayersList.map((layer) => {
|
|
106
|
+
// @ts-expect-error TODO
|
|
107
|
+
const value = layer.get(this.idProperty) || layer.ol_uid;
|
|
108
|
+
const title = layer.get(this.titleProperty);
|
|
109
|
+
const id = `layer ${layer.get(this.idProperty)}`;
|
|
110
|
+
const label = title || id;
|
|
111
|
+
|
|
112
|
+
// Generating options for the dropdown
|
|
113
|
+
return html` <option value="${value}">${label}</option> `;
|
|
114
|
+
})}
|
|
115
|
+
</select>
|
|
116
|
+
|
|
117
|
+
<!-- Label for the dropdown -->
|
|
118
|
+
<label for="optional">Optional layers</label>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<!-- Button to handle adding layers -->
|
|
122
|
+
<button class="small" @click="${this.#handleAddToList}">Add</button>
|
|
123
|
+
</nav>
|
|
117
124
|
`;
|
|
118
125
|
}
|
|
119
126
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
2
|
import { when } from "lit/directives/when.js";
|
|
3
3
|
import { map } from "lit/directives/map.js";
|
|
4
|
+
import eoxStyle from "@eox/ui/style.css?inline";
|
|
4
5
|
|
|
5
6
|
export class EOxLayerControlTabs extends LitElement {
|
|
6
7
|
// Define static properties for the component
|
|
@@ -120,7 +121,10 @@ export class EOxLayerControlTabs extends LitElement {
|
|
|
120
121
|
</nav>
|
|
121
122
|
`,
|
|
122
123
|
)}
|
|
123
|
-
<figure
|
|
124
|
+
<figure
|
|
125
|
+
class="no-round small-padding vertical-padding"
|
|
126
|
+
style="overflow: hidden; white-space: normal"
|
|
127
|
+
>
|
|
124
128
|
<!-- Content for each tab -->
|
|
125
129
|
${map(
|
|
126
130
|
tabs,
|
|
@@ -139,6 +143,10 @@ export class EOxLayerControlTabs extends LitElement {
|
|
|
139
143
|
<!-- Content slot for each tab -->
|
|
140
144
|
<slot name=${`${tab}-content`}>${tab}</slot>
|
|
141
145
|
</div>
|
|
146
|
+
${when(
|
|
147
|
+
this.toolsAsList && index < tabs.length - 1,
|
|
148
|
+
() => html`<hr class="small" />`,
|
|
149
|
+
)}
|
|
142
150
|
`,
|
|
143
151
|
)}
|
|
144
152
|
</figure>
|
|
@@ -168,45 +176,40 @@ export class EOxLayerControlTabs extends LitElement {
|
|
|
168
176
|
.listed .tab.highlighted {
|
|
169
177
|
display: block;
|
|
170
178
|
}
|
|
179
|
+
.listed .tab {
|
|
180
|
+
margin-bottom: .5rem;
|
|
181
|
+
}
|
|
171
182
|
`;
|
|
172
183
|
|
|
173
184
|
#styleEOX = `
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
background: var(--
|
|
185
|
+
${eoxStyle}
|
|
186
|
+
figure {
|
|
187
|
+
padding: var(--padding-vertical) var(--padding);
|
|
188
|
+
background-color: var(--surface); /* fallback */
|
|
189
|
+
background-color: var(--item-hover-color);
|
|
179
190
|
}
|
|
180
|
-
.listed
|
|
181
|
-
|
|
191
|
+
.listed [name*=-icon] {
|
|
192
|
+
display: none;
|
|
182
193
|
}
|
|
183
|
-
.listed
|
|
194
|
+
.listed [name*=-icon]+span {
|
|
184
195
|
text-transform: capitalize;
|
|
185
|
-
font-weight:
|
|
186
|
-
}
|
|
187
|
-
.tabbed, .listed {
|
|
188
|
-
font-size: small;
|
|
196
|
+
font-weight: bold;
|
|
189
197
|
}
|
|
190
|
-
.tabbed label
|
|
191
|
-
|
|
192
|
-
border-
|
|
193
|
-
border-bottom: none;
|
|
194
|
-
pointer-events: none;
|
|
198
|
+
.tabbed > nav > div > label,
|
|
199
|
+
.tabbed > nav > div > span {
|
|
200
|
+
border-bottom: 1px solid var(--surface);
|
|
195
201
|
}
|
|
196
|
-
nav div label,
|
|
197
|
-
nav div span {
|
|
198
|
-
|
|
199
|
-
height: 20px;
|
|
200
|
-
display: flex;
|
|
201
|
-
align-items: center;
|
|
202
|
-
justify-content: center;
|
|
203
|
-
cursor: pointer;
|
|
202
|
+
.tabbed > nav > div > label.highlighted,
|
|
203
|
+
.tabbed > nav > div > span.highlighted {
|
|
204
|
+
border-bottom: 2px solid var(--outline-variant);
|
|
204
205
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
:host {
|
|
207
|
+
--eox-slider-thumb-height: 10px !important;
|
|
208
|
+
--eox-slider-thumb-width: 10px !important;
|
|
209
|
+
--eox-slider-track-height: 4px !important;
|
|
210
|
+
--eox-panel-spacing: 0 !important;
|
|
211
|
+
--eox-slider-margin: 0 !important;
|
|
212
|
+
font-size: small;
|
|
210
213
|
}
|
|
211
214
|
`;
|
|
212
215
|
}
|
package/src/enums/index.js
CHANGED
|
@@ -16,6 +16,8 @@ const LAYER_EOX_CLOUDLESS = (year) => ({
|
|
|
16
16
|
},
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
+
export const STORIES_LAYERCONTROL_STYLE = "width: 240px;";
|
|
20
|
+
|
|
19
21
|
export const STORIES_MAP_STYLE =
|
|
20
22
|
"width: 400px; height: 300px; margin-left: 7px;";
|
|
21
23
|
|
|
@@ -128,9 +130,9 @@ export const STORIES_MAIN_MAP_LAYERS = [
|
|
|
128
130
|
description: "# Hello world",
|
|
129
131
|
},
|
|
130
132
|
layers: [
|
|
131
|
-
STORIES_LAYER_SENTINEL_HUB.wind,
|
|
132
|
-
STORIES_LAYER_SENTINEL_HUB.no2,
|
|
133
133
|
STORIES_LAYER_REGION,
|
|
134
|
+
STORIES_LAYER_SENTINEL_HUB.no2,
|
|
135
|
+
STORIES_LAYER_SENTINEL_HUB.wind,
|
|
134
136
|
],
|
|
135
137
|
},
|
|
136
138
|
{
|
|
@@ -95,7 +95,10 @@ export default function createSortable(element, collection, idProperty, that) {
|
|
|
95
95
|
swapThreshold: 0.5,
|
|
96
96
|
animation: 150,
|
|
97
97
|
easing: "cubic-bezier(1, 0, 0, 1)",
|
|
98
|
-
onStart: (e) =>
|
|
98
|
+
onStart: (e) => {
|
|
99
|
+
console.log(e);
|
|
100
|
+
childNodes = onStart(e);
|
|
101
|
+
},
|
|
99
102
|
onMove: (e) => {
|
|
100
103
|
related = e.related;
|
|
101
104
|
},
|
|
@@ -30,6 +30,7 @@ export default function getLayerType(layer, map) {
|
|
|
30
30
|
|
|
31
31
|
if (isDrawing) return "draw";
|
|
32
32
|
// @ts-expect-error TODO
|
|
33
|
-
else if (layer.declutter_ !== undefined)
|
|
33
|
+
else if (layer.declutter_ !== undefined || layer.get("type") === "Vector")
|
|
34
|
+
return "vector";
|
|
34
35
|
else return "raster";
|
|
35
36
|
}
|
|
@@ -13,7 +13,6 @@ export function getNestedStartVals(schema, nestedValues) {
|
|
|
13
13
|
|
|
14
14
|
// Extract startVal based on type
|
|
15
15
|
if (type && type !== "object") {
|
|
16
|
-
// @ts-expect-error TODO
|
|
17
16
|
startVals[key] =
|
|
18
17
|
type === "number" ? Number(nestedValues[key]) : nestedValues[key];
|
|
19
18
|
} else if (typeof schema[key] === "object" && schema[key]?.properties) {
|
|
@@ -23,7 +22,6 @@ export function getNestedStartVals(schema, nestedValues) {
|
|
|
23
22
|
nestedValues,
|
|
24
23
|
);
|
|
25
24
|
if (Object.keys(nestedStartVals).length > 0) {
|
|
26
|
-
// @ts-expect-error TODO
|
|
27
25
|
startVals[key] = nestedStartVals;
|
|
28
26
|
}
|
|
29
27
|
}
|
|
@@ -60,7 +58,6 @@ export function getStartVals(layer, layerConfig) {
|
|
|
60
58
|
const url = new URL(layer.getSource().getTileUrlFunction()([0, 0, 0]));
|
|
61
59
|
|
|
62
60
|
// Retrieve startVals based on schema and query parameters
|
|
63
|
-
// @ts-expect-error TODO
|
|
64
61
|
nestedValues = Object.fromEntries(url.searchParams.entries());
|
|
65
62
|
} else return null;
|
|
66
63
|
|
package/src/helpers/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html
|
|
1
|
+
import { html } from "lit";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Filters actions based on provided tools and layer properties.
|
|
@@ -40,24 +40,29 @@ export const _parseTools = (tools, layer) =>
|
|
|
40
40
|
* @param {boolean} unstyled - Style preference for the button.
|
|
41
41
|
* @returns {import("lit").HTMLTemplateResult} - Button element.
|
|
42
42
|
*/
|
|
43
|
-
export const Button = (tool, unstyled) => html`
|
|
44
|
-
<button
|
|
43
|
+
export const Button = (tool, icon, unstyled) => html`
|
|
44
|
+
<button
|
|
45
|
+
slot="${tool}-icon"
|
|
46
|
+
class="no-margin transparent square primary-text small"
|
|
47
|
+
>
|
|
48
|
+
${unstyled ? tool : html`<i class="small primary-text">${icon}</i>`}
|
|
49
|
+
</button>
|
|
45
50
|
`;
|
|
46
51
|
|
|
47
52
|
/**
|
|
48
53
|
* Generates a remove button element with event handling and layer control logic.
|
|
49
54
|
*
|
|
50
|
-
* @param {import("../components/layer-tools").EOxLayerControlLayerTools}
|
|
55
|
+
* @param {import("../components/layer-tools").EOxLayerControlLayerTools | import("../components/layer").EOxLayerControlLayer} Component - Instance of EOxLayerControlLayerTools
|
|
51
56
|
* @returns {import("lit").HTMLTemplateResult} - Remove button element.
|
|
52
57
|
*/
|
|
53
|
-
export const removeButton = (
|
|
58
|
+
export const removeButton = (Component, icon) => html`
|
|
54
59
|
<button
|
|
55
|
-
class="remove-icon
|
|
60
|
+
class="remove-icon no-margin transparent square small action"
|
|
56
61
|
@click=${() => {
|
|
57
|
-
const { layer } =
|
|
62
|
+
const { layer } = Component;
|
|
58
63
|
layer?.set("layerControlOptional", true);
|
|
59
64
|
layer?.setVisible(false);
|
|
60
|
-
|
|
65
|
+
Component.dispatchEvent(
|
|
61
66
|
new CustomEvent("changed", {
|
|
62
67
|
detail: layer,
|
|
63
68
|
bubbles: true,
|
|
@@ -65,18 +70,75 @@ export const removeButton = (EOxLayerControlLayerTools) => html`
|
|
|
65
70
|
);
|
|
66
71
|
}}
|
|
67
72
|
>
|
|
68
|
-
${
|
|
73
|
+
${Component.unstyled ? "x" : html`<i class="small red-text">${icon}</i>`}
|
|
69
74
|
</button>
|
|
70
75
|
`;
|
|
71
76
|
|
|
72
77
|
/**
|
|
73
78
|
* Generates a sort button element based on the style preference.
|
|
74
79
|
*
|
|
80
|
+
* @param {import("../components/layer-tools").EOxLayerControlLayerTools | import("../components/layer").EOxLayerControlLayer} Component - Instance of EOxLayerControlLayerTools
|
|
75
81
|
* @param {boolean} unstyled - Style preference for the button.
|
|
76
82
|
* @returns {import("lit").HTMLTemplateResult} - Sort button element.
|
|
77
83
|
*/
|
|
78
|
-
export const sortButton = (unstyled) => html`
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
export const sortButton = (Component, icon, unstyled) => html`
|
|
85
|
+
<button
|
|
86
|
+
class="sort-icon no-margin transparent square primary-text drag-handle small action ${Component.layer.get(
|
|
87
|
+
"layerControlDisable",
|
|
88
|
+
)
|
|
89
|
+
? "disabled"
|
|
90
|
+
: ""}"
|
|
91
|
+
style="cursor: ns-resize;"
|
|
92
|
+
>
|
|
93
|
+
${unstyled ? "═" : html`<i class="small primary-text">${icon}</i>`}
|
|
94
|
+
</button>
|
|
82
95
|
`;
|
|
96
|
+
|
|
97
|
+
export function getToolsIcon() {
|
|
98
|
+
return {
|
|
99
|
+
dots: html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
100
|
+
<title>menu-down</title>
|
|
101
|
+
<path d="M7,10L12,15L17,10H7Z" />
|
|
102
|
+
</svg>`,
|
|
103
|
+
info: html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
104
|
+
<title>information-outline</title>
|
|
105
|
+
<path
|
|
106
|
+
d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"
|
|
107
|
+
/>
|
|
108
|
+
</svg>`,
|
|
109
|
+
opacity: html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
110
|
+
<title>circle-opacity</title>
|
|
111
|
+
<path
|
|
112
|
+
d="M18 10V8H20V10H18M18 12V10H16V12H18M18 8V6H16V8H18M16 2.84V4H18C17.37 3.54 16.71 3.15 16 2.84M18 4V6H20C19.42 5.25 18.75 4.58 18 4M20 6V8H21.16C20.85 7.29 20.46 6.63 20 6M22 12C22 11.32 21.93 10.65 21.8 10H20V12H22M16 6V4H14V6H16M16 16H18V14H16V16M18 18H20L20 18V16H18V18M16 20H18L18 20V18H16V20M14 21.8C14.7 21.66 15.36 21.44 16 21.16V20H14V21.8M18 14H20V12H18V14M16 8H14V10H16V8M20 16H21.16C21.44 15.36 21.66 14.7 21.8 14H20V16M16 12H14V14H16V12M12 18V16H14V14H12V12H14V10H12V8H14V6H12V4H14V2.2C13.35 2.07 12.69 2 12 2C6.5 2 2 6.5 2 12S6.5 22 12 22V20H14V18H12M14 18H16V16H14V18Z"
|
|
113
|
+
/>
|
|
114
|
+
</svg>`,
|
|
115
|
+
config: html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
116
|
+
<title>tune</title>
|
|
117
|
+
<path
|
|
118
|
+
d="M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"
|
|
119
|
+
/>
|
|
120
|
+
</svg>`,
|
|
121
|
+
datetime: html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
122
|
+
<title>calendar-clock-outline</title>
|
|
123
|
+
<path
|
|
124
|
+
d="M6 1V3H5C3.89 3 3 3.89 3 5V19C3 20.1 3.89 21 5 21H11.1C12.36 22.24 14.09 23 16 23C19.87 23 23 19.87 23 16C23 14.09 22.24 12.36 21 11.1V5C21 3.9 20.11 3 19 3H18V1H16V3H8V1M5 5H19V7H5M5 9H19V9.67C18.09 9.24 17.07 9 16 9C12.13 9 9 12.13 9 16C9 17.07 9.24 18.09 9.67 19H5M16 11.15C18.68 11.15 20.85 13.32 20.85 16C20.85 18.68 18.68 20.85 16 20.85C13.32 20.85 11.15 18.68 11.15 16C11.15 13.32 13.32 11.15 16 11.15M15 13V16.69L18.19 18.53L18.94 17.23L16.5 15.82V13Z"
|
|
125
|
+
/>
|
|
126
|
+
</svg>`,
|
|
127
|
+
legend: html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
128
|
+
<title>map-legend</title>
|
|
129
|
+
<path
|
|
130
|
+
d="M9,3L3.36,4.9C3.15,4.97 3,5.15 3,5.38V20.5A0.5,0.5 0 0,0 3.5,21L3.66,20.97L9,18.9L15,21L20.64,19.1C20.85,19.03 21,18.85 21,18.62V3.5A0.5,0.5 0 0,0 20.5,3L20.34,3.03L15,5.1L9,3M8,5.45V17.15L5,18.31V6.46L8,5.45M10,5.47L14,6.87V18.53L10,17.13V5.47M19,5.7V17.54L16,18.55V6.86L19,5.7M7.46,6.3L5.57,6.97V9.12L7.46,8.45V6.3M7.46,9.05L5.57,9.72V11.87L7.46,11.2V9.05M7.46,11.8L5.57,12.47V14.62L7.46,13.95V11.8M7.46,14.55L5.57,15.22V17.37L7.46,16.7V14.55Z"
|
|
131
|
+
/>
|
|
132
|
+
</svg>`,
|
|
133
|
+
remove: html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
134
|
+
<title>delete-outline</title>
|
|
135
|
+
<path
|
|
136
|
+
d="M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z"
|
|
137
|
+
/>
|
|
138
|
+
</svg>`,
|
|
139
|
+
sort: html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
140
|
+
<title>drag-horizontal-variant</title>
|
|
141
|
+
<path d="M21 11H3V9H21V11M21 13H3V15H21V13Z" />
|
|
142
|
+
</svg>`,
|
|
143
|
+
};
|
|
144
|
+
}
|
package/src/main.js
CHANGED
|
@@ -8,6 +8,10 @@ import {
|
|
|
8
8
|
firstUpdatedMethod,
|
|
9
9
|
layerListChangeMethod,
|
|
10
10
|
} from "./methods/layercontrol";
|
|
11
|
+
import eoxStyle from "@eox/ui/style.css?inline";
|
|
12
|
+
import { addCommonStylesheet } from "@eox/elements-utils";
|
|
13
|
+
|
|
14
|
+
addCommonStylesheet();
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* Display layers and groups of a connected OpenLayers map
|
|
@@ -65,7 +69,7 @@ export class EOxLayerControl extends LitElement {
|
|
|
65
69
|
/**
|
|
66
70
|
* Instance of `eox-map` which is a wrapper for the OL
|
|
67
71
|
*
|
|
68
|
-
* @type {import("
|
|
72
|
+
* @type {import("@eox/map").EOxMap}
|
|
69
73
|
*/
|
|
70
74
|
#eoxMap;
|
|
71
75
|
|
|
@@ -216,6 +220,12 @@ export class EOxLayerControl extends LitElement {
|
|
|
216
220
|
${this.styleOverride}
|
|
217
221
|
</style>
|
|
218
222
|
|
|
223
|
+
<span class="layerstitle">
|
|
224
|
+
<slot name="layerstitle"
|
|
225
|
+
><p><strong>Layers</strong></p></slot
|
|
226
|
+
>
|
|
227
|
+
</span>
|
|
228
|
+
|
|
219
229
|
<!-- Conditional rendering of add layers component -->
|
|
220
230
|
${when(
|
|
221
231
|
this.addExternalLayers && this.#eoxMap?.addOrUpdateLayer,
|
|
@@ -267,23 +277,43 @@ export class EOxLayerControl extends LitElement {
|
|
|
267
277
|
}
|
|
268
278
|
|
|
269
279
|
#styleEOX = `
|
|
280
|
+
${eoxStyle}
|
|
270
281
|
:host, :root {
|
|
271
|
-
font-family: Roboto, sans-serif;
|
|
272
282
|
--padding: 0.5rem;
|
|
273
283
|
--padding-vertical: .2rem;
|
|
274
|
-
--list-padding:
|
|
284
|
+
--list-padding: 2rem;
|
|
275
285
|
--layer-input-visibility: flex;
|
|
276
286
|
--layer-summary-visibility: flex;
|
|
277
287
|
--layer-type-visibility: block;
|
|
278
|
-
--layer-title-visibility:
|
|
279
|
-
--layer-visibility:
|
|
288
|
+
--layer-title-visibility: inline;
|
|
289
|
+
--layer-visibility: flex;
|
|
280
290
|
--layer-tools-button-visibility: flex;
|
|
291
|
+
--layer-toggle-button-visibility: none;
|
|
281
292
|
|
|
282
|
-
|
|
283
|
-
|
|
293
|
+
--primary-color: var(--primary);
|
|
294
|
+
--secondary-color: var(--secondary);
|
|
295
|
+
--item-color: color-mix(
|
|
296
|
+
in srgb,
|
|
297
|
+
var(--primary-color) 10%,
|
|
298
|
+
transparent
|
|
299
|
+
);
|
|
300
|
+
--item-hover-color: color-mix(
|
|
301
|
+
in srgb,
|
|
302
|
+
var(--surface) 80%,
|
|
303
|
+
transparent
|
|
304
|
+
);
|
|
305
|
+
|
|
306
|
+
display: flex;
|
|
307
|
+
flex-direction: column;
|
|
284
308
|
--background-color: var(--eox-background-color, transparent);
|
|
285
309
|
background-color: var(--background-color, transparent);
|
|
286
310
|
}
|
|
311
|
+
|
|
312
|
+
.layerstitle {
|
|
313
|
+
display: block;
|
|
314
|
+
padding-left: var(--padding);
|
|
315
|
+
padding-right: var(--padding);
|
|
316
|
+
}
|
|
287
317
|
select {
|
|
288
318
|
background-color: var(--background-color);
|
|
289
319
|
}
|
|
@@ -82,6 +82,7 @@ function updateVectorLayerStyle(styles) {
|
|
|
82
82
|
for (const key in variables) {
|
|
83
83
|
// ol styles expects numbers to be assigned as typeof number
|
|
84
84
|
if (typeof variables[key] === "number") {
|
|
85
|
+
//@ts-expect-error assigning number to string
|
|
85
86
|
rawStyle = rawStyle.replaceAll(`["var","${key}"]`, variables[key]);
|
|
86
87
|
} else {
|
|
87
88
|
// replace all styles variables set of the specific key with the variables value
|
|
@@ -5,18 +5,24 @@ import { getElement } from "@eox/elements-utils";
|
|
|
5
5
|
* Updates the EOxLayerControl's map property based on the target element's map.
|
|
6
6
|
*
|
|
7
7
|
* @param {import("../../main").EOxLayerControl} EOxLayerControl - The EOxLayerControl element.
|
|
8
|
-
* @returns {import("@eox/map
|
|
8
|
+
* @returns {import("@eox/map").EOxMap | null} The EOxMap element or null if not found.
|
|
9
9
|
*/
|
|
10
10
|
const firstUpdatedMethod = (EOxLayerControl) => {
|
|
11
11
|
const foundElement = getElement(EOxLayerControl.for);
|
|
12
12
|
|
|
13
13
|
// Check if the element exists and its map property differs from EOxLayerControl.map
|
|
14
|
-
if (
|
|
14
|
+
if (
|
|
15
|
+
foundElement &&
|
|
16
|
+
/** @type {import("@eox/map").EOxMap} */ (foundElement).map !==
|
|
17
|
+
EOxLayerControl.map
|
|
18
|
+
) {
|
|
15
19
|
// Update the EOxLayerControl's map property
|
|
16
|
-
EOxLayerControl.map =
|
|
20
|
+
EOxLayerControl.map = /** @type {import("@eox/map").EOxMap} */ (
|
|
21
|
+
foundElement
|
|
22
|
+
).map;
|
|
17
23
|
}
|
|
18
24
|
|
|
19
|
-
return foundElement;
|
|
25
|
+
return /** @type {import("@eox/map").EOxMap} */ (foundElement);
|
|
20
26
|
};
|
|
21
27
|
|
|
22
28
|
export default firstUpdatedMethod;
|
|
@@ -54,9 +54,9 @@ export class EOxLayerControlAddLayers extends LitElement {
|
|
|
54
54
|
/**
|
|
55
55
|
* Instance of `eox-map` which is a wrapper for the OL
|
|
56
56
|
*
|
|
57
|
-
* @type {import("@eox/map
|
|
57
|
+
* @type {import("@eox/map").EOxMap}
|
|
58
58
|
*/
|
|
59
|
-
eoxMap:
|
|
59
|
+
eoxMap: import("@eox/map").EOxMap;
|
|
60
60
|
/**
|
|
61
61
|
* Render the element without additional styles
|
|
62
62
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-layers.d.ts","sourceRoot":"","sources":["../../../../src/components/add-layers.js"],"names":[],"mappings":"AAaA;;;;;;;;;GASG;AACH;IAEE;;;;;;;;;;;MAIE;IAEF;;;;OAIG;IACH,iBAAgB;IAEhB;;;;OAIG;IACH,kBAAiB;IAEjB;;;;OAIG;IACH,MAFU,KAAK,GAAG,MAAM,GAAG,IAAI,CAEnB;IAEZ;;;;OAIG;IACH,oBAAmB;IAEnB;;;;OAIG;IACH,iBAFU,OAAO,kBAAkB,EAAE,mBAAmB,CAEjC;IAKrB;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"add-layers.d.ts","sourceRoot":"","sources":["../../../../src/components/add-layers.js"],"names":[],"mappings":"AAaA;;;;;;;;;GASG;AACH;IAEE;;;;;;;;;;;MAIE;IAEF;;;;OAIG;IACH,iBAAgB;IAEhB;;;;OAIG;IACH,kBAAiB;IAEjB;;;;OAIG;IACH,MAFU,KAAK,GAAG,MAAM,GAAG,IAAI,CAEnB;IAEZ;;;;OAIG;IACH,oBAAmB;IAEnB;;;;OAIG;IACH,iBAFU,OAAO,kBAAkB,EAAE,mBAAmB,CAEjC;IAKrB;;;;OAIG;IACH,QAFU,OAAO,UAAU,EAAE,MAAM,CAEjB;IAElB;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAiEvB;;;OAGG;IACH,+CA+IC;;CAaF;2BAzTyC,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-config.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-config.js"],"names":[],"mappings":"AAOA;;;;;IAKI;AAEJ;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;MAKE;IA0BA;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IAEjB;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;;;;;;;OAUG;IACH,aARU;
|
|
1
|
+
{"version":3,"file":"layer-config.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-config.js"],"names":[],"mappings":"AAOA;;;;;IAKI;AAEJ;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;MAKE;IA0BA;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IAEjB;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;;;;;;;OAUG;IACH,aARU;QACN,MAAM,EAAE,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;QAC3B,KAAK,CAAC,EAAE,OAAO,oBAAoB,EAAE,KAAK,CAAA;QAC1C,MAAM,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,EAAE,CAAA;KAC/C,CAEkB;IAEvB;;OAEG;IACH,8DAqBW;QAAE,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;SAAE,CAAC;KAAE,WArBuB;IA+DnE;;OAEG;IACH,+CAiDC;;CA8BF;gCAtOY,OAAO,CAAC,OAAO,gBAAgB,EAAE,YAAY,CAAC,GAAG;IACvD,OAAO,CAAC,EAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAA,KAAK,EAAE,MAAM,GAAC,MAAM,GAAC,OAAO,CAAA;KAAC,CAAA;IACnD,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAC1B;2BAX+B,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-datetime.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-datetime.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;MAKE;IAKA;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;;;;;;;;OAWG;IACH,eATU;
|
|
1
|
+
{"version":3,"file":"layer-datetime.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-datetime.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;MAKE;IAKA;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;;;;;;;;OAWG;IACH,eATU;QACL,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,WAAW,EAAE,MAAM,GAAC,MAAM,CAAC;QAC3B,aAAa,EAAE,CAAC,MAAM,GAAC,MAAM,CAAC,EAAE,CAAC;QACjC,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAEqB;IAEzB;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IA+BnB;;OAEG;IACH,+CA+BC;;CAIF;2BA9HgC,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-group.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-group.js"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUE;IAKA;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IAEjB;;;;OAIG;IACH,mBAAsB;IAEtB;;;;OAIG;IACH,KAHU,OAAO,IAAI,EAAE,GAAG,CAGX;IAEf;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,4BAA+B;IAE/B;;;;OAIG;IACH,OAFU,
|
|
1
|
+
{"version":3,"file":"layer-group.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-group.js"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUE;IAKA;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IAEjB;;;;OAIG;IACH,mBAAsB;IAEtB;;;;OAIG;IACH,KAHU,OAAO,IAAI,EAAE,GAAG,CAGX;IAEf;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,4BAA+B;IAE/B;;;;OAIG;IACH,OAFU,KAAK,CAAC,MAAM,CAAC,CAER;IAEf;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,qBAAwB;IAY1B;;OAEG;IACH,+CA4EC;;CA2BF;2BAlNyC,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-legend.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-legend.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;IAcI;AAEJ;;;;;GAKG;AACH;IAEE;;;;;;;;;;;;;MAKE;IAKA;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IAcnB;;;;QAII;IACJ,
|
|
1
|
+
{"version":3,"file":"layer-legend.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-legend.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;IAcI;AAEJ;;;;;GAKG;AACH;IAEE;;;;;;;;;;;;;MAKE;IAKA;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IAcnB;;;;QAII;IACJ,uBAHW,YAAY,GAAG,YAAY,EAAE,EAiBvC;IA5BD,mBAWW,YAAY,GAAG,YAAY,EAAE,CAHvC;IA6BD,qBAYC;IAED;;OAEG;IACH,+CA2CC;;CAmBF;;;;2BA5KY;IACR,MAAM,EAAC,OAAO,sBAAsB,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IAClE,KAAK,CAAC,EAAC,MAAM,CAAC;IACd,KAAK,EAAC,MAAM,EAAE,CAAC;IACf,KAAK,CAAC,EAAC,MAAM,CAAC;IACd,UAAU,CAAC,EAAC,OAAO,sBAAsB,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;IAC3E,KAAK,CAAC,EAAC,OAAO,sBAAsB,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACjE,UAAU,CAAC,EAAC,OAAO,sBAAsB,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;IAC3E,SAAS,CAAC,EAAC,OAAO,sBAAsB,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IACzE,QAAQ,CAAC,EAAC,OAAO,sBAAsB,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAA;CACxE;2BAhB2C,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-list.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-list.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUE;IAKA;;;;OAIG;IACH,mBAAsB;IAEtB;;;;;OAKG;IACH,QAHU,OAAO,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,EAAE,KAAK,GAAG,OAAO,UAAU,EAAE,KAAK,CAAC,CAGpE;IAElB;;;;;OAKG;IACH,KAHU,OAAO,IAAI,EAAE,GAAG,CAGX;IAEf;;;;OAIG;IACH,OAFU,
|
|
1
|
+
{"version":3,"file":"layer-list.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-list.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUE;IAKA;;;;OAIG;IACH,mBAAsB;IAEtB;;;;;OAKG;IACH,QAHU,OAAO,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,EAAE,KAAK,GAAG,OAAO,UAAU,EAAE,KAAK,CAAC,CAGpE;IAElB;;;;;OAKG;IACH,KAHU,OAAO,IAAI,EAAE,GAAG,CAGX;IAEf;;;;OAIG;IACH,OAFU,KAAK,CAAC,MAAM,CAAC,CAED;IAEtB;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,4BAA+B;IAE/B;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,qBAAwB;IAG1B;;OAEG;IACH,qBAEC;IASD;;;OAGG;IACH,+CAgEC;;CAqCF;2BAvNgC,KAAK"}
|
|
@@ -22,6 +22,9 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
22
22
|
toolsAsList: {
|
|
23
23
|
type: BooleanConstructor;
|
|
24
24
|
};
|
|
25
|
+
embedded: {
|
|
26
|
+
state: boolean;
|
|
27
|
+
};
|
|
25
28
|
};
|
|
26
29
|
/**
|
|
27
30
|
* The native OL layer
|
|
@@ -54,8 +57,9 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
54
57
|
* @type {Boolean}
|
|
55
58
|
*/
|
|
56
59
|
toolsAsList: boolean;
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
embedded: boolean;
|
|
61
|
+
_removeButton: (icon: any) => import("lit-html").HTMLTemplateResult;
|
|
62
|
+
_sortButton: (icon: any) => import("lit-html").HTMLTemplateResult;
|
|
59
63
|
/**
|
|
60
64
|
* Initializes '_button' as a function accepting 'tool' parameter to generate a Button.
|
|
61
65
|
* Uses 'this.unstyled' as a context parameter for Button generation.
|
|
@@ -63,8 +67,8 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
63
67
|
* @param {string} tool - Tool parameter for Button generation.
|
|
64
68
|
* @returns {import("lit").HTMLTemplateResult} - The generated Button element.
|
|
65
69
|
*/
|
|
66
|
-
_button: (tool: string) => import("lit").HTMLTemplateResult;
|
|
67
|
-
_getDefaultTools: () => import("lit-html").TemplateResult<1>;
|
|
70
|
+
_button: (tool: string, icon: any) => import("lit").HTMLTemplateResult;
|
|
71
|
+
_getDefaultTools: (icons: any) => import("lit-html").TemplateResult<1>;
|
|
68
72
|
render(): import("lit-html").TemplateResult<1>;
|
|
69
73
|
#private;
|
|
70
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-tools.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-tools.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layer-tools.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-tools.js"],"names":[],"mappings":"AAmBA;;;;;;GAMG;AACH;IAEE;;;;;;;;;;;;;;;;;;;MAOE;IAKA;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IAEjB;;;;OAIG;IACH,OAFU,KAAK,CAAC,MAAM,CAAC,CAER;IAEf;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,qBAAwB;IAQtB,kBAAwE;IAY5E,oEAAmD;IAGnD,kEAA8D;IAE9D;;;;;;OAMG;IACH,gBAHW,MAAM,gBACJ,OAAO,KAAK,EAAE,kBAAkB,CAEe;IAE5D,uEA0EE;IAEF,+CAwDC;;CAyDF;2BAzSyC,KAAK"}
|
|
@@ -10,6 +10,9 @@ export class EOxLayerControlLayer extends LitElement {
|
|
|
10
10
|
layer: {
|
|
11
11
|
attribute: boolean;
|
|
12
12
|
};
|
|
13
|
+
layerType: {
|
|
14
|
+
attribute: boolean;
|
|
15
|
+
};
|
|
13
16
|
map: {
|
|
14
17
|
attribute: boolean;
|
|
15
18
|
state: boolean;
|
|
@@ -48,6 +51,12 @@ export class EOxLayerControlLayer extends LitElement {
|
|
|
48
51
|
* @see {@link https://openlayers.org/en/latest/apidoc/module-ol_layer_Layer-Layer.html}
|
|
49
52
|
*/
|
|
50
53
|
layer: import("ol/layer").Layer;
|
|
54
|
+
/**
|
|
55
|
+
* The type of the layer, which can be a string representing the layer type.
|
|
56
|
+
*
|
|
57
|
+
* @type {string|undefined} - The inferred layer type: "group", "draw", "vector", "raster", or undefined if not determinable.
|
|
58
|
+
*/
|
|
59
|
+
layerType: string | undefined;
|
|
51
60
|
/**
|
|
52
61
|
* The native OL map
|
|
53
62
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../../../src/components/layer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../../../src/components/layer.js"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUE;IAEF;;;;OAIG;IACH,wCAAsC;IAKpC;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IAEjB;;;;OAIG;IACH,WAFU,MAAM,GAAC,SAAS,CAEA;IAE1B;;;;;OAKG;IACH,KAHU,OAAO,IAAI,EAAE,GAAG,CAGX;IAEf;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,4BAA+B;IAE/B;;;;OAIG;IACH,OAFU,KAAK,CAAC,MAAM,CAAC,CAER;IAEf;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,qBAAwB;IAoB1B;;;OAGG;IACH,qBAEC;IAWD;;;;OAIG;IACH,+CA2MC;;CAoEF;2BApayC,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optional-list.d.ts","sourceRoot":"","sources":["../../../../src/components/optional-list.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;;;;;MAME;IAKA;;;;OAIG;IACH,mBAAsB;IAEtB;;;;;OAKG;IACH,QAHU,OAAO,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,EAAE,KAAK,CAAC,CAGzC;IAElB;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAkBvB;;;;OAIG;IACH,+
|
|
1
|
+
{"version":3,"file":"optional-list.d.ts","sourceRoot":"","sources":["../../../../src/components/optional-list.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;;;;;MAME;IAKA;;;;OAIG;IACH,mBAAsB;IAEtB;;;;;OAKG;IACH,QAHU,OAAO,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,EAAE,KAAK,CAAC,CAGzC;IAElB;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAkBvB;;;;OAIG;IACH,+CA0CC;;CACF;2BA7HgC,KAAK"}
|