@edugis-org/webmapx 0.1.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 +149 -0
- package/dist-lib/WMTS-DCN4zX0-.js +1169 -0
- package/dist-lib/alert-GeHlqlN8.js +310 -0
- package/dist-lib/assets/epsg-lookup.worker-J7TVnHDq.js +1 -0
- package/dist-lib/assets/shapefile.worker-kQfZj6G2.js +4 -0
- package/dist-lib/attribution-format-B4f05_u0.js +62 -0
- package/dist-lib/button-DFdGkRPQ.js +741 -0
- package/dist-lib/cesium-adapter-BHXNytkU.js +1488 -0
- package/dist-lib/checkbox-QoR4S8tV.js +284 -0
- package/dist-lib/chunk-HEgqtunE.js +20 -0
- package/dist-lib/chunk.36O46B5H-B6ZL7Sm1.js +77 -0
- package/dist-lib/chunk.3RPBFEDE-BFO1fHVm.js +138 -0
- package/dist-lib/chunk.5JY5FUCG-DTXsslmx.js +1090 -0
- package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +99 -0
- package/dist-lib/chunk.AJ3ENQ5C-Ci7Gm2b6.js +175 -0
- package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +8 -0
- package/dist-lib/chunk.NYIIDP5N-BikXIStD.js +99 -0
- package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +43 -0
- package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +61 -0
- package/dist-lib/chunk.YHLNUJ7P-D-kanrCf.js +503 -0
- package/dist-lib/core-CMAlSR68.js +22 -0
- package/dist-lib/decorate-CWgUV1hU.js +1139 -0
- package/dist-lib/decorators-B35AgiCU.js +351 -0
- package/dist-lib/deferred-query-service-BJDcngw6.js +386 -0
- package/dist-lib/dist-Dm6b7XCs.js +12318 -0
- package/dist-lib/dist-Ha9LQCut.js +244 -0
- package/dist-lib/dist-c1PlDAd1.js +2359 -0
- package/dist-lib/dist-kKlmcBXq.js +50 -0
- package/dist-lib/divider-CPm675yY.js +41 -0
- package/dist-lib/dropped-config-C_GyVa8o.js +17 -0
- package/dist-lib/dropped-layer-builder-DAaYgUPk.js +396 -0
- package/dist-lib/epsg-definitions-BZLZWa8Q.js +668 -0
- package/dist-lib/esm-CTuscnN5.js +46 -0
- package/dist-lib/file-sniff-Dhxj3KTF.js +251 -0
- package/dist-lib/geo-calculations-DbFJAUoI.js +30 -0
- package/dist-lib/icon-CEOgWlro.js +9 -0
- package/dist-lib/icon-button-Da_nBTy3.js +408 -0
- package/dist-lib/input-CeGntPlT.js +590 -0
- package/dist-lib/layer-discovery-afWzu5hY.js +2825 -0
- package/dist-lib/leaflet-adapter-D9djjrKv.js +1227 -0
- package/dist-lib/lib-CdHVicAE.js +4074 -0
- package/dist-lib/map-layer-registry-2cmkiRDK.js +62 -0
- package/dist-lib/maplibre-adapter-TFc3e0G9.js +1190 -0
- package/dist-lib/maplibre-expression-evaluator-DCWUcpwf.js +7233 -0
- package/dist-lib/marker-utils-DztWXeop.js +12 -0
- package/dist-lib/ol-tilegrid-9VtyxaLG.js +64 -0
- package/dist-lib/openlayers-adapter-DVW1KCRv.js +13307 -0
- package/dist-lib/option-CBxl1mZP.js +1106 -0
- package/dist-lib/papaparse.min-B7v3c0D7.js +501 -0
- package/dist-lib/rbush-C8k41T4z.js +254 -0
- package/dist-lib/shapefile-SawVY6xg.js +207 -0
- package/dist-lib/spinner-DysxdNG9.js +6 -0
- package/dist-lib/src-CL94RDe3.js +111 -0
- package/dist-lib/throttle-BeneRNYK.js +16 -0
- package/dist-lib/toast-Cm28o9U6.js +15 -0
- package/dist-lib/togeojson.es-DAgiTBvg.js +579 -0
- package/dist-lib/tooltip-Cucn1SiD.js +197 -0
- package/dist-lib/webmapx-3d-tool-D4CTD2gB.js +176 -0
- package/dist-lib/webmapx-base-tool-Dm9NAWLD.js +75 -0
- package/dist-lib/webmapx-config-edit-tool-DCTyxqTk.js +389 -0
- package/dist-lib/webmapx-coordinates-tool-jeWohup9.js +648 -0
- package/dist-lib/webmapx-core-bundle-BDImi1RE.js +8203 -0
- package/dist-lib/webmapx-draw-tool-DooAV8cF.js +4336 -0
- package/dist-lib/webmapx-geolocation-tool-Rw3-Iad1.js +788 -0
- package/dist-lib/webmapx-import-layer-tool-DRYviHd5.js +250 -0
- package/dist-lib/webmapx-info-tool-BJA157cy.js +412 -0
- package/dist-lib/webmapx-language-osmvector-M5y_lwOg.js +489 -0
- package/dist-lib/webmapx-measure-tool-BXhMJFC6.js +590 -0
- package/dist-lib/webmapx-modal-tool-eF6Naluv.js +84 -0
- package/dist-lib/webmapx-plugin-tool-D2Hghf9n.js +45 -0
- package/dist-lib/webmapx-print-tool-ob1bOsR5.js +348 -0
- package/dist-lib/webmapx-search-tool-Cv8BrYvY.js +437 -0
- package/dist-lib/webmapx-settings-DDEJ8aoV.js +479 -0
- package/dist-lib/webmapx-truearea-tool-CMB4Orm-.js +615 -0
- package/dist-lib/webmapx-view-mode-tool-CUpLNjOj.js +106 -0
- package/dist-lib/webmapx.css +2 -0
- package/dist-lib/webmapx.js +1321 -0
- package/dist-lib/wms-feature-info-C0RVMEQC.js +145 -0
- package/dist-lib/wms-url-builder-DIJLQ1v2.js +54 -0
- package/dist-lib/zip.js-DVhmtjxZ.js +3615 -0
- package/package.json +107 -0
- package/public/data/country-epsg-codes.json +297 -0
- package/public/data/world-countries-simplified.topojson +1 -0
- package/src/locales/en/core.json +20 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { n as e, r as t, t as n } from "./map-layer-registry-2cmkiRDK.js";
|
|
2
|
+
//#region src/store/map-state-store.ts
|
|
3
|
+
var r = class {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.state = {
|
|
6
|
+
mapLoaded: !1,
|
|
7
|
+
mapBusy: !1,
|
|
8
|
+
bufferRadiusKm: 5,
|
|
9
|
+
zoomLevel: null,
|
|
10
|
+
mapCenter: null,
|
|
11
|
+
mapBearing: 0,
|
|
12
|
+
mapPitch: 0,
|
|
13
|
+
mapViewportBounds: null,
|
|
14
|
+
pointerCoordinates: null,
|
|
15
|
+
lastClickedCoordinates: null,
|
|
16
|
+
pointerResolution: null,
|
|
17
|
+
lastClickedResolution: null,
|
|
18
|
+
mapLayers: {},
|
|
19
|
+
activeTool: null
|
|
20
|
+
}, this.listeners = [];
|
|
21
|
+
}
|
|
22
|
+
getState() {
|
|
23
|
+
return Object.freeze({ ...this.state });
|
|
24
|
+
}
|
|
25
|
+
dispatch(e, t) {
|
|
26
|
+
let n = this.state;
|
|
27
|
+
this.state = {
|
|
28
|
+
...n,
|
|
29
|
+
...e
|
|
30
|
+
}, this.listeners.forEach((e) => e(this.getState(), t));
|
|
31
|
+
}
|
|
32
|
+
subscribe(e) {
|
|
33
|
+
return this.listeners.push(e), () => {
|
|
34
|
+
this.listeners = this.listeners.filter((t) => t !== e);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}, i = class {
|
|
38
|
+
constructor() {
|
|
39
|
+
this.listeners = /* @__PURE__ */ new Map();
|
|
40
|
+
}
|
|
41
|
+
on(e, t) {
|
|
42
|
+
return this.listeners.has(e) || this.listeners.set(e, /* @__PURE__ */ new Set()), this.listeners.get(e).add(t), () => {
|
|
43
|
+
this.listeners.get(e)?.delete(t);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
once(e, t) {
|
|
47
|
+
let n = (r) => {
|
|
48
|
+
this.off(e, n), t(r);
|
|
49
|
+
};
|
|
50
|
+
return this.on(e, n);
|
|
51
|
+
}
|
|
52
|
+
off(e, t) {
|
|
53
|
+
this.listeners.get(e)?.delete(t);
|
|
54
|
+
}
|
|
55
|
+
emit(e) {
|
|
56
|
+
let t = this.listeners.get(e.type);
|
|
57
|
+
t && t.forEach((t) => {
|
|
58
|
+
try {
|
|
59
|
+
t(e);
|
|
60
|
+
} catch (t) {
|
|
61
|
+
console.error(`[MapEventBus] Error in listener for "${e.type}":`, t);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
clear(e) {
|
|
66
|
+
e ? this.listeners.delete(e) : this.listeners.clear();
|
|
67
|
+
}
|
|
68
|
+
}, a = null, o = null;
|
|
69
|
+
async function s() {
|
|
70
|
+
try {
|
|
71
|
+
let e = await fetch("config/apikeys.json");
|
|
72
|
+
e.ok && (a = await e.json());
|
|
73
|
+
} catch {}
|
|
74
|
+
}
|
|
75
|
+
function c() {
|
|
76
|
+
return o ||= s(), o;
|
|
77
|
+
}
|
|
78
|
+
function l(e) {
|
|
79
|
+
return a ? e.replace(/\{key-([^}]+)\}/g, (e, t) => a[t] ?? e) : e;
|
|
80
|
+
}
|
|
81
|
+
function u(e) {
|
|
82
|
+
if (!a) return e;
|
|
83
|
+
if (typeof e == "string") return l(e);
|
|
84
|
+
if (Array.isArray(e)) return e.map(u);
|
|
85
|
+
if (typeof e == "object" && e) {
|
|
86
|
+
let t = {};
|
|
87
|
+
for (let [n, r] of Object.entries(e)) t[n] = u(r);
|
|
88
|
+
return t;
|
|
89
|
+
}
|
|
90
|
+
return e;
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/map/base-adapter.ts
|
|
94
|
+
var d = class {
|
|
95
|
+
constructor() {
|
|
96
|
+
this.sourceAttributions = /* @__PURE__ */ new Map(), this.layerConfigStore = /* @__PURE__ */ new Map(), this.store = new r(), this.events = new i(), this.events.on("view-change-end", (e) => {
|
|
97
|
+
this.store.dispatch({
|
|
98
|
+
mapBearing: e.bearing,
|
|
99
|
+
mapPitch: e.pitch
|
|
100
|
+
}, "MAP");
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
trackSourceAttribution(e, t) {
|
|
104
|
+
t && typeof t.attribution == "string" && t.attribution.length > 0 ? this.sourceAttributions.set(e, t.attribution) : this.sourceAttributions.delete(e);
|
|
105
|
+
}
|
|
106
|
+
getSourceAttribution(e) {
|
|
107
|
+
return this.sourceAttributions.get(e);
|
|
108
|
+
}
|
|
109
|
+
addSource(e, t) {
|
|
110
|
+
this.trackSourceAttribution(e, t), this.engineAddSource(e, t);
|
|
111
|
+
}
|
|
112
|
+
hasLayer(e) {
|
|
113
|
+
return (this.store.getState().mapLayers ?? {})[e] !== void 0;
|
|
114
|
+
}
|
|
115
|
+
async addLayer(e, t) {
|
|
116
|
+
await c(), e = u(e);
|
|
117
|
+
let r = await this.engineAddLayer(e, t);
|
|
118
|
+
if (r) {
|
|
119
|
+
n(this.store, e);
|
|
120
|
+
let r = e?.id ?? e?.metadata?.mapLayerId;
|
|
121
|
+
if (typeof r == "string") {
|
|
122
|
+
this.layerConfigStore.set(r, {
|
|
123
|
+
config: e,
|
|
124
|
+
options: t
|
|
125
|
+
});
|
|
126
|
+
let n = Object.keys(this.store.getState().mapLayers ?? {});
|
|
127
|
+
this.events.emit({
|
|
128
|
+
type: "layer-add",
|
|
129
|
+
layerId: r,
|
|
130
|
+
activeLayers: n
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return r;
|
|
135
|
+
}
|
|
136
|
+
removeLayer(e) {
|
|
137
|
+
this.layerConfigStore.delete(e), this.engineRemoveLayer(e), t(this.store, e);
|
|
138
|
+
let n = Object.keys(this.store.getState().mapLayers ?? {});
|
|
139
|
+
this.events.emit({
|
|
140
|
+
type: "layer-remove",
|
|
141
|
+
layerId: e,
|
|
142
|
+
activeLayers: n
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
drainLayerConfigs() {
|
|
146
|
+
let e = Object.keys(this.store.getState().mapLayers ?? {}).map((e) => this.layerConfigStore.get(e)).filter((e) => e !== void 0);
|
|
147
|
+
return this.layerConfigStore.clear(), this.store.dispatch({ mapLayers: {} }, "INIT"), e;
|
|
148
|
+
}
|
|
149
|
+
moveLayer(t, n) {
|
|
150
|
+
this.getLogicalLayerExecutor().moveLayer(t, n), e(this.store, t, n);
|
|
151
|
+
let r = Object.keys(this.store.getState().mapLayers ?? {});
|
|
152
|
+
this.events.emit({
|
|
153
|
+
type: "layer-reorder",
|
|
154
|
+
layerId: t,
|
|
155
|
+
activeLayers: r
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
updateLayerStyle(e, t, n) {
|
|
159
|
+
return this.getLogicalLayerExecutor().updateLayerStyle(e, t, n);
|
|
160
|
+
}
|
|
161
|
+
removeSource(e) {
|
|
162
|
+
let n = this.store.getState().mapLayers ?? {};
|
|
163
|
+
for (let [r, i] of Object.entries(n)) if (i.sourceId === e) {
|
|
164
|
+
t(this.store, r);
|
|
165
|
+
let e = Object.keys(this.store.getState().mapLayers ?? {});
|
|
166
|
+
this.events.emit({
|
|
167
|
+
type: "layer-remove",
|
|
168
|
+
layerId: r,
|
|
169
|
+
activeLayers: e
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
this.sourceAttributions.delete(e), this.engineRemoveSource(e);
|
|
173
|
+
}
|
|
174
|
+
getSource(e) {
|
|
175
|
+
return this.getCore().getSource(e) ?? (this.getLogicalLayerExecutor().getSourceData(e) === null ? void 0 : {
|
|
176
|
+
id: e,
|
|
177
|
+
setData: (t) => {
|
|
178
|
+
this.getLogicalLayerExecutor().setSourceData(e, t);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
suppressBusySignalForSource(e) {
|
|
183
|
+
this.getCore().suppressBusySignalForSource(e);
|
|
184
|
+
}
|
|
185
|
+
unsuppressBusySignalForSource(e) {
|
|
186
|
+
this.getCore().unsuppressBusySignalForSource(e);
|
|
187
|
+
}
|
|
188
|
+
addMarker(e, t, n) {
|
|
189
|
+
this.getMarkerService()?.add(e, t, n);
|
|
190
|
+
}
|
|
191
|
+
moveMarker(e, t) {
|
|
192
|
+
this.getMarkerService()?.move(e, t);
|
|
193
|
+
}
|
|
194
|
+
removeMarker(e) {
|
|
195
|
+
this.getMarkerService()?.remove(e);
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region src/map/layer-source-utils.ts
|
|
200
|
+
function f(e, t) {
|
|
201
|
+
if (typeof t != "object" || !t) return null;
|
|
202
|
+
let n = t;
|
|
203
|
+
if (typeof n.id == "string" && n.id.length > 0) return {
|
|
204
|
+
...n,
|
|
205
|
+
id: e
|
|
206
|
+
};
|
|
207
|
+
if (n.type === "raster") {
|
|
208
|
+
let t = Array.isArray(n.tiles) ? n.tiles.filter((e) => typeof e == "string") : Array.isArray(n.url) ? n.url.filter((e) => typeof e == "string") : typeof n.url == "string" ? [n.url] : [];
|
|
209
|
+
if (t.length === 0) return null;
|
|
210
|
+
let r = (e) => /\{x\}|\{y\}|\{z\}|\{-y\}|\{s\}/i.test(e), i = typeof n.service == "string" ? n.service : void 0;
|
|
211
|
+
return i === "wms" || !i && t.length > 0 && !r(t[0]) && t[0].includes("?") ? {
|
|
212
|
+
id: e,
|
|
213
|
+
type: "raster",
|
|
214
|
+
service: "wms",
|
|
215
|
+
url: t[0],
|
|
216
|
+
...typeof n.layers == "string" ? { layers: n.layers } : {},
|
|
217
|
+
...typeof n.version == "string" ? { version: n.version } : {},
|
|
218
|
+
...typeof n.format == "string" ? { format: n.format } : {},
|
|
219
|
+
...typeof n.attribution == "string" ? { attribution: n.attribution } : {},
|
|
220
|
+
...n.tileSize === void 0 ? {} : { tileSize: n.tileSize },
|
|
221
|
+
...n.minzoom === void 0 ? {} : { minzoom: n.minzoom },
|
|
222
|
+
...n.maxzoom === void 0 ? {} : { maxzoom: n.maxzoom },
|
|
223
|
+
...n.bounds === void 0 ? {} : { bounds: n.bounds }
|
|
224
|
+
} : {
|
|
225
|
+
id: e,
|
|
226
|
+
type: "raster",
|
|
227
|
+
service: "xyz",
|
|
228
|
+
url: t,
|
|
229
|
+
...n.attribution ? { attribution: n.attribution } : {}
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
if (n.type === "geojson") {
|
|
233
|
+
let t = n.data;
|
|
234
|
+
return typeof t != "string" && typeof t != "object" ? null : {
|
|
235
|
+
id: e,
|
|
236
|
+
type: "geojson",
|
|
237
|
+
data: t
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
return n.type === "vector" && typeof n.url == "string" ? {
|
|
241
|
+
id: e,
|
|
242
|
+
type: "vector",
|
|
243
|
+
url: n.url
|
|
244
|
+
} : null;
|
|
245
|
+
}
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region src/map/composite-layer-utils.ts
|
|
248
|
+
function p(e) {
|
|
249
|
+
return e.id ? e.id : e.type === "background" ? "background" : e.source ? `${e.source}-${e.type}` : e.type;
|
|
250
|
+
}
|
|
251
|
+
function m(e) {
|
|
252
|
+
let t = e.id, n = e.sources ?? {}, r = e.layers ?? [];
|
|
253
|
+
if (r.length === 0) return null;
|
|
254
|
+
let i = [];
|
|
255
|
+
for (let [e, r] of Object.entries(n)) {
|
|
256
|
+
let n = `${t}:${e}`, a = f(n, r);
|
|
257
|
+
a && i.push({
|
|
258
|
+
key: e,
|
|
259
|
+
globalId: n,
|
|
260
|
+
config: a
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
return {
|
|
264
|
+
styleId: t,
|
|
265
|
+
sources: i,
|
|
266
|
+
subLayers: r.map((e) => ({
|
|
267
|
+
...e,
|
|
268
|
+
id: p(e)
|
|
269
|
+
})),
|
|
270
|
+
metadata: e.metadata && typeof e.metadata == "object" ? e.metadata : void 0,
|
|
271
|
+
rawConfig: e
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function h(e, t) {
|
|
275
|
+
if (t) return e.sources.find((e) => e.key === t);
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/map/layer-opacity-utils.ts
|
|
279
|
+
var g = [
|
|
280
|
+
"fill-opacity",
|
|
281
|
+
"line-opacity",
|
|
282
|
+
"circle-opacity",
|
|
283
|
+
"raster-opacity",
|
|
284
|
+
"fill-extrusion-opacity",
|
|
285
|
+
"heatmap-opacity",
|
|
286
|
+
"background-opacity",
|
|
287
|
+
"icon-opacity",
|
|
288
|
+
"text-opacity"
|
|
289
|
+
];
|
|
290
|
+
function _(e) {
|
|
291
|
+
if (e) for (let t of g) {
|
|
292
|
+
let n = e[t];
|
|
293
|
+
if (typeof n == "number") return n;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
function v(e) {
|
|
297
|
+
if (e.type === "style") {
|
|
298
|
+
for (let t of e.layers ?? []) {
|
|
299
|
+
let e = _(t.paint);
|
|
300
|
+
if (e !== void 0) return e;
|
|
301
|
+
}
|
|
302
|
+
return 1;
|
|
303
|
+
}
|
|
304
|
+
return _(e.paint) ?? 1;
|
|
305
|
+
}
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region src/map/logical-layer-executor.ts
|
|
308
|
+
var y = class {
|
|
309
|
+
constructor() {
|
|
310
|
+
this.pendingAddRequests = [], this.pendingRemoveRequests = [], this.baseOpacity = /* @__PURE__ */ new Map();
|
|
311
|
+
}
|
|
312
|
+
bind(e) {
|
|
313
|
+
this.layerService = e, this.flushPendingOperations();
|
|
314
|
+
}
|
|
315
|
+
unbind() {
|
|
316
|
+
this.layerService = void 0, this.pendingAddRequests = [], this.pendingRemoveRequests = [], this.baseOpacity.clear();
|
|
317
|
+
}
|
|
318
|
+
async addLayer(e, t) {
|
|
319
|
+
return this.baseOpacity.set(e.id, v(e)), this.layerService ? this.layerService.addLayer(e, t) : new Promise((n) => {
|
|
320
|
+
this.pendingAddRequests.push({
|
|
321
|
+
layerConfig: e,
|
|
322
|
+
options: t,
|
|
323
|
+
resolve: n
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
removeLayer(e) {
|
|
328
|
+
if (this.baseOpacity.delete(e), this.layerService) {
|
|
329
|
+
this.layerService.removeLayer(e);
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
this.pendingRemoveRequests.push(e);
|
|
333
|
+
}
|
|
334
|
+
moveLayer(e, t) {
|
|
335
|
+
this.layerService?.moveLayer(e, t);
|
|
336
|
+
}
|
|
337
|
+
getVisibleLayers() {
|
|
338
|
+
return this.layerService?.getVisibleLayers() ?? [];
|
|
339
|
+
}
|
|
340
|
+
isLayerVisible(e) {
|
|
341
|
+
return this.layerService?.isLayerVisible(e) ?? !1;
|
|
342
|
+
}
|
|
343
|
+
setLayerVisibility(e, t) {
|
|
344
|
+
this.layerService?.setLayerVisibility(e, t);
|
|
345
|
+
}
|
|
346
|
+
setLayerOpacity(e, t) {
|
|
347
|
+
let n = this.baseOpacity.get(e) ?? 1;
|
|
348
|
+
this.layerService?.setLayerOpacity(e, n * t);
|
|
349
|
+
}
|
|
350
|
+
getSourceData(e) {
|
|
351
|
+
return this.layerService?.getSourceData(e) ?? null;
|
|
352
|
+
}
|
|
353
|
+
querySourceFeatures(e, t) {
|
|
354
|
+
return this.layerService?.querySourceFeatures?.(e, t) ?? null;
|
|
355
|
+
}
|
|
356
|
+
setSourceData(e, t) {
|
|
357
|
+
return this.layerService?.setSourceData(e, t) ?? !1;
|
|
358
|
+
}
|
|
359
|
+
updateLayerStyle(e, t, n) {
|
|
360
|
+
return this.layerService?.updateLayerStyle(e, t, n) ?? !1;
|
|
361
|
+
}
|
|
362
|
+
flushPendingOperations() {
|
|
363
|
+
if (!this.layerService) return;
|
|
364
|
+
let e = [...this.pendingRemoveRequests];
|
|
365
|
+
this.pendingRemoveRequests = [];
|
|
366
|
+
for (let t of e) this.layerService.removeLayer(t);
|
|
367
|
+
let t = [...this.pendingAddRequests];
|
|
368
|
+
this.pendingAddRequests = [], t.forEach(async (e) => {
|
|
369
|
+
try {
|
|
370
|
+
let t = await this.layerService.addLayer(e.layerConfig, e.options);
|
|
371
|
+
e.resolve(t);
|
|
372
|
+
} catch {
|
|
373
|
+
e.resolve(!1);
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
}, b = class {
|
|
378
|
+
bind(e) {
|
|
379
|
+
this.service = e;
|
|
380
|
+
}
|
|
381
|
+
async queryFeatures(e, t) {
|
|
382
|
+
return this.service ? this.service.queryFeatures(e, t) : [];
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
//#endregion
|
|
386
|
+
export { f as a, m as i, y as n, d as o, h as r, b as t };
|