@phila/layerboard 3.0.0-beta.36 → 3.0.0-beta.38
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/components/Layerboard.vue.d.ts +6 -0
- package/dist/composables/useLayerConfig.d.ts +2 -0
- package/dist/composables/useLayerboard.d.ts +8 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +525 -497
- package/dist/layerboard.css +1 -1
- package/dist/types/layer.d.ts +3 -0
- package/dist/utils/webmap-transformer.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ge, ref as x, watch as Oe, computed as _, nextTick as Ne, onMounted as lt, onUnmounted as Vt, createElementBlock as M, openBlock as h, createVNode as
|
|
1
|
+
import { defineComponent as ge, ref as x, watch as Oe, computed as _, nextTick as Ne, onMounted as lt, onUnmounted as Vt, createElementBlock as M, openBlock as h, createVNode as J, unref as p, withCtx as He, createBlock as G, createCommentVNode as A, Fragment as ue, renderList as Le, useAttrs as Kt, toRef as Qt, normalizeClass as ne, createElementVNode as P, toDisplayString as H, renderSlot as he, withDirectives as Zt, mergeProps as vt, vModelDynamic as Xt, createTextVNode as $e, normalizeProps as Pt, guardReactiveProps as Ft, normalizeStyle as ye, withModifiers as Yt, readonly as q, provide as N, onBeforeUnmount as eo, useId as Tt, resolveComponent as to, vShow as oo } from "vue";
|
|
2
2
|
import { Map as ao, DrawTool as io, RasterLayer as It, CircleLayer as Et, FillLayer as Ot, LineLayer as gt, MapMarker as lo, MapPopup as no } from "@phila/phila-ui-map-core";
|
|
3
3
|
import { cn as bt, Icon as ke, BaseLink as ro, ActionContent as zt } from "@phila/phila-ui-core";
|
|
4
4
|
const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
@@ -24,36 +24,36 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
24
24
|
},
|
|
25
25
|
emits: ["zoom", "layerLoading", "layerError"],
|
|
26
26
|
setup(e, { emit: a }) {
|
|
27
|
-
const l = e, o = a, r = x(null), n = x(null),
|
|
27
|
+
const l = e, o = a, r = x(null), n = x(null), c = x(0);
|
|
28
28
|
function w(t) {
|
|
29
|
-
o("zoom", t), n.value && (
|
|
29
|
+
o("zoom", t), n.value && (c.value = f(n.value));
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
const
|
|
33
|
-
return k * Math.cos(I) / Math.pow(2,
|
|
31
|
+
function f(t) {
|
|
32
|
+
const u = t.getZoom(), b = t.getCenter().lat, k = 559082264028e-3, I = b * Math.PI / 180;
|
|
33
|
+
return k * Math.cos(I) / Math.pow(2, u);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
36
|
-
async function i(t,
|
|
35
|
+
const S = x({}), y = x(null), m = x(/* @__PURE__ */ new Set());
|
|
36
|
+
async function i(t, u, s, b, k) {
|
|
37
37
|
const I = encodeURIComponent(b || "1=1"), B = JSON.stringify({
|
|
38
|
-
xmin:
|
|
39
|
-
ymin:
|
|
40
|
-
xmax:
|
|
41
|
-
ymax:
|
|
38
|
+
xmin: u.west,
|
|
39
|
+
ymin: u.south,
|
|
40
|
+
xmax: u.east,
|
|
41
|
+
ymax: u.north,
|
|
42
42
|
spatialReference: { wkid: 4326 }
|
|
43
|
-
}), Y = k !== void 0 && k < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, k) * 512)}` : "",
|
|
43
|
+
}), Y = k !== void 0 && k < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, k) * 512)}` : "", X = 2e3;
|
|
44
44
|
let pe = 0, we = [], se = !0;
|
|
45
45
|
for (; se; ) {
|
|
46
|
-
const te = `${t}/query?where=${I}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${
|
|
46
|
+
const te = `${t}/query?where=${I}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${X}&resultOffset=${pe}${Y}&f=geojson`, R = await fetch(te);
|
|
47
47
|
if (!R.ok)
|
|
48
48
|
throw new Error(`HTTP ${R.status}: ${R.statusText}`);
|
|
49
|
-
const
|
|
50
|
-
|
|
49
|
+
const j = await R.json();
|
|
50
|
+
j.features && j.features.length > 0 ? (we = we.concat(j.features), pe += j.features.length, se = j.features.length === X) : se = !1;
|
|
51
51
|
}
|
|
52
52
|
return we = we.map((te) => {
|
|
53
53
|
if (te.properties) {
|
|
54
54
|
const R = {};
|
|
55
|
-
for (const
|
|
56
|
-
R[
|
|
55
|
+
for (const j of Object.keys(te.properties))
|
|
56
|
+
R[j.toLowerCase()] = te.properties[j];
|
|
57
57
|
return { ...te, properties: R };
|
|
58
58
|
}
|
|
59
59
|
return te;
|
|
@@ -62,14 +62,14 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
62
62
|
features: we
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
async function g(t,
|
|
66
|
-
const b =
|
|
65
|
+
async function g(t, u, s) {
|
|
66
|
+
const b = u.map(async (k) => {
|
|
67
67
|
const I = l.layerList.find((B) => B.config.id === k)?.config;
|
|
68
68
|
if (I) {
|
|
69
69
|
o("layerLoading", k, !0);
|
|
70
70
|
try {
|
|
71
71
|
const B = await i(I.url, t, k, I.where, s);
|
|
72
|
-
|
|
72
|
+
S.value = { ...S.value, [k]: B }, o("layerError", k, null);
|
|
73
73
|
} catch (B) {
|
|
74
74
|
const Y = B instanceof Error ? B.message : "Failed to load";
|
|
75
75
|
o("layerError", k, Y);
|
|
@@ -81,37 +81,37 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
81
81
|
await Promise.all(b);
|
|
82
82
|
}
|
|
83
83
|
function d(t) {
|
|
84
|
-
const
|
|
84
|
+
const u = new Set(t);
|
|
85
85
|
for (const s of l.layerList)
|
|
86
|
-
s.config.parentId &&
|
|
87
|
-
return [...
|
|
86
|
+
s.config.parentId && u.has(s.config.parentId) && u.add(s.config.id);
|
|
87
|
+
return [...u];
|
|
88
88
|
}
|
|
89
|
-
async function L(t,
|
|
89
|
+
async function L(t, u) {
|
|
90
90
|
const s = d([...l.visibleLayers]);
|
|
91
|
-
await g(t, s,
|
|
91
|
+
await g(t, s, u);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function C(t) {
|
|
94
94
|
y.value = t.bounds, L(t.bounds, t.zoom);
|
|
95
95
|
}
|
|
96
96
|
function E(t) {
|
|
97
97
|
n.value = t;
|
|
98
|
-
const
|
|
98
|
+
const u = t.getBounds();
|
|
99
99
|
y.value = {
|
|
100
|
-
west:
|
|
101
|
-
south:
|
|
102
|
-
east:
|
|
103
|
-
north:
|
|
100
|
+
west: u.getWest(),
|
|
101
|
+
south: u.getSouth(),
|
|
102
|
+
east: u.getEast(),
|
|
103
|
+
north: u.getNorth()
|
|
104
104
|
};
|
|
105
105
|
const s = t.getZoom();
|
|
106
|
-
o("zoom", s),
|
|
106
|
+
o("zoom", s), c.value = f(t), L(y.value, s);
|
|
107
107
|
}
|
|
108
108
|
Oe(
|
|
109
109
|
() => l.visibleLayers,
|
|
110
110
|
async () => {
|
|
111
111
|
if (re.value.length > 0 && Ie(), y.value) {
|
|
112
|
-
const t = new Set(l.visibleLayers),
|
|
112
|
+
const t = new Set(l.visibleLayers), u = [...t].filter((b) => !m.value.has(b));
|
|
113
113
|
m.value = new Set(t);
|
|
114
|
-
const s = d(
|
|
114
|
+
const s = d(u);
|
|
115
115
|
if (s.length > 0) {
|
|
116
116
|
const b = n.value?.getZoom();
|
|
117
117
|
await g(y.value, s, b);
|
|
@@ -121,11 +121,11 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
121
121
|
);
|
|
122
122
|
function F(t) {
|
|
123
123
|
if (l.visibleLayers.has(t)) return !0;
|
|
124
|
-
const
|
|
125
|
-
return !!
|
|
124
|
+
const u = l.layerList.find((s) => s.config.id === t)?.config;
|
|
125
|
+
return !!u?.parentId && l.visibleLayers.has(u.parentId);
|
|
126
126
|
}
|
|
127
127
|
function V(t) {
|
|
128
|
-
return !!
|
|
128
|
+
return !!S.value[t.id];
|
|
129
129
|
}
|
|
130
130
|
const T = _(
|
|
131
131
|
() => l.layerList.filter((t) => t.config.type === "circle" && F(t.config.id) && V(t.config)).map((t) => t.config)
|
|
@@ -141,12 +141,12 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
141
141
|
Oe(ee, async (t) => {
|
|
142
142
|
if (t.length < 2) return;
|
|
143
143
|
await Ne();
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
144
|
+
const u = n.value;
|
|
145
|
+
if (u)
|
|
146
146
|
for (let s = t.length - 1; s >= 0; s--) {
|
|
147
147
|
const b = s < t.length - 1 ? t[s + 1].id : "highlight-lines";
|
|
148
148
|
try {
|
|
149
|
-
|
|
149
|
+
u.getLayer(t[s].id) && u.moveLayer(t[s].id, b);
|
|
150
150
|
} catch {
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -173,7 +173,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
173
173
|
if (!Qe.value.has(t.id)) {
|
|
174
174
|
Qe.value.add(t.id);
|
|
175
175
|
try {
|
|
176
|
-
const
|
|
176
|
+
const u = t.url.replace(/\/$/, ""), s = await fetch(`${u}?f=json`);
|
|
177
177
|
if (!s.ok)
|
|
178
178
|
return;
|
|
179
179
|
const b = await s.json(), k = b.minScale || 0;
|
|
@@ -197,11 +197,11 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
197
197
|
function Xe(t) {
|
|
198
198
|
if (!t.scaleBasedRendering)
|
|
199
199
|
return "tiled";
|
|
200
|
-
const
|
|
201
|
-
if (!
|
|
200
|
+
const u = Ue.value[t.id];
|
|
201
|
+
if (!u)
|
|
202
202
|
return "tiled";
|
|
203
|
-
const s =
|
|
204
|
-
return s === 0 || s >
|
|
203
|
+
const s = c.value;
|
|
204
|
+
return s === 0 || s > u.maxScale ? "tiled" : "dynamic";
|
|
205
205
|
}
|
|
206
206
|
const ut = _(() => l.tiledLayers ? l.tiledLayers.filter((t) => U(t.id) ? t.scaleBasedRendering ? Xe(t) === "tiled" : !0 : !1) : []), De = _(() => l.tiledLayers ? l.tiledLayers.filter((t) => U(t.id) && t.scaleBasedRendering ? Xe(t) === "dynamic" : !1) : []);
|
|
207
207
|
function je(t) {
|
|
@@ -212,63 +212,63 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
212
212
|
attribution: t.attribution || ""
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
return { type: "geojson", data:
|
|
215
|
+
function Pe(t) {
|
|
216
|
+
return { type: "geojson", data: S.value[t.id], tolerance: 0 };
|
|
217
217
|
}
|
|
218
218
|
function Fe(t) {
|
|
219
219
|
return l.layerOpacities[t] ?? 1;
|
|
220
220
|
}
|
|
221
221
|
function qe(t) {
|
|
222
|
-
const
|
|
222
|
+
const u = Fe(t.id), s = t.type === "circle" ? "circle-opacity" : t.type === "fill" ? "fill-opacity" : "line-opacity";
|
|
223
223
|
if (t.type === "fill" && t.paint["fill-opacity"] === 0)
|
|
224
224
|
return { ...t.paint, "fill-opacity": 0 };
|
|
225
225
|
const b = t.type === "circle" ? "circle-color" : t.type === "fill" ? "fill-color" : "line-color", k = { ...t.paint }, I = k[b], B = k[s] === 1, Y = typeof I == "string" && I.startsWith("rgba(");
|
|
226
226
|
if (B && Y) {
|
|
227
|
-
if (
|
|
227
|
+
if (u === 1)
|
|
228
228
|
return k;
|
|
229
229
|
{
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
const [, pe, we, se, te] =
|
|
230
|
+
const X = I.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
231
|
+
if (X && X[4]) {
|
|
232
|
+
const [, pe, we, se, te] = X, R = parseFloat(te) * u;
|
|
233
233
|
k[b] = `rgba(${pe}, ${we}, ${se}, ${R})`, k[s] = 1;
|
|
234
234
|
}
|
|
235
235
|
return k;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
if (Y) {
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
241
|
-
const [, pe, we, se] =
|
|
239
|
+
const X = I.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
240
|
+
if (X) {
|
|
241
|
+
const [, pe, we, se] = X;
|
|
242
242
|
k[b] = `rgb(${pe}, ${we}, ${se})`;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
return k[s] =
|
|
245
|
+
return k[s] = u, k;
|
|
246
246
|
}
|
|
247
247
|
function dt(t) {
|
|
248
|
-
const
|
|
249
|
-
return { ...t.outlinePaint, "line-opacity":
|
|
248
|
+
const u = Fe(t.id);
|
|
249
|
+
return { ...t.outlinePaint, "line-opacity": u };
|
|
250
250
|
}
|
|
251
251
|
const re = x([]), Te = x(null), oe = x(0);
|
|
252
252
|
function _e(t) {
|
|
253
|
-
const
|
|
254
|
-
return l.layerList.find((b) => b.config.id ===
|
|
253
|
+
const u = t.replace(/-outline$/, "");
|
|
254
|
+
return l.layerList.find((b) => b.config.id === u)?.config;
|
|
255
255
|
}
|
|
256
|
-
function Ye(t,
|
|
256
|
+
function Ye(t, u) {
|
|
257
257
|
return t.replace(/\{([^}]+)\}/g, (s, b) => {
|
|
258
|
-
const k =
|
|
258
|
+
const k = u[b];
|
|
259
259
|
return k == null ? "" : String(k);
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
function be(t) {
|
|
263
263
|
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
264
264
|
}
|
|
265
|
-
function Ge(t,
|
|
265
|
+
function Ge(t, u, s) {
|
|
266
266
|
if (t == null) return "-";
|
|
267
|
-
if (
|
|
267
|
+
if (u?.dateFormat && typeof t == "number") {
|
|
268
268
|
const b = new Date(t);
|
|
269
|
-
if (s &&
|
|
269
|
+
if (s && u.dateFormat === "shortDateShortTime")
|
|
270
270
|
return b.toLocaleString(void 0, { dateStyle: "short", timeStyle: "short" });
|
|
271
|
-
switch (
|
|
271
|
+
switch (u.dateFormat) {
|
|
272
272
|
case "shortDateShortTime":
|
|
273
273
|
return b.toLocaleDateString();
|
|
274
274
|
case "longMonthDayYear":
|
|
@@ -282,16 +282,16 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
if (typeof t == "number") {
|
|
285
|
-
if (t > 1e12 && !
|
|
285
|
+
if (t > 1e12 && !u)
|
|
286
286
|
return new Date(t).toLocaleDateString();
|
|
287
|
-
const b =
|
|
287
|
+
const b = u?.places, k = u?.digitSeparator ?? !0;
|
|
288
288
|
if (b !== void 0) {
|
|
289
289
|
if (Number.isInteger(t) && b >= 0)
|
|
290
290
|
return String(t);
|
|
291
291
|
const I = t.toFixed(b);
|
|
292
292
|
if (k) {
|
|
293
|
-
const B = I.split("."), Y = B[0] || "0",
|
|
294
|
-
return
|
|
293
|
+
const B = I.split("."), Y = B[0] || "0", X = B[1], pe = Y.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
294
|
+
return X ? `${pe}.${X}` : pe;
|
|
295
295
|
}
|
|
296
296
|
return I;
|
|
297
297
|
}
|
|
@@ -300,16 +300,16 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
300
300
|
return String(t);
|
|
301
301
|
}
|
|
302
302
|
function et(t) {
|
|
303
|
-
const
|
|
303
|
+
const u = /* @__PURE__ */ new Set();
|
|
304
304
|
return t.filter((s) => {
|
|
305
305
|
const k = `${s.layer.id.replace(/-outline$/, "")}:${JSON.stringify(s.properties)}`;
|
|
306
|
-
return
|
|
306
|
+
return u.has(k) ? !1 : (u.add(k), !0);
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
|
-
function Se(t,
|
|
310
|
-
const s =
|
|
309
|
+
function Se(t, u) {
|
|
310
|
+
const s = S.value[t];
|
|
311
311
|
if (!s?.features) return null;
|
|
312
|
-
const b =
|
|
312
|
+
const b = u.objectid ?? u.OBJECTID ?? u.FID;
|
|
313
313
|
if (b != null) {
|
|
314
314
|
const k = s.features.find(
|
|
315
315
|
(I) => (I.properties?.objectid ?? I.properties?.OBJECTID ?? I.properties?.FID) === b
|
|
@@ -318,9 +318,9 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
318
318
|
}
|
|
319
319
|
return null;
|
|
320
320
|
}
|
|
321
|
-
function ft(t,
|
|
321
|
+
function ft(t, u) {
|
|
322
322
|
const s = /* @__PURE__ */ new Map();
|
|
323
|
-
return
|
|
323
|
+
return u.forEach((b, k) => {
|
|
324
324
|
s.set(b.id, k);
|
|
325
325
|
}), t.sort((b, k) => {
|
|
326
326
|
const I = b.layer.id.replace(/-outline$/, ""), B = k.layer.id.replace(/-outline$/, ""), Y = s.get(I) ?? -1;
|
|
@@ -328,24 +328,24 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
function ae(t) {
|
|
331
|
-
const
|
|
332
|
-
if (!
|
|
331
|
+
const u = n.value;
|
|
332
|
+
if (!u) return;
|
|
333
333
|
const s = [];
|
|
334
334
|
l.layerList.forEach((R) => {
|
|
335
|
-
const
|
|
336
|
-
F(
|
|
335
|
+
const j = R.config;
|
|
336
|
+
F(j.id) && (s.push(j.id), j.outlinePaint && s.push(`${j.id}-outline`));
|
|
337
337
|
});
|
|
338
|
-
const b = s.filter((R) =>
|
|
338
|
+
const b = s.filter((R) => u.getLayer(R));
|
|
339
339
|
if (b.length === 0) return;
|
|
340
|
-
const k =
|
|
340
|
+
const k = u.project([t.lngLat.lng, t.lngLat.lat]), I = 10, B = [
|
|
341
341
|
[k.x - I, k.y - I],
|
|
342
342
|
[k.x + I, k.y + I]
|
|
343
|
-
], Y =
|
|
343
|
+
], Y = u.queryRenderedFeatures(B, {
|
|
344
344
|
layers: b
|
|
345
345
|
});
|
|
346
346
|
if (Y.length === 0) return;
|
|
347
|
-
const
|
|
348
|
-
const
|
|
347
|
+
const X = et(Y), pe = l.layerList.map((R) => R.config), se = ft(X, pe).map((R) => {
|
|
348
|
+
const j = R.layer.id.replace(/-outline$/, ""), ce = _e(j);
|
|
349
349
|
if (!ce) return null;
|
|
350
350
|
const yt = Se(ce.id, R.properties || {});
|
|
351
351
|
return {
|
|
@@ -357,10 +357,10 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
357
357
|
};
|
|
358
358
|
}).filter((R) => R !== null);
|
|
359
359
|
if (se.length === 0) return;
|
|
360
|
-
se.sort((R,
|
|
361
|
-
const ce = R.popupConfig?.popupSortField, yt =
|
|
360
|
+
se.sort((R, j) => {
|
|
361
|
+
const ce = R.popupConfig?.popupSortField, yt = j.popupConfig?.popupSortField;
|
|
362
362
|
if (!ce || ce !== yt) return 0;
|
|
363
|
-
const ht = R.properties[ce], mt =
|
|
363
|
+
const ht = R.properties[ce], mt = j.properties[ce];
|
|
364
364
|
if (ht == null || mt == null) return 0;
|
|
365
365
|
const Mt = R.popupConfig?.popupSortOrder !== "asc";
|
|
366
366
|
return ht < mt ? Mt ? 1 : -1 : ht > mt ? Mt ? -1 : 1 : 0;
|
|
@@ -369,10 +369,10 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
369
369
|
if (te) {
|
|
370
370
|
const R = _e(te.layerId);
|
|
371
371
|
if (R) {
|
|
372
|
-
const
|
|
372
|
+
const j = K(te.geometry), ce = Z(R.id, R.type);
|
|
373
373
|
$.value = {
|
|
374
374
|
geometry: te.geometry,
|
|
375
|
-
geometryType:
|
|
375
|
+
geometryType: j,
|
|
376
376
|
layerId: R.id,
|
|
377
377
|
properties: te.properties,
|
|
378
378
|
originalStyle: ce
|
|
@@ -385,8 +385,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
385
385
|
}
|
|
386
386
|
function Ee(t) {
|
|
387
387
|
if (re.value.length === 0) return;
|
|
388
|
-
const
|
|
389
|
-
if (!(
|
|
388
|
+
const u = t.target;
|
|
389
|
+
if (!(u.tagName === "INPUT" || u.tagName === "TEXTAREA" || u.isContentEditable))
|
|
390
390
|
switch (t.key) {
|
|
391
391
|
case "ArrowLeft":
|
|
392
392
|
case "ArrowUp":
|
|
@@ -419,16 +419,16 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
419
419
|
}), Ae = _(() => {
|
|
420
420
|
const t = ie.value;
|
|
421
421
|
if (!t) return "";
|
|
422
|
-
let
|
|
423
|
-
if (
|
|
424
|
-
|
|
422
|
+
let u = '<div class="popup-content">';
|
|
423
|
+
if (u += `<h3 class="popup-title">${be(Re.value)}</h3>`, t.popupConfig?.fields?.length) {
|
|
424
|
+
u += `<table class="popup-table" aria-label="${be(Re.value)}">`;
|
|
425
425
|
for (const s of t.popupConfig.fields) {
|
|
426
|
-
const b = Ge(t.properties[s.field], s.format, t.popupConfig.showTime), k = s.label.toLowerCase(), I = k.includes("url") || k.includes("website"), B = b.startsWith("http://") || b.startsWith("https://") || b.startsWith("www.") || I && b.includes("."), Y = b.startsWith("http://") || b.startsWith("https://") ? b : `https://${b}`,
|
|
427
|
-
|
|
426
|
+
const b = Ge(t.properties[s.field], s.format, t.popupConfig.showTime), k = s.label.toLowerCase(), I = k.includes("url") || k.includes("website"), B = b.startsWith("http://") || b.startsWith("https://") || b.startsWith("www.") || I && b.includes("."), Y = b.startsWith("http://") || b.startsWith("https://") ? b : `https://${b}`, X = B ? `<a href="${be(Y)}" target="_blank" rel="noopener noreferrer">${be(b)}</a>` : be(b);
|
|
427
|
+
u += `<tr><th scope="row">${be(s.label)}</th><td>${X}</td></tr>`;
|
|
428
428
|
}
|
|
429
|
-
|
|
429
|
+
u += "</table>";
|
|
430
430
|
}
|
|
431
|
-
return
|
|
431
|
+
return u += "</div>", u;
|
|
432
432
|
}), le = x({
|
|
433
433
|
type: "FeatureCollection",
|
|
434
434
|
features: []
|
|
@@ -452,18 +452,18 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
452
452
|
"fill-color": "#808080",
|
|
453
453
|
"fill-opacity": 0.5
|
|
454
454
|
}, $ = x(null);
|
|
455
|
-
function
|
|
455
|
+
function K(t) {
|
|
456
456
|
return t.type;
|
|
457
457
|
}
|
|
458
|
-
function Z(t,
|
|
458
|
+
function Z(t, u) {
|
|
459
459
|
const s = _e(t);
|
|
460
460
|
if (!s) return { radius: 5, width: 2 };
|
|
461
461
|
const b = s.paint || {};
|
|
462
|
-
if (
|
|
462
|
+
if (u === "circle") {
|
|
463
463
|
const k = b["circle-radius"];
|
|
464
464
|
return typeof k == "number" ? { radius: k } : { radius: 5 };
|
|
465
465
|
}
|
|
466
|
-
if (
|
|
466
|
+
if (u === "line" || u === "fill") {
|
|
467
467
|
const k = b["line-width"];
|
|
468
468
|
if (typeof k == "number")
|
|
469
469
|
return { width: k };
|
|
@@ -476,11 +476,11 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
476
476
|
}
|
|
477
477
|
return { radius: 5, width: 2 };
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Q(t) {
|
|
480
480
|
return !t || t.length === 0 ? [] : t[0] ?? [];
|
|
481
481
|
}
|
|
482
482
|
function Ce(t) {
|
|
483
|
-
const { geometry:
|
|
483
|
+
const { geometry: u, geometryType: s, originalStyle: b } = t;
|
|
484
484
|
if (s === "Point" || s === "MultiPoint") {
|
|
485
485
|
const I = (b.radius || 5) + 3;
|
|
486
486
|
return {
|
|
@@ -488,7 +488,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
488
488
|
features: [
|
|
489
489
|
{
|
|
490
490
|
type: "Feature",
|
|
491
|
-
geometry:
|
|
491
|
+
geometry: u,
|
|
492
492
|
properties: {
|
|
493
493
|
highlightRadius: I
|
|
494
494
|
}
|
|
@@ -503,7 +503,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
503
503
|
features: [
|
|
504
504
|
{
|
|
505
505
|
type: "Feature",
|
|
506
|
-
geometry:
|
|
506
|
+
geometry: u,
|
|
507
507
|
properties: {
|
|
508
508
|
highlightWidth: I
|
|
509
509
|
}
|
|
@@ -512,7 +512,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
514
|
if (s === "Polygon") {
|
|
515
|
-
const k =
|
|
515
|
+
const k = u.coordinates, I = Q(k), Y = (b.width || 2) + 3;
|
|
516
516
|
return {
|
|
517
517
|
type: "FeatureCollection",
|
|
518
518
|
features: [
|
|
@@ -530,14 +530,14 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
532
|
if (s === "MultiPolygon") {
|
|
533
|
-
const k =
|
|
533
|
+
const k = u.coordinates, B = (b.width || 2) + 3;
|
|
534
534
|
return {
|
|
535
535
|
type: "FeatureCollection",
|
|
536
|
-
features: k.map((
|
|
536
|
+
features: k.map((X) => ({
|
|
537
537
|
type: "Feature",
|
|
538
538
|
geometry: {
|
|
539
539
|
type: "LineString",
|
|
540
|
-
coordinates:
|
|
540
|
+
coordinates: Q(X)
|
|
541
541
|
},
|
|
542
542
|
properties: {
|
|
543
543
|
highlightWidth: B
|
|
@@ -551,10 +551,10 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
function Ze(t) {
|
|
554
|
-
const { geometry:
|
|
554
|
+
const { geometry: u, geometryType: s } = t;
|
|
555
555
|
return s === "Polygon" || s === "MultiPolygon" ? {
|
|
556
556
|
type: "FeatureCollection",
|
|
557
|
-
features: [{ type: "Feature", geometry:
|
|
557
|
+
features: [{ type: "Feature", geometry: u, properties: {} }]
|
|
558
558
|
} : { type: "FeatureCollection", features: [] };
|
|
559
559
|
}
|
|
560
560
|
function Gt(t) {
|
|
@@ -562,8 +562,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
562
562
|
Ht();
|
|
563
563
|
return;
|
|
564
564
|
}
|
|
565
|
-
const
|
|
566
|
-
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (le.value =
|
|
565
|
+
const u = Ce(t);
|
|
566
|
+
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (le.value = u, Be.value = { type: "FeatureCollection", features: [] }, Ve.value = { type: "FeatureCollection", features: [] }) : (Be.value = u, le.value = { type: "FeatureCollection", features: [] }, Ve.value = Ze(t));
|
|
567
567
|
}
|
|
568
568
|
function Ht() {
|
|
569
569
|
le.value = { type: "FeatureCollection", features: [] }, Be.value = { type: "FeatureCollection", features: [] }, Ve.value = { type: "FeatureCollection", features: [] };
|
|
@@ -582,13 +582,13 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
582
582
|
$.value = null;
|
|
583
583
|
return;
|
|
584
584
|
}
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
587
|
-
const s =
|
|
585
|
+
const u = _e(t.layerId);
|
|
586
|
+
if (u) {
|
|
587
|
+
const s = K(t.geometry), b = Z(u.id, u.type);
|
|
588
588
|
$.value = {
|
|
589
589
|
geometry: t.geometry,
|
|
590
590
|
geometryType: s,
|
|
591
|
-
layerId:
|
|
591
|
+
layerId: u.id,
|
|
592
592
|
properties: t.properties,
|
|
593
593
|
originalStyle: b
|
|
594
594
|
};
|
|
@@ -596,11 +596,11 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
596
596
|
});
|
|
597
597
|
const $t = x(null);
|
|
598
598
|
function Jt(t) {
|
|
599
|
-
const [
|
|
600
|
-
$t.value = [
|
|
599
|
+
const [u, s] = t.geometry.coordinates;
|
|
600
|
+
$t.value = [u, s];
|
|
601
601
|
}
|
|
602
|
-
return (t,
|
|
603
|
-
|
|
602
|
+
return (t, u) => (h(), M("div", so, [
|
|
603
|
+
J(p(ao), {
|
|
604
604
|
ref_key: "mapRef",
|
|
605
605
|
ref: r,
|
|
606
606
|
zoom: l.initialZoom,
|
|
@@ -619,16 +619,16 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
619
619
|
"tool-panel-split-ratio": 50,
|
|
620
620
|
onZoom: w,
|
|
621
621
|
onClick: Ie,
|
|
622
|
-
onMoveend:
|
|
622
|
+
onMoveend: C,
|
|
623
623
|
onLoad: E,
|
|
624
624
|
onSearchResult: Jt
|
|
625
625
|
}, {
|
|
626
626
|
default: He(() => [
|
|
627
|
-
l.drawControlPosition !== null ? (h(),
|
|
627
|
+
l.drawControlPosition !== null ? (h(), G(p(io), {
|
|
628
628
|
key: 0,
|
|
629
629
|
position: l.drawControlPosition
|
|
630
630
|
}, null, 8, ["position"])) : A("", !0),
|
|
631
|
-
(h(!0), M(ue, null, Le(ut.value, (s) => (h(),
|
|
631
|
+
(h(!0), M(ue, null, Le(ut.value, (s) => (h(), G(p(It), {
|
|
632
632
|
id: "tiled-" + s.id,
|
|
633
633
|
key: "tiled-" + s.id,
|
|
634
634
|
source: ct(s),
|
|
@@ -637,7 +637,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
637
637
|
maxzoom: s.maxZoom,
|
|
638
638
|
"before-id": "highlight-circles"
|
|
639
639
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
640
|
-
(h(!0), M(ue, null, Le(De.value, (s) => (h(),
|
|
640
|
+
(h(!0), M(ue, null, Le(De.value, (s) => (h(), G(p(It), {
|
|
641
641
|
id: "dynamic-" + s.id,
|
|
642
642
|
key: "dynamic-" + s.id,
|
|
643
643
|
source: je(s),
|
|
@@ -646,69 +646,69 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
646
646
|
maxzoom: s.maxZoom,
|
|
647
647
|
"before-id": "highlight-circles"
|
|
648
648
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
649
|
-
(h(!0), M(ue, null, Le(T.value, (s) => (h(),
|
|
649
|
+
(h(!0), M(ue, null, Le(T.value, (s) => (h(), G(p(Et), {
|
|
650
650
|
id: s.id,
|
|
651
651
|
key: s.id,
|
|
652
|
-
source:
|
|
652
|
+
source: Pe(s),
|
|
653
653
|
paint: qe(s),
|
|
654
654
|
minzoom: s.minZoom,
|
|
655
655
|
maxzoom: s.maxZoom,
|
|
656
656
|
"before-id": "highlight-circles",
|
|
657
657
|
onClick: ae
|
|
658
658
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
659
|
-
(h(!0), M(ue, null, Le(O.value, (s) => (h(),
|
|
659
|
+
(h(!0), M(ue, null, Le(O.value, (s) => (h(), G(p(Ot), {
|
|
660
660
|
id: s.id,
|
|
661
661
|
key: s.id,
|
|
662
|
-
source:
|
|
662
|
+
source: Pe(s),
|
|
663
663
|
paint: qe(s),
|
|
664
664
|
minzoom: s.minZoom,
|
|
665
665
|
maxzoom: s.maxZoom,
|
|
666
666
|
"before-id": "highlight-circles",
|
|
667
667
|
onClick: ae
|
|
668
668
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
669
|
-
(h(!0), M(ue, null, Le(D.value, (s) => (h(),
|
|
669
|
+
(h(!0), M(ue, null, Le(D.value, (s) => (h(), G(p(gt), {
|
|
670
670
|
id: s.id + "-outline",
|
|
671
671
|
key: s.id + "-outline",
|
|
672
|
-
source:
|
|
672
|
+
source: Pe(s),
|
|
673
673
|
paint: dt(s),
|
|
674
674
|
minzoom: s.minZoom,
|
|
675
675
|
maxzoom: s.maxZoom,
|
|
676
676
|
"before-id": "highlight-lines",
|
|
677
677
|
onClick: ae
|
|
678
678
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
679
|
-
(h(!0), M(ue, null, Le(ee.value, (s) => (h(),
|
|
679
|
+
(h(!0), M(ue, null, Le(ee.value, (s) => (h(), G(p(gt), {
|
|
680
680
|
id: s.id,
|
|
681
681
|
key: s.id,
|
|
682
|
-
source:
|
|
682
|
+
source: Pe(s),
|
|
683
683
|
paint: qe(s),
|
|
684
684
|
minzoom: s.minZoom,
|
|
685
685
|
maxzoom: s.maxZoom,
|
|
686
686
|
"before-id": "highlight-lines",
|
|
687
687
|
onClick: ae
|
|
688
688
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
689
|
-
|
|
689
|
+
J(p(Et), {
|
|
690
690
|
id: "highlight-circles",
|
|
691
691
|
key: "highlight-circles-layer",
|
|
692
692
|
source: { type: "geojson", data: le.value },
|
|
693
693
|
paint: pt
|
|
694
694
|
}, null, 8, ["source"]),
|
|
695
|
-
|
|
695
|
+
J(p(Ot), {
|
|
696
696
|
id: "highlight-fill",
|
|
697
697
|
key: "highlight-fill-layer",
|
|
698
698
|
source: { type: "geojson", data: Ve.value },
|
|
699
699
|
paint: v
|
|
700
700
|
}, null, 8, ["source"]),
|
|
701
|
-
|
|
701
|
+
J(p(gt), {
|
|
702
702
|
id: "highlight-lines",
|
|
703
703
|
key: "highlight-lines-layer",
|
|
704
704
|
source: { type: "geojson", data: Be.value },
|
|
705
705
|
paint: ot
|
|
706
706
|
}, null, 8, ["source"]),
|
|
707
|
-
|
|
707
|
+
J(p(lo), {
|
|
708
708
|
"lng-lat": $t.value,
|
|
709
709
|
color: "#2176d2"
|
|
710
710
|
}, null, 8, ["lng-lat"]),
|
|
711
|
-
ie.value && Te.value ? (h(),
|
|
711
|
+
ie.value && Te.value ? (h(), G(p(no), {
|
|
712
712
|
key: 1,
|
|
713
713
|
"lng-lat": Te.value,
|
|
714
714
|
html: Ae.value,
|
|
@@ -727,12 +727,12 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
727
727
|
}, 8, ["zoom", "center", "navigation-controls", "geolocation-control", "basemap-change-controls", "map-search-control", "cyclomedia-config", "cyclomedia-button-position", "pictometry-credentials", "pictometry-button-position"])
|
|
728
728
|
]));
|
|
729
729
|
}
|
|
730
|
-
}),
|
|
730
|
+
}), Me = (e, a) => {
|
|
731
731
|
const l = e.__vccOpts || e;
|
|
732
732
|
for (const [o, r] of a)
|
|
733
733
|
l[o] = r;
|
|
734
734
|
return l;
|
|
735
|
-
}, uo = /* @__PURE__ */
|
|
735
|
+
}, uo = /* @__PURE__ */ Me(co, [["__scopeId", "data-v-1f8b1f59"]]);
|
|
736
736
|
function Nt(e) {
|
|
737
737
|
let a = e.split("?")[0] || e;
|
|
738
738
|
return a = a.replace(/\/query$/, ""), a = a.replace(/\/$/, ""), a = a.replace(/^https?:\/\//, ""), a.toLowerCase();
|
|
@@ -759,7 +759,7 @@ const fo = ["disabled"], po = /* @__PURE__ */ ge({
|
|
|
759
759
|
svgRaw: {}
|
|
760
760
|
},
|
|
761
761
|
setup(e) {
|
|
762
|
-
const a = e, l = (
|
|
762
|
+
const a = e, l = (c) => "href" in c && c.href !== void 0 || "to" in c && c.to !== void 0, o = _(() => bt(
|
|
763
763
|
"phila-button",
|
|
764
764
|
`phila-button--${a.variant}`,
|
|
765
765
|
a.size && `is-${a.size}`,
|
|
@@ -787,12 +787,12 @@ const fo = ["disabled"], po = /* @__PURE__ */ ge({
|
|
|
787
787
|
size: a.size
|
|
788
788
|
})
|
|
789
789
|
);
|
|
790
|
-
return (
|
|
790
|
+
return (c, w) => l(a) ? (h(), G(p(ro), vt({ key: 0 }, { ...r.value, ...c.$attrs }, { role: "button" }), {
|
|
791
791
|
default: He(() => [
|
|
792
|
-
|
|
792
|
+
J(p(zt), Pt(Ft(n.value)), {
|
|
793
793
|
default: He(() => [
|
|
794
|
-
he(
|
|
795
|
-
|
|
794
|
+
he(c.$slots, "default", {}, () => [
|
|
795
|
+
$e(H(a.text), 1)
|
|
796
796
|
])
|
|
797
797
|
]),
|
|
798
798
|
_: 3
|
|
@@ -804,11 +804,11 @@ const fo = ["disabled"], po = /* @__PURE__ */ ge({
|
|
|
804
804
|
type: "button",
|
|
805
805
|
disabled: a.disabled,
|
|
806
806
|
class: o.value
|
|
807
|
-
},
|
|
808
|
-
|
|
807
|
+
}, c.$attrs), [
|
|
808
|
+
J(p(zt), Pt(Ft(n.value)), {
|
|
809
809
|
default: He(() => [
|
|
810
|
-
he(
|
|
811
|
-
|
|
810
|
+
he(c.$slots, "default", {}, () => [
|
|
811
|
+
$e(H(a.text), 1)
|
|
812
812
|
])
|
|
813
813
|
]),
|
|
814
814
|
_: 3
|
|
@@ -849,17 +849,17 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
849
849
|
},
|
|
850
850
|
emits: ["update:modelValue"],
|
|
851
851
|
setup(e, { emit: a }) {
|
|
852
|
-
const l = Kt(), o = e, r = _(() => typeof o.error == "string" ? o.error : o.error[0]), n = Qt(o, "id"),
|
|
852
|
+
const l = Kt(), o = e, r = _(() => typeof o.error == "string" ? o.error : o.error[0]), n = Qt(o, "id"), c = a, w = x(""), f = _({
|
|
853
853
|
get: () => o.modelValue !== void 0 ? o.modelValue : w.value,
|
|
854
854
|
set: (d) => {
|
|
855
|
-
|
|
855
|
+
c("update:modelValue", d), w.value = d;
|
|
856
856
|
}
|
|
857
|
-
}),
|
|
857
|
+
}), S = _(() => {
|
|
858
858
|
const d = ["default-class"];
|
|
859
859
|
return l.disabled != null && d.push("phila-input--disabled"), r.value && d.push("phila-input--error"), l.required != null && d.push("phila-input--required"), bt(...d);
|
|
860
860
|
}), y = _(() => {
|
|
861
861
|
const d = [];
|
|
862
|
-
return
|
|
862
|
+
return f.value !== "" && d.push("phila-text-field--filled"), o.className && d.push(o.className), bt(...d);
|
|
863
863
|
}), m = _(() => {
|
|
864
864
|
if (!(o.label || l["aria-label"]))
|
|
865
865
|
return o.placeholder || void 0;
|
|
@@ -867,19 +867,19 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
867
867
|
d.target.closest("button") || i.value?.focus();
|
|
868
868
|
};
|
|
869
869
|
return (d, L) => (h(), M("div", {
|
|
870
|
-
class: ne(["phila-input",
|
|
870
|
+
class: ne(["phila-input", S.value])
|
|
871
871
|
}, [
|
|
872
872
|
o.label ? (h(), M("label", {
|
|
873
873
|
key: 0,
|
|
874
874
|
for: n.value,
|
|
875
875
|
class: "has-text-label-small phila-label"
|
|
876
|
-
},
|
|
876
|
+
}, H(o.label), 9, vo)) : A("", !0),
|
|
877
877
|
P("div", {
|
|
878
878
|
class: ne(["phila-text-field", y.value]),
|
|
879
879
|
onClick: g
|
|
880
880
|
}, [
|
|
881
881
|
P("div", bo, [
|
|
882
|
-
o.leadingIcon ? (h(),
|
|
882
|
+
o.leadingIcon ? (h(), G(p(ke), {
|
|
883
883
|
key: 0,
|
|
884
884
|
"icon-class": o.leadingIcon,
|
|
885
885
|
inline: "",
|
|
@@ -891,24 +891,24 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
891
891
|
id: n.value,
|
|
892
892
|
ref_key: "inputRef",
|
|
893
893
|
ref: i,
|
|
894
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
894
|
+
"onUpdate:modelValue": L[0] || (L[0] = (C) => f.value = C),
|
|
895
895
|
class: "phila-text-field-input has-text-body-default",
|
|
896
896
|
placeholder: o.placeholder,
|
|
897
897
|
"aria-label": m.value
|
|
898
|
-
},
|
|
899
|
-
[Xt,
|
|
898
|
+
}, p(l)), null, 16, So), [
|
|
899
|
+
[Xt, f.value]
|
|
900
900
|
])
|
|
901
901
|
])
|
|
902
902
|
]),
|
|
903
|
-
|
|
903
|
+
f.value != "" ? (h(), G(p(po), {
|
|
904
904
|
key: 1,
|
|
905
905
|
variant: "standard",
|
|
906
906
|
size: "small",
|
|
907
907
|
"icon-only": "",
|
|
908
|
-
"icon-definition":
|
|
909
|
-
onClick: L[1] || (L[1] = (
|
|
908
|
+
"icon-definition": p(go),
|
|
909
|
+
onClick: L[1] || (L[1] = (C) => f.value = "")
|
|
910
910
|
}, null, 8, ["icon-definition"])) : A("", !0),
|
|
911
|
-
o.trailingIcon ? (h(),
|
|
911
|
+
o.trailingIcon ? (h(), G(p(ke), {
|
|
912
912
|
key: 2,
|
|
913
913
|
size: "small",
|
|
914
914
|
"icon-class": o.trailingIcon,
|
|
@@ -918,15 +918,15 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
918
918
|
he(d.$slots, "trailing-action")
|
|
919
919
|
])
|
|
920
920
|
], 2),
|
|
921
|
-
o.supportingText ? (h(), M("div", Co,
|
|
921
|
+
o.supportingText ? (h(), M("div", Co, H(o.supportingText), 1)) : A("", !0),
|
|
922
922
|
r.value ? (h(), M("div", ko, [
|
|
923
|
-
|
|
924
|
-
"icon-definition":
|
|
923
|
+
J(p(ke), {
|
|
924
|
+
"icon-definition": p(ho),
|
|
925
925
|
size: "small",
|
|
926
926
|
inline: "",
|
|
927
927
|
decorative: ""
|
|
928
928
|
}, null, 8, ["icon-definition"]),
|
|
929
|
-
|
|
929
|
+
$e(" " + H(r.value), 1)
|
|
930
930
|
])) : A("", !0)
|
|
931
931
|
], 2));
|
|
932
932
|
}
|
|
@@ -982,7 +982,7 @@ const Io = {
|
|
|
982
982
|
e.unavailable ? (h(), M("span", Oo, " (zoom in) ")) : A("", !0)
|
|
983
983
|
], 64));
|
|
984
984
|
}
|
|
985
|
-
}), nt = /* @__PURE__ */
|
|
985
|
+
}), nt = /* @__PURE__ */ Me(zo, [["__scopeId", "data-v-19b1b402"]]), Do = { class: "opacity-control" }, _o = ["for"], Ro = ["id", "value", "aria-label"], Ao = /* @__PURE__ */ ge({
|
|
986
986
|
__name: "LayerOpacitySlider",
|
|
987
987
|
props: {
|
|
988
988
|
layerId: {},
|
|
@@ -1000,7 +1000,7 @@ const Io = {
|
|
|
1000
1000
|
P("label", {
|
|
1001
1001
|
class: "opacity-label",
|
|
1002
1002
|
for: "opacity-" + e.layerId
|
|
1003
|
-
}, " Opacity: " +
|
|
1003
|
+
}, " Opacity: " + H(Math.round(e.opacity * 100)) + "% ", 9, _o),
|
|
1004
1004
|
P("input", {
|
|
1005
1005
|
id: "opacity-" + e.layerId,
|
|
1006
1006
|
type: "range",
|
|
@@ -1014,7 +1014,10 @@ const Io = {
|
|
|
1014
1014
|
}, null, 40, Ro)
|
|
1015
1015
|
]));
|
|
1016
1016
|
}
|
|
1017
|
-
}), Lt = /* @__PURE__ */
|
|
1017
|
+
}), Lt = /* @__PURE__ */ Me(Ao, [["__scopeId", "data-v-1a025f6a"]]), Bo = ["aria-label"], Vo = {
|
|
1018
|
+
key: 3,
|
|
1019
|
+
class: "legend-label"
|
|
1020
|
+
}, Zo = /* @__PURE__ */ ge({
|
|
1018
1021
|
__name: "LayerLegend",
|
|
1019
1022
|
props: {
|
|
1020
1023
|
items: {},
|
|
@@ -1045,30 +1048,34 @@ const Io = {
|
|
|
1045
1048
|
}, null, 4)) : o.type === "fill" ? (h(), M("span", {
|
|
1046
1049
|
key: 2,
|
|
1047
1050
|
class: "legend-symbol legend-fill",
|
|
1048
|
-
style: ye({
|
|
1051
|
+
style: ye({
|
|
1052
|
+
backgroundColor: o.color,
|
|
1053
|
+
borderColor: o.outlineColor || "#666",
|
|
1054
|
+
borderWidth: o.outlineColor ? `${Math.max(o.outlineWidth || 2, 2)}px` : void 0
|
|
1055
|
+
}),
|
|
1049
1056
|
"aria-hidden": "true"
|
|
1050
1057
|
}, null, 4)) : A("", !0),
|
|
1051
|
-
|
|
1058
|
+
e.items.length > 1 ? (h(), M("span", Vo, H(o.label), 1)) : A("", !0)
|
|
1052
1059
|
]))), 128))
|
|
1053
1060
|
], 8, Bo));
|
|
1054
1061
|
}
|
|
1055
|
-
}), St = /* @__PURE__ */
|
|
1062
|
+
}), St = /* @__PURE__ */ Me(Zo, [["__scopeId", "data-v-3a9206ab"]]);
|
|
1056
1063
|
function Ct(e) {
|
|
1057
|
-
function a(
|
|
1058
|
-
return e().visibleLayerIds.has(
|
|
1064
|
+
function a(c) {
|
|
1065
|
+
return e().visibleLayerIds.has(c);
|
|
1059
1066
|
}
|
|
1060
|
-
function l(
|
|
1061
|
-
return e().layerOpacities[
|
|
1067
|
+
function l(c) {
|
|
1068
|
+
return e().layerOpacities[c] ?? 1;
|
|
1062
1069
|
}
|
|
1063
|
-
function o(
|
|
1064
|
-
return e().loadingLayerIds.has(
|
|
1070
|
+
function o(c) {
|
|
1071
|
+
return e().loadingLayerIds.has(c);
|
|
1065
1072
|
}
|
|
1066
|
-
function r(
|
|
1067
|
-
return e().layerErrors[
|
|
1073
|
+
function r(c) {
|
|
1074
|
+
return e().layerErrors[c] || null;
|
|
1068
1075
|
}
|
|
1069
|
-
function n(
|
|
1070
|
-
const w = e().currentZoom,
|
|
1071
|
-
return !(
|
|
1076
|
+
function n(c) {
|
|
1077
|
+
const w = e().currentZoom, f = c.minZoom, S = c.maxZoom;
|
|
1078
|
+
return !(f !== void 0 && w < f || S !== void 0 && w > S);
|
|
1072
1079
|
}
|
|
1073
1080
|
return { isVisible: a, getLayerOpacity: l, isLayerLoading: o, getLayerError: r, isLayerAvailableAtZoom: n };
|
|
1074
1081
|
}
|
|
@@ -1113,7 +1120,7 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1113
1120
|
const L = Nt(d);
|
|
1114
1121
|
return l.layerMetadata[L] || null;
|
|
1115
1122
|
}
|
|
1116
|
-
const
|
|
1123
|
+
const c = _(() => l.layerList.some((d) => n(d.config.url))), { isVisible: w, getLayerOpacity: f, isLayerLoading: S, getLayerError: y, isLayerAvailableAtZoom: m } = Ct(() => ({
|
|
1117
1124
|
visibleLayerIds: l.visibleLayers,
|
|
1118
1125
|
layerOpacities: l.layerOpacities,
|
|
1119
1126
|
loadingLayerIds: l.loadingLayers,
|
|
@@ -1128,15 +1135,15 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1128
1135
|
}
|
|
1129
1136
|
return (d, L) => (h(), M("div", No, [
|
|
1130
1137
|
e.showSearch ? (h(), M("div", Uo, [
|
|
1131
|
-
|
|
1138
|
+
J(p(xo), {
|
|
1132
1139
|
modelValue: i.value,
|
|
1133
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
1140
|
+
"onUpdate:modelValue": L[0] || (L[0] = (C) => i.value = C),
|
|
1134
1141
|
placeholder: e.searchPlaceholder,
|
|
1135
1142
|
"class-name": "layer-search-field"
|
|
1136
1143
|
}, {
|
|
1137
1144
|
"trailing-action": He(() => [
|
|
1138
|
-
|
|
1139
|
-
"icon-definition":
|
|
1145
|
+
J(p(ke), {
|
|
1146
|
+
"icon-definition": p($o),
|
|
1140
1147
|
size: "small",
|
|
1141
1148
|
inline: "",
|
|
1142
1149
|
decorative: ""
|
|
@@ -1151,70 +1158,70 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1151
1158
|
], !0)
|
|
1152
1159
|
])) : (h(), M("div", {
|
|
1153
1160
|
key: 2,
|
|
1154
|
-
class: ne(["layer-list", { "has-metadata":
|
|
1161
|
+
class: ne(["layer-list", { "has-metadata": c.value }])
|
|
1155
1162
|
}, [
|
|
1156
|
-
(h(!0), M(ue, null, Le(r.value, (
|
|
1157
|
-
key:
|
|
1163
|
+
(h(!0), M(ue, null, Le(r.value, (C) => (h(), M("div", {
|
|
1164
|
+
key: C.config.id,
|
|
1158
1165
|
class: "layer-item"
|
|
1159
1166
|
}, [
|
|
1160
1167
|
P("div", jo, [
|
|
1161
|
-
n(
|
|
1168
|
+
n(C.config.url) ? (h(), M("a", {
|
|
1162
1169
|
key: 0,
|
|
1163
|
-
href: n(
|
|
1170
|
+
href: n(C.config.url) || "",
|
|
1164
1171
|
target: "_blank",
|
|
1165
1172
|
rel: "noopener noreferrer",
|
|
1166
1173
|
class: "metadata-link",
|
|
1167
|
-
"aria-label": "View metadata for " +
|
|
1174
|
+
"aria-label": "View metadata for " + C.config.title,
|
|
1168
1175
|
onClick: L[1] || (L[1] = Yt(() => {
|
|
1169
1176
|
}, ["stop"]))
|
|
1170
1177
|
}, [
|
|
1171
|
-
|
|
1172
|
-
"icon-definition":
|
|
1178
|
+
J(p(ke), {
|
|
1179
|
+
"icon-definition": p(To),
|
|
1173
1180
|
size: "small",
|
|
1174
1181
|
inline: "",
|
|
1175
1182
|
decorative: ""
|
|
1176
1183
|
}, null, 8, ["icon-definition"])
|
|
1177
|
-
], 8, qo)) :
|
|
1184
|
+
], 8, qo)) : c.value ? (h(), M("span", Go)) : A("", !0),
|
|
1178
1185
|
P("label", {
|
|
1179
1186
|
class: ne(["layer-checkbox", {
|
|
1180
|
-
"layer-unavailable": !
|
|
1181
|
-
"layer-error":
|
|
1187
|
+
"layer-unavailable": !p(m)(C.config),
|
|
1188
|
+
"layer-error": p(y)(C.config.id)
|
|
1182
1189
|
}])
|
|
1183
1190
|
}, [
|
|
1184
1191
|
P("input", {
|
|
1185
1192
|
type: "checkbox",
|
|
1186
|
-
checked:
|
|
1187
|
-
disabled: !
|
|
1188
|
-
onChange: (E) => g(
|
|
1193
|
+
checked: p(w)(C.config.id),
|
|
1194
|
+
disabled: !p(m)(C.config),
|
|
1195
|
+
onChange: (E) => g(C.config.id)
|
|
1189
1196
|
}, null, 40, Ho),
|
|
1190
1197
|
P("span", Jo, [
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
loading:
|
|
1194
|
-
error:
|
|
1195
|
-
unavailable: !
|
|
1198
|
+
$e(H(C.config.title) + " ", 1),
|
|
1199
|
+
J(nt, {
|
|
1200
|
+
loading: p(S)(C.config.id),
|
|
1201
|
+
error: p(y)(C.config.id),
|
|
1202
|
+
unavailable: !p(m)(C.config)
|
|
1196
1203
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
1197
1204
|
])
|
|
1198
1205
|
], 2)
|
|
1199
1206
|
]),
|
|
1200
|
-
e.showOpacity &&
|
|
1207
|
+
e.showOpacity && p(w)(C.config.id) && p(m)(C.config) ? (h(), G(Lt, {
|
|
1201
1208
|
key: 0,
|
|
1202
|
-
"layer-id":
|
|
1203
|
-
"layer-name":
|
|
1204
|
-
opacity: f
|
|
1205
|
-
"onUpdate:opacity": (E) => o("setOpacity",
|
|
1209
|
+
"layer-id": C.config.id,
|
|
1210
|
+
"layer-name": C.config.title,
|
|
1211
|
+
opacity: p(f)(C.config.id),
|
|
1212
|
+
"onUpdate:opacity": (E) => o("setOpacity", C.config.id, E)
|
|
1206
1213
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
1207
|
-
e.showLegend &&
|
|
1214
|
+
e.showLegend && p(w)(C.config.id) && p(m)(C.config) && C.config.legend?.length ? (h(), G(St, {
|
|
1208
1215
|
key: 1,
|
|
1209
|
-
items:
|
|
1210
|
-
label: "Legend for " +
|
|
1216
|
+
items: C.config.legend,
|
|
1217
|
+
label: "Legend for " + C.config.title
|
|
1211
1218
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
1212
1219
|
]))), 128)),
|
|
1213
|
-
r.value.length === 0 ? (h(), M("div", Ko, 'No layers match "' +
|
|
1220
|
+
r.value.length === 0 ? (h(), M("div", Ko, 'No layers match "' + H(e.searchQuery) + '"', 1)) : A("", !0)
|
|
1214
1221
|
], 2))
|
|
1215
1222
|
]));
|
|
1216
1223
|
}
|
|
1217
|
-
}), Xo = /* @__PURE__ */
|
|
1224
|
+
}), Xo = /* @__PURE__ */ Me(Qo, [["__scopeId", "data-v-e48bb978"]]), Yo = {
|
|
1218
1225
|
esriSLSSolid: null,
|
|
1219
1226
|
esriSLSDash: [6, 1.5],
|
|
1220
1227
|
esriSLSDot: [1, 1.5],
|
|
@@ -1228,27 +1235,27 @@ function Ke(e) {
|
|
|
1228
1235
|
}
|
|
1229
1236
|
function ea(e, a, l, o, r) {
|
|
1230
1237
|
const n = [];
|
|
1231
|
-
let
|
|
1238
|
+
let c = a[0], w = [e[0]], f = 0;
|
|
1232
1239
|
for (let i = 1; i < e.length; i++)
|
|
1233
|
-
a[i] ===
|
|
1234
|
-
n.push({ style:
|
|
1235
|
-
const
|
|
1240
|
+
a[i] === c ? w.push(e[i]) : (n.push({ style: c, breaks: w, startIndex: f }), c = a[i], w = [e[i]], f = i);
|
|
1241
|
+
n.push({ style: c, breaks: w, startIndex: f });
|
|
1242
|
+
const S = [], y = /* @__PURE__ */ new Set();
|
|
1236
1243
|
let m = o.minValue ?? 0;
|
|
1237
1244
|
for (let i = 0; i < n.length; i++) {
|
|
1238
|
-
const g = n[i], d = g.breaks, L = Ke(g.style),
|
|
1245
|
+
const g = n[i], d = g.breaks, L = Ke(g.style), C = i === 0 ? null : n[i - 1].breaks[n[i - 1].breaks.length - 1].classMaxValue, E = d[d.length - 1].classMaxValue;
|
|
1239
1246
|
let F;
|
|
1240
1247
|
const V = !!o.defaultSymbol;
|
|
1241
|
-
|
|
1248
|
+
C === null ? F = `${!V && o.minValue != null ? `${l} >= ${o.minValue} AND ` : ""}${l} <= ${E}` : i === n.length - 1 && V ? F = `${l} > ${C}` : F = `${l} > ${C} AND ${l} <= ${E}`;
|
|
1242
1249
|
const T = {
|
|
1243
1250
|
"line-opacity": me(r)
|
|
1244
1251
|
};
|
|
1245
1252
|
if (L && (T["line-dasharray"] = L), d.length === 1)
|
|
1246
|
-
T["line-color"] = z(d[0].symbol?.color), T["line-width"] =
|
|
1253
|
+
T["line-color"] = z(d[0].symbol?.color), T["line-width"] = W(d[0].symbol?.width || 2);
|
|
1247
1254
|
else {
|
|
1248
1255
|
const U = ["step", ["get", l]], de = ["step", ["get", l]];
|
|
1249
|
-
U.push(z(d[0].symbol?.color)), de.push(
|
|
1256
|
+
U.push(z(d[0].symbol?.color)), de.push(W(d[0].symbol?.width || 2));
|
|
1250
1257
|
for (let ve = 1; ve < d.length; ve++)
|
|
1251
|
-
U.push(d[ve - 1].classMaxValue), U.push(z(d[ve].symbol?.color)), de.push(d[ve - 1].classMaxValue), de.push(
|
|
1258
|
+
U.push(d[ve - 1].classMaxValue), U.push(z(d[ve].symbol?.color)), de.push(d[ve - 1].classMaxValue), de.push(W(d[ve].symbol?.width || 2));
|
|
1252
1259
|
T["line-color"] = U, T["line-width"] = de;
|
|
1253
1260
|
}
|
|
1254
1261
|
const O = [];
|
|
@@ -1256,34 +1263,34 @@ function ea(e, a, l, o, r) {
|
|
|
1256
1263
|
O.push({
|
|
1257
1264
|
type: "line",
|
|
1258
1265
|
color: z(U.symbol?.color),
|
|
1259
|
-
width:
|
|
1266
|
+
width: W(U.symbol?.width || 2),
|
|
1260
1267
|
label: U.label || `${m} - ${U.classMaxValue}`
|
|
1261
1268
|
}), m = U.classMaxValue + 1;
|
|
1262
1269
|
const D = g.style.replace("esriSLS", "").toLowerCase();
|
|
1263
1270
|
let ee;
|
|
1264
|
-
i === 0 ? ee = "" : y.has(D) ? ee = `-${D}-${i}` : ee = `-${D}`, y.add(D),
|
|
1271
|
+
i === 0 ? ee = "" : y.has(D) ? ee = `-${D}-${i}` : ee = `-${D}`, y.add(D), S.push({ suffix: ee, where: F, paint: T, legend: O });
|
|
1265
1272
|
}
|
|
1266
|
-
return
|
|
1273
|
+
return S;
|
|
1267
1274
|
}
|
|
1268
1275
|
function ta(e, a, l, o, r) {
|
|
1269
1276
|
const n = /* @__PURE__ */ new Map();
|
|
1270
|
-
for (const
|
|
1271
|
-
const y =
|
|
1272
|
-
n.has(y) || n.set(y, []), n.get(y).push(
|
|
1277
|
+
for (const S of e) {
|
|
1278
|
+
const y = S.symbol?.style || "esriSLSSolid";
|
|
1279
|
+
n.has(y) || n.set(y, []), n.get(y).push(S);
|
|
1273
1280
|
}
|
|
1274
|
-
const
|
|
1275
|
-
let
|
|
1276
|
-
for (const [
|
|
1277
|
-
const m = Ke(
|
|
1281
|
+
const c = [], w = /* @__PURE__ */ new Set();
|
|
1282
|
+
let f = !0;
|
|
1283
|
+
for (const [S, y] of n) {
|
|
1284
|
+
const m = Ke(S), g = y.map((F) => `${a} = '${String(F.value).replace(/'/g, "''")}'`).join(" OR "), d = {
|
|
1278
1285
|
"line-opacity": me(o)
|
|
1279
1286
|
};
|
|
1280
1287
|
if (m && (d["line-dasharray"] = m), y.length === 1)
|
|
1281
|
-
d["line-color"] = z(y[0].symbol?.color), d["line-width"] =
|
|
1288
|
+
d["line-color"] = z(y[0].symbol?.color), d["line-width"] = W(y[0].symbol?.width || 2);
|
|
1282
1289
|
else {
|
|
1283
1290
|
const F = ["match", ["to-string", ["get", a]]];
|
|
1284
1291
|
for (const V of y)
|
|
1285
1292
|
F.push(it(V.value)), F.push(z(V.symbol?.color));
|
|
1286
|
-
F.push(l ? z(l.color) : "rgba(0, 0, 0, 0)"), d["line-color"] = F, d["line-width"] =
|
|
1293
|
+
F.push(l ? z(l.color) : "rgba(0, 0, 0, 0)"), d["line-color"] = F, d["line-width"] = W(y[0].symbol?.width || 2);
|
|
1287
1294
|
}
|
|
1288
1295
|
const L = [];
|
|
1289
1296
|
for (const F of y) {
|
|
@@ -1291,15 +1298,15 @@ function ta(e, a, l, o, r) {
|
|
|
1291
1298
|
L.push({
|
|
1292
1299
|
type: "line",
|
|
1293
1300
|
color: z(F.symbol?.color),
|
|
1294
|
-
width:
|
|
1301
|
+
width: W(F.symbol?.width || 1),
|
|
1295
1302
|
label: O
|
|
1296
1303
|
});
|
|
1297
1304
|
}
|
|
1298
|
-
const
|
|
1305
|
+
const C = S.replace("esriSLS", "").toLowerCase();
|
|
1299
1306
|
let E;
|
|
1300
|
-
|
|
1307
|
+
f ? E = "" : w.has(C) ? E = `-${C}-${c.length}` : E = `-${C}`, w.add(C), f = !1, c.push({ suffix: E, where: g, paint: d, legend: L });
|
|
1301
1308
|
}
|
|
1302
|
-
return
|
|
1309
|
+
return c;
|
|
1303
1310
|
}
|
|
1304
1311
|
function z(e) {
|
|
1305
1312
|
if (!e || !Array.isArray(e) || e.length < 3) return "#888888";
|
|
@@ -1309,7 +1316,7 @@ function z(e) {
|
|
|
1309
1316
|
function me(e) {
|
|
1310
1317
|
return e !== void 0 ? e : 1;
|
|
1311
1318
|
}
|
|
1312
|
-
function
|
|
1319
|
+
function W(e) {
|
|
1313
1320
|
return Math.round(e * (96 / 72) * 10) / 10;
|
|
1314
1321
|
}
|
|
1315
1322
|
const oa = 559082264;
|
|
@@ -1345,7 +1352,7 @@ function st(e) {
|
|
|
1345
1352
|
return "fill";
|
|
1346
1353
|
}
|
|
1347
1354
|
}
|
|
1348
|
-
function
|
|
1355
|
+
function xe(e) {
|
|
1349
1356
|
return !(!e || e.style === "esriSLSNull" || e.color === null || e.width === 0 || e.color && e.color[3] === 0);
|
|
1350
1357
|
}
|
|
1351
1358
|
function it(e) {
|
|
@@ -1353,20 +1360,28 @@ function it(e) {
|
|
|
1353
1360
|
}
|
|
1354
1361
|
function Ut(e, a, l) {
|
|
1355
1362
|
const o = e.symbol, r = st(o);
|
|
1356
|
-
let n = {},
|
|
1363
|
+
let n = {}, c = [], w = null;
|
|
1357
1364
|
if (r === "fill" && o) {
|
|
1358
|
-
const
|
|
1365
|
+
const f = o.color === null ? 0 : o.color?.[3] ?? 255, S = f === 0 ? "rgba(0, 0, 0, 0)" : z(o.color), y = f === 0 ? 0 : f < 255 ? 1 : me(a);
|
|
1359
1366
|
if (n = {
|
|
1360
|
-
"fill-color":
|
|
1367
|
+
"fill-color": S,
|
|
1361
1368
|
"fill-opacity": y
|
|
1362
|
-
},
|
|
1363
|
-
const m =
|
|
1369
|
+
}, xe(o.outline)) {
|
|
1370
|
+
const m = W(o.outline.width || 1);
|
|
1364
1371
|
w = {
|
|
1365
1372
|
"line-color": z(o.outline.color),
|
|
1366
1373
|
"line-width": m
|
|
1367
1374
|
};
|
|
1368
1375
|
}
|
|
1369
|
-
|
|
1376
|
+
f === 0 && xe(o.outline) ? c = [
|
|
1377
|
+
{
|
|
1378
|
+
type: "fill",
|
|
1379
|
+
color: "transparent",
|
|
1380
|
+
outlineColor: z(o.outline.color),
|
|
1381
|
+
outlineWidth: W(o.outline.width || 1),
|
|
1382
|
+
label: e.label || "Feature"
|
|
1383
|
+
}
|
|
1384
|
+
] : c = [
|
|
1370
1385
|
{
|
|
1371
1386
|
type: "fill",
|
|
1372
1387
|
color: z(o.color),
|
|
@@ -1376,25 +1391,25 @@ function Ut(e, a, l) {
|
|
|
1376
1391
|
} else if (r === "line" && o) {
|
|
1377
1392
|
n = {
|
|
1378
1393
|
"line-color": z(o.color),
|
|
1379
|
-
"line-width":
|
|
1394
|
+
"line-width": W(o.width || 1),
|
|
1380
1395
|
"line-opacity": me(a)
|
|
1381
1396
|
};
|
|
1382
|
-
const
|
|
1383
|
-
|
|
1397
|
+
const f = Ke(o.style);
|
|
1398
|
+
f && (n["line-dasharray"] = f), c = [
|
|
1384
1399
|
{
|
|
1385
1400
|
type: "line",
|
|
1386
1401
|
color: z(o.color),
|
|
1387
|
-
width:
|
|
1402
|
+
width: W(o.width || 1),
|
|
1388
1403
|
label: e.label || "Feature"
|
|
1389
1404
|
}
|
|
1390
1405
|
];
|
|
1391
1406
|
} else if (r === "circle" && o) {
|
|
1392
|
-
const
|
|
1407
|
+
const f = Math.round((o.size || 6) * 0.71 * 100) / 100;
|
|
1393
1408
|
n = {
|
|
1394
1409
|
"circle-color": z(o.color),
|
|
1395
|
-
"circle-radius":
|
|
1410
|
+
"circle-radius": f,
|
|
1396
1411
|
"circle-opacity": me(a)
|
|
1397
|
-
},
|
|
1412
|
+
}, xe(o.outline) && (n["circle-stroke-color"] = z(o.outline.color), n["circle-stroke-width"] = W(o.outline.width || 1)), c = [
|
|
1398
1413
|
{
|
|
1399
1414
|
type: "circle",
|
|
1400
1415
|
color: z(o.color),
|
|
@@ -1402,34 +1417,38 @@ function Ut(e, a, l) {
|
|
|
1402
1417
|
}
|
|
1403
1418
|
];
|
|
1404
1419
|
}
|
|
1405
|
-
return { paint: n, legend:
|
|
1420
|
+
return { paint: n, legend: c, geomType: r, outlinePaint: w };
|
|
1406
1421
|
}
|
|
1407
1422
|
function ia(e, a, l) {
|
|
1408
1423
|
const o = e.field1.toLowerCase(), r = e.uniqueValueInfos || [], n = e.defaultSymbol;
|
|
1409
1424
|
if (r.length === 0)
|
|
1410
1425
|
return Ut({ ...e, symbol: n }, a);
|
|
1411
|
-
const
|
|
1412
|
-
let
|
|
1413
|
-
const
|
|
1426
|
+
const c = r[0]?.symbol || n, w = st(c);
|
|
1427
|
+
let f = {};
|
|
1428
|
+
const S = [];
|
|
1414
1429
|
let y = null;
|
|
1415
1430
|
if (w === "fill") {
|
|
1416
1431
|
const m = ["match", ["to-string", ["get", o]]];
|
|
1417
1432
|
for (const i of r) {
|
|
1418
1433
|
m.push(it(i.value)), m.push(z(i.symbol?.color));
|
|
1419
1434
|
const g = String(i.value), L = l?.get(g) || i.label || g;
|
|
1420
|
-
|
|
1435
|
+
S.push({
|
|
1421
1436
|
type: "fill",
|
|
1422
1437
|
color: z(i.symbol?.color),
|
|
1423
1438
|
label: L
|
|
1424
1439
|
});
|
|
1425
1440
|
}
|
|
1426
|
-
if (m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"),
|
|
1441
|
+
if (m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1442
|
+
type: "fill",
|
|
1443
|
+
color: z(n.color),
|
|
1444
|
+
label: e.defaultLabel || "Other"
|
|
1445
|
+
}), f = {
|
|
1427
1446
|
"fill-color": m,
|
|
1428
1447
|
"fill-opacity": me(a)
|
|
1429
|
-
},
|
|
1430
|
-
const i =
|
|
1448
|
+
}, xe(c?.outline)) {
|
|
1449
|
+
const i = W(Math.max(c.outline.width || 1, 1));
|
|
1431
1450
|
y = {
|
|
1432
|
-
"line-color": z(
|
|
1451
|
+
"line-color": z(c.outline.color),
|
|
1433
1452
|
"line-width": i
|
|
1434
1453
|
};
|
|
1435
1454
|
}
|
|
@@ -1438,16 +1457,21 @@ function ia(e, a, l) {
|
|
|
1438
1457
|
for (const d of r) {
|
|
1439
1458
|
m.push(it(d.value)), m.push(z(d.symbol?.color));
|
|
1440
1459
|
const L = String(d.value), E = l?.get(L) || d.label || L;
|
|
1441
|
-
|
|
1460
|
+
S.push({
|
|
1442
1461
|
type: "line",
|
|
1443
1462
|
color: z(d.symbol?.color),
|
|
1444
|
-
width:
|
|
1463
|
+
width: W(d.symbol?.width || 1),
|
|
1445
1464
|
label: E
|
|
1446
1465
|
});
|
|
1447
1466
|
}
|
|
1448
|
-
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"),
|
|
1467
|
+
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1468
|
+
type: "line",
|
|
1469
|
+
color: z(n.color),
|
|
1470
|
+
width: W(n.width || 1),
|
|
1471
|
+
label: e.defaultLabel || "Other"
|
|
1472
|
+
}), f = {
|
|
1449
1473
|
"line-color": m,
|
|
1450
|
-
"line-width":
|
|
1474
|
+
"line-width": W(c?.width || 2),
|
|
1451
1475
|
"line-opacity": me(a)
|
|
1452
1476
|
};
|
|
1453
1477
|
const i = r.map((d) => d.symbol?.style || "esriSLSSolid"), g = [...new Set(i)];
|
|
@@ -1457,28 +1481,32 @@ function ia(e, a, l) {
|
|
|
1457
1481
|
}
|
|
1458
1482
|
if (g.length === 1) {
|
|
1459
1483
|
const d = Ke(g[0]);
|
|
1460
|
-
d && (
|
|
1484
|
+
d && (f["line-dasharray"] = d);
|
|
1461
1485
|
}
|
|
1462
1486
|
} else if (w === "circle") {
|
|
1463
1487
|
const m = ["match", ["to-string", ["get", o]]];
|
|
1464
1488
|
for (const g of r) {
|
|
1465
1489
|
m.push(it(g.value)), m.push(z(g.symbol?.color));
|
|
1466
|
-
const d = String(g.value),
|
|
1467
|
-
|
|
1490
|
+
const d = String(g.value), C = l?.get(d) || g.label || d;
|
|
1491
|
+
S.push({
|
|
1468
1492
|
type: "circle",
|
|
1469
1493
|
color: z(g.symbol?.color),
|
|
1470
|
-
label:
|
|
1494
|
+
label: C
|
|
1471
1495
|
});
|
|
1472
1496
|
}
|
|
1473
|
-
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)")
|
|
1474
|
-
|
|
1475
|
-
|
|
1497
|
+
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1498
|
+
type: "circle",
|
|
1499
|
+
color: z(n.color),
|
|
1500
|
+
label: e.defaultLabel || "Other"
|
|
1501
|
+
});
|
|
1502
|
+
const i = Math.round((c?.size || 6) * 0.71 * 100) / 100;
|
|
1503
|
+
f = {
|
|
1476
1504
|
"circle-color": m,
|
|
1477
1505
|
"circle-radius": i,
|
|
1478
1506
|
"circle-opacity": me(a)
|
|
1479
|
-
},
|
|
1507
|
+
}, xe(c?.outline) && (f["circle-stroke-color"] = z(c.outline.color), f["circle-stroke-width"] = W(c.outline.width || 1));
|
|
1480
1508
|
}
|
|
1481
|
-
return { paint:
|
|
1509
|
+
return { paint: f, legend: S, geomType: w, outlinePaint: y };
|
|
1482
1510
|
}
|
|
1483
1511
|
function la(e, a) {
|
|
1484
1512
|
const l = e.field.toLowerCase(), o = e.classBreakInfos || [], r = e.visualVariables?.find((y) => y.type === "colorInfo");
|
|
@@ -1486,16 +1514,16 @@ function la(e, a) {
|
|
|
1486
1514
|
return na(r, l, e, a);
|
|
1487
1515
|
if (o.length === 0)
|
|
1488
1516
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1489
|
-
const n = o[0]?.symbol,
|
|
1517
|
+
const n = o[0]?.symbol, c = st(n);
|
|
1490
1518
|
let w = {};
|
|
1491
|
-
const
|
|
1492
|
-
let
|
|
1493
|
-
if (
|
|
1519
|
+
const f = [];
|
|
1520
|
+
let S = null;
|
|
1521
|
+
if (c === "fill") {
|
|
1494
1522
|
const y = ["step", ["get", l]];
|
|
1495
1523
|
y.push(z(o[0]?.symbol?.color));
|
|
1496
1524
|
for (let m = 0; m < o.length; m++) {
|
|
1497
1525
|
const i = o[m];
|
|
1498
|
-
m > 0 && (y.push(o[m - 1].classMaxValue), y.push(z(i.symbol?.color))),
|
|
1526
|
+
m > 0 && (y.push(o[m - 1].classMaxValue), y.push(z(i.symbol?.color))), f.push({
|
|
1499
1527
|
type: "fill",
|
|
1500
1528
|
color: z(i.symbol?.color),
|
|
1501
1529
|
label: i.label || `${i.classMaxValue}`
|
|
@@ -1504,54 +1532,54 @@ function la(e, a) {
|
|
|
1504
1532
|
if (w = {
|
|
1505
1533
|
"fill-color": y,
|
|
1506
1534
|
"fill-opacity": me(a)
|
|
1507
|
-
},
|
|
1508
|
-
const m =
|
|
1509
|
-
|
|
1535
|
+
}, xe(n?.outline)) {
|
|
1536
|
+
const m = W(n.outline.width || 1);
|
|
1537
|
+
S = {
|
|
1510
1538
|
"line-color": z(n.outline.color),
|
|
1511
1539
|
"line-width": m
|
|
1512
1540
|
};
|
|
1513
1541
|
}
|
|
1514
|
-
} else if (
|
|
1542
|
+
} else if (c === "line") {
|
|
1515
1543
|
const y = o.map((E) => E.symbol?.style || "esriSLSSolid"), m = [...new Set(y)];
|
|
1516
1544
|
if (m.length > 1) {
|
|
1517
1545
|
const E = ea(o, y, l, e, a);
|
|
1518
|
-
return { paint: {}, legend: [], geomType:
|
|
1546
|
+
return { paint: {}, legend: [], geomType: c, outlinePaint: S, splitLayers: E };
|
|
1519
1547
|
}
|
|
1520
1548
|
const g = ["step", ["get", l]];
|
|
1521
1549
|
g.push(z(o[0]?.symbol?.color));
|
|
1522
1550
|
let d = e.minValue ?? 0;
|
|
1523
1551
|
for (let E = 0; E < o.length; E++) {
|
|
1524
1552
|
const F = o[E];
|
|
1525
|
-
E > 0 && (g.push(o[E - 1].classMaxValue), g.push(z(F.symbol?.color))),
|
|
1553
|
+
E > 0 && (g.push(o[E - 1].classMaxValue), g.push(z(F.symbol?.color))), f.push({
|
|
1526
1554
|
type: "line",
|
|
1527
1555
|
color: z(F.symbol?.color),
|
|
1528
|
-
width:
|
|
1556
|
+
width: W(F.symbol?.width || n?.width || 2),
|
|
1529
1557
|
label: F.label || `${d} - ${F.classMaxValue}`
|
|
1530
1558
|
}), d = F.classMaxValue + 1;
|
|
1531
1559
|
}
|
|
1532
|
-
const L =
|
|
1560
|
+
const L = W(n?.width || 2);
|
|
1533
1561
|
w = {
|
|
1534
1562
|
"line-color": g,
|
|
1535
1563
|
"line-width": L,
|
|
1536
1564
|
"line-opacity": me(a)
|
|
1537
1565
|
};
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1566
|
+
const C = Ke(m[0]);
|
|
1567
|
+
C && (w["line-dasharray"] = C);
|
|
1540
1568
|
}
|
|
1541
|
-
return { paint: w, legend:
|
|
1569
|
+
return { paint: w, legend: f, geomType: c, outlinePaint: S };
|
|
1542
1570
|
}
|
|
1543
1571
|
function na(e, a, l, o) {
|
|
1544
1572
|
const r = e.stops || [];
|
|
1545
1573
|
if (r.length === 0)
|
|
1546
1574
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1547
|
-
const n = l.classBreakInfos?.[0]?.symbol || l.defaultSymbol,
|
|
1575
|
+
const n = l.classBreakInfos?.[0]?.symbol || l.defaultSymbol, c = st(n);
|
|
1548
1576
|
let w = {};
|
|
1549
|
-
const
|
|
1550
|
-
let
|
|
1551
|
-
if (
|
|
1577
|
+
const f = [];
|
|
1578
|
+
let S = null;
|
|
1579
|
+
if (c === "fill") {
|
|
1552
1580
|
const y = ["interpolate", ["linear"], ["get", a]];
|
|
1553
1581
|
for (const i of r)
|
|
1554
|
-
y.push(i.value), y.push(z(i.color)),
|
|
1582
|
+
y.push(i.value), y.push(z(i.color)), f.push({
|
|
1555
1583
|
type: "fill",
|
|
1556
1584
|
color: z(i.color),
|
|
1557
1585
|
label: i.label || `${i.value}`
|
|
@@ -1566,15 +1594,15 @@ function na(e, a, l, o) {
|
|
|
1566
1594
|
// Otherwise use the interpolated color
|
|
1567
1595
|
],
|
|
1568
1596
|
"fill-opacity": me(o)
|
|
1569
|
-
},
|
|
1570
|
-
const i =
|
|
1571
|
-
|
|
1597
|
+
}, xe(n?.outline)) {
|
|
1598
|
+
const i = W(n.outline.width || 1);
|
|
1599
|
+
S = {
|
|
1572
1600
|
"line-color": z(n.outline.color),
|
|
1573
1601
|
"line-width": i
|
|
1574
1602
|
};
|
|
1575
1603
|
}
|
|
1576
1604
|
}
|
|
1577
|
-
return { paint: w, legend:
|
|
1605
|
+
return { paint: w, legend: f, geomType: c, outlinePaint: S };
|
|
1578
1606
|
}
|
|
1579
1607
|
function ra(e, a, l, o) {
|
|
1580
1608
|
if (!e?.renderer)
|
|
@@ -1593,12 +1621,12 @@ function ra(e, a, l, o) {
|
|
|
1593
1621
|
}
|
|
1594
1622
|
function sa(e) {
|
|
1595
1623
|
if (!e) return null;
|
|
1596
|
-
const a = (e.title || "").replace(/\{([^}]+)\}/g, (n,
|
|
1597
|
-
const
|
|
1624
|
+
const a = (e.title || "").replace(/\{([^}]+)\}/g, (n, c) => `{${c.toLowerCase()}}`), o = (e.fieldInfos || []).filter((n) => n.visible === !0).map((n) => {
|
|
1625
|
+
const c = {
|
|
1598
1626
|
field: n.fieldName.toLowerCase(),
|
|
1599
1627
|
label: n.label || n.fieldName
|
|
1600
1628
|
};
|
|
1601
|
-
return n.format && (
|
|
1629
|
+
return n.format && (c.format = {}, n.format.dateFormat && (c.format.dateFormat = n.format.dateFormat), n.format.digitSeparator !== void 0 && (c.format.digitSeparator = n.format.digitSeparator), n.format.places !== void 0 && (c.format.places = n.format.places), Object.keys(c.format).length === 0 && delete c.format), c;
|
|
1602
1630
|
}), r = {
|
|
1603
1631
|
title: a,
|
|
1604
1632
|
fields: o
|
|
@@ -1623,8 +1651,8 @@ function fa(e) {
|
|
|
1623
1651
|
for (const r of l) {
|
|
1624
1652
|
const n = r.trim().match(o);
|
|
1625
1653
|
if (n) {
|
|
1626
|
-
const [,
|
|
1627
|
-
|
|
1654
|
+
const [, c, w] = n;
|
|
1655
|
+
c && w && a.set(c, w.trim());
|
|
1628
1656
|
}
|
|
1629
1657
|
}
|
|
1630
1658
|
return a;
|
|
@@ -1661,28 +1689,28 @@ async function Wt(e) {
|
|
|
1661
1689
|
for (const r of a)
|
|
1662
1690
|
if (r.url && !r.title?.toLowerCase().includes("(under construction)") && !(r.url && /\/MapServer(\/\d+)?$/i.test(r.url)))
|
|
1663
1691
|
try {
|
|
1664
|
-
let n = r.layerDefinition?.drawingInfo,
|
|
1665
|
-
const w = !n || !n.renderer,
|
|
1666
|
-
if ((w ||
|
|
1692
|
+
let n = r.layerDefinition?.drawingInfo, c;
|
|
1693
|
+
const w = !n || !n.renderer, f = o.includes(r.title), S = n?.renderer?.uniqueValueInfos?.[0]?.symbol?.outline || n?.renderer?.defaultSymbol?.outline;
|
|
1694
|
+
if ((w || f) && r.url) {
|
|
1667
1695
|
const O = await pa(r.url);
|
|
1668
1696
|
if (O) {
|
|
1669
|
-
if (n = O.drawingInfo,
|
|
1697
|
+
if (n = O.drawingInfo, S && xe(S) && n?.renderer) {
|
|
1670
1698
|
const D = n.renderer, ee = D.uniqueValueInfos?.[0]?.symbol?.outline || D.defaultSymbol?.outline;
|
|
1671
|
-
if (!
|
|
1699
|
+
if (!xe(ee)) {
|
|
1672
1700
|
for (const U of D.uniqueValueInfos || [])
|
|
1673
|
-
U.symbol && (U.symbol.outline =
|
|
1674
|
-
D.defaultSymbol && (D.defaultSymbol.outline =
|
|
1701
|
+
U.symbol && (U.symbol.outline = S);
|
|
1702
|
+
D.defaultSymbol && (D.defaultSymbol.outline = S);
|
|
1675
1703
|
}
|
|
1676
1704
|
}
|
|
1677
|
-
O.description && (
|
|
1705
|
+
O.description && (c = fa(O.description), c.size > 0);
|
|
1678
1706
|
}
|
|
1679
1707
|
}
|
|
1680
1708
|
const { paint: y, legend: m, geomType: i, outlinePaint: g, splitLayers: d } = ra(
|
|
1681
1709
|
n,
|
|
1682
1710
|
r.opacity,
|
|
1683
|
-
|
|
1711
|
+
c,
|
|
1684
1712
|
r.title
|
|
1685
|
-
), L = sa(r.popupInfo),
|
|
1713
|
+
), L = sa(r.popupInfo), C = ca(r.layerDefinition), E = aa(r.layerDefinition?.minScale, r.layerDefinition?.maxScale), F = ua(r.title), V = da(r.title), T = r.opacity ?? 1;
|
|
1686
1714
|
if (d && d.length > 0)
|
|
1687
1715
|
for (const O of d) {
|
|
1688
1716
|
const D = `${F}${O.suffix}`;
|
|
@@ -1695,7 +1723,7 @@ async function Wt(e) {
|
|
|
1695
1723
|
paint: O.paint,
|
|
1696
1724
|
legend: O.legend,
|
|
1697
1725
|
popup: L,
|
|
1698
|
-
where:
|
|
1726
|
+
where: C ? `(${C}) AND (${O.where})` : O.where,
|
|
1699
1727
|
minZoom: E.minZoom,
|
|
1700
1728
|
maxZoom: E.maxZoom,
|
|
1701
1729
|
parentId: O.suffix ? F : void 0
|
|
@@ -1711,7 +1739,7 @@ async function Wt(e) {
|
|
|
1711
1739
|
paint: y,
|
|
1712
1740
|
legend: m,
|
|
1713
1741
|
popup: L,
|
|
1714
|
-
where:
|
|
1742
|
+
where: C,
|
|
1715
1743
|
minZoom: E.minZoom,
|
|
1716
1744
|
maxZoom: E.maxZoom,
|
|
1717
1745
|
outlinePaint: g
|
|
@@ -1834,7 +1862,7 @@ function va(e) {
|
|
|
1834
1862
|
throw new Error(`HTTP ${L.status}: ${L.statusText}`);
|
|
1835
1863
|
d = await L.json();
|
|
1836
1864
|
} else if (i.type === "esri") {
|
|
1837
|
-
const
|
|
1865
|
+
const C = `${i.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, E = await fetch(C, i.options);
|
|
1838
1866
|
if (!E.ok)
|
|
1839
1867
|
throw new Error(`HTTP ${E.status}: ${E.statusText}`);
|
|
1840
1868
|
d = (await E.json()).features?.map((V) => V.attributes) || [];
|
|
@@ -1869,14 +1897,14 @@ function va(e) {
|
|
|
1869
1897
|
const g = e.find((d) => d.id === i);
|
|
1870
1898
|
g && await o(g);
|
|
1871
1899
|
}
|
|
1872
|
-
function
|
|
1900
|
+
function c(i) {
|
|
1873
1901
|
return a.value[i]?.data ?? null;
|
|
1874
1902
|
}
|
|
1875
1903
|
const w = _(() => Object.values(a.value).some((i) => i.loading));
|
|
1876
|
-
function
|
|
1904
|
+
function f(i) {
|
|
1877
1905
|
return a.value[i]?.loading ?? !1;
|
|
1878
1906
|
}
|
|
1879
|
-
function
|
|
1907
|
+
function S(i) {
|
|
1880
1908
|
return a.value[i]?.error ?? null;
|
|
1881
1909
|
}
|
|
1882
1910
|
function y() {
|
|
@@ -1899,7 +1927,7 @@ function va(e) {
|
|
|
1899
1927
|
m();
|
|
1900
1928
|
}), {
|
|
1901
1929
|
/** Reactive state for all data sources */
|
|
1902
|
-
state:
|
|
1930
|
+
state: q(a),
|
|
1903
1931
|
/** Whether any data source is currently loading */
|
|
1904
1932
|
isLoading: w,
|
|
1905
1933
|
/** Fetch all data sources */
|
|
@@ -1907,11 +1935,11 @@ function va(e) {
|
|
|
1907
1935
|
/** Refetch a specific data source by id */
|
|
1908
1936
|
refetch: n,
|
|
1909
1937
|
/** Get data for a specific source */
|
|
1910
|
-
getData:
|
|
1938
|
+
getData: c,
|
|
1911
1939
|
/** Check if a specific source is loading */
|
|
1912
|
-
isSourceLoading:
|
|
1940
|
+
isSourceLoading: f,
|
|
1913
1941
|
/** Get error for a specific source */
|
|
1914
|
-
getError:
|
|
1942
|
+
getError: S,
|
|
1915
1943
|
/** Stop all polling (useful for cleanup) */
|
|
1916
1944
|
stopPolling: m
|
|
1917
1945
|
};
|
|
@@ -1961,12 +1989,12 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1961
1989
|
},
|
|
1962
1990
|
emits: ["configs-loaded", "load-error", "zoom"],
|
|
1963
1991
|
setup(e, { expose: a, emit: l }) {
|
|
1964
|
-
const o = e, r = l, n = x([]),
|
|
1992
|
+
const o = e, r = l, n = x([]), c = x(!0), w = x(null), f = x(12), S = x(""), y = x(/* @__PURE__ */ new Set()), m = x({}), i = x(/* @__PURE__ */ new Set()), g = x({}), d = x({}), L = x(/* @__PURE__ */ new Set()), C = x({});
|
|
1965
1993
|
function E() {
|
|
1966
1994
|
const v = {};
|
|
1967
1995
|
for (const $ of o.tiledLayers)
|
|
1968
1996
|
v[$.id] = $.opacity ?? 1;
|
|
1969
|
-
|
|
1997
|
+
C.value = v;
|
|
1970
1998
|
}
|
|
1971
1999
|
function F(v) {
|
|
1972
2000
|
L.value.has(v) ? L.value.delete(v) : L.value.add(v), L.value = new Set(L.value);
|
|
@@ -1975,7 +2003,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1975
2003
|
$ ? L.value.add(v) : L.value.delete(v), L.value = new Set(L.value);
|
|
1976
2004
|
}
|
|
1977
2005
|
function T(v, $) {
|
|
1978
|
-
|
|
2006
|
+
C.value = { ...C.value, [v]: $ };
|
|
1979
2007
|
}
|
|
1980
2008
|
const O = o.dataSources.length > 0 ? va(o.dataSources) : null, D = _(() => O?.state.value ?? {}), ee = _(() => O?.isLoading.value ?? !1);
|
|
1981
2009
|
function U(v) {
|
|
@@ -1984,7 +2012,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1984
2012
|
function de(v) {
|
|
1985
2013
|
return O?.refetch(v) ?? Promise.resolve();
|
|
1986
2014
|
}
|
|
1987
|
-
N("layerboard-layers",
|
|
2015
|
+
N("layerboard-layers", q(n)), N("layerboard-visible", y), N("layerboard-opacities", m), N("layerboard-loading", q(i)), N("layerboard-errors", q(g)), N("layerboard-zoom", q(f)), N("layerboard-toggle-layer", De), N("layerboard-set-layer-visible", je), N("layerboard-set-layers-visible", Pe), N("layerboard-set-opacity", Fe), N("layerboard-tiled-layers", q(_(() => o.tiledLayers))), N("layerboard-visible-tiled", L), N("layerboard-tiled-opacities", C), N("layerboard-toggle-tiled", F), N("layerboard-set-tiled-opacity", T), N("layerboard-set-tiled-visible", V), N("layerboard-data-sources-state", D), N("layerboard-data-sources-loading", ee), N("layerboard-get-data-source", U), N("layerboard-refetch-data-source", de);
|
|
1988
2016
|
const ve = _(() => ({
|
|
1989
2017
|
backgroundColor: o.themeColor
|
|
1990
2018
|
})), ct = _(() => ({
|
|
@@ -1996,36 +2024,36 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1996
2024
|
}));
|
|
1997
2025
|
async function We() {
|
|
1998
2026
|
try {
|
|
1999
|
-
|
|
2027
|
+
c.value = !0, w.value = null;
|
|
2000
2028
|
const $ = (await wt(o.webMapId)).map((Z) => {
|
|
2001
|
-
let
|
|
2029
|
+
let Q = Z;
|
|
2002
2030
|
const Ce = o.layerStyleOverrides[Z.id];
|
|
2003
|
-
Ce && (
|
|
2004
|
-
...
|
|
2005
|
-
paint: Ce.paint ??
|
|
2006
|
-
outlinePaint: Ce.outlinePaint ??
|
|
2007
|
-
legend: Ce.legend ??
|
|
2008
|
-
type: Ce.type ??
|
|
2031
|
+
Ce && (Q = {
|
|
2032
|
+
...Q,
|
|
2033
|
+
paint: Ce.paint ?? Q.paint,
|
|
2034
|
+
outlinePaint: Ce.outlinePaint ?? Q.outlinePaint,
|
|
2035
|
+
legend: Ce.legend ?? Q.legend,
|
|
2036
|
+
type: Ce.type ?? Q.type
|
|
2009
2037
|
});
|
|
2010
2038
|
const Ze = o.popupOverrides[Z.id] || (Z.parentId ? o.popupOverrides[Z.parentId] : void 0);
|
|
2011
|
-
return Ze &&
|
|
2012
|
-
...
|
|
2013
|
-
popup: { ...
|
|
2014
|
-
}),
|
|
2039
|
+
return Ze && Q.popup && (Q = {
|
|
2040
|
+
...Q,
|
|
2041
|
+
popup: { ...Q.popup, ...Ze }
|
|
2042
|
+
}), Q;
|
|
2015
2043
|
});
|
|
2016
2044
|
n.value = $.map((Z) => ({
|
|
2017
2045
|
config: Z,
|
|
2018
2046
|
component: Z.type
|
|
2019
2047
|
}));
|
|
2020
|
-
const
|
|
2048
|
+
const K = {};
|
|
2021
2049
|
$.forEach((Z) => {
|
|
2022
|
-
|
|
2023
|
-
}), m.value =
|
|
2050
|
+
K[Z.id] = Z.opacity ?? 1;
|
|
2051
|
+
}), m.value = K, r("configs-loaded", $);
|
|
2024
2052
|
} catch (v) {
|
|
2025
2053
|
const $ = v instanceof Error ? v.message : "Failed to load layer configurations";
|
|
2026
2054
|
w.value = $, r("load-error", $);
|
|
2027
2055
|
} finally {
|
|
2028
|
-
|
|
2056
|
+
c.value = !1;
|
|
2029
2057
|
}
|
|
2030
2058
|
}
|
|
2031
2059
|
async function Xe() {
|
|
@@ -2035,10 +2063,10 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2035
2063
|
"select url_text, COALESCE(representation, '') as representation from phl.knack_metadata_reps_endpoints_join WHERE ( format = 'API' OR format = 'GeoService' ) AND url_text IS NOT null"
|
|
2036
2064
|
), $ = await fetch(v);
|
|
2037
2065
|
if (!$.ok) return;
|
|
2038
|
-
const
|
|
2039
|
-
for (const
|
|
2040
|
-
if (
|
|
2041
|
-
const Ce = Nt(
|
|
2066
|
+
const K = await $.json(), Z = {};
|
|
2067
|
+
for (const Q of K.rows || [])
|
|
2068
|
+
if (Q.url_text && Q.representation) {
|
|
2069
|
+
const Ce = Nt(Q.url_text), Ze = `https://metadata.phila.gov/#home/representationdetails/${Q.representation}/`;
|
|
2042
2070
|
Z[Ce] = Ze;
|
|
2043
2071
|
}
|
|
2044
2072
|
d.value = Z;
|
|
@@ -2046,7 +2074,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2046
2074
|
}
|
|
2047
2075
|
}
|
|
2048
2076
|
function ut(v) {
|
|
2049
|
-
|
|
2077
|
+
f.value = v, r("zoom", v);
|
|
2050
2078
|
}
|
|
2051
2079
|
function De(v) {
|
|
2052
2080
|
y.value.has(v) ? y.value.delete(v) : y.value.add(v), y.value = new Set(y.value);
|
|
@@ -2054,9 +2082,9 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2054
2082
|
function je(v, $) {
|
|
2055
2083
|
$ ? y.value.add(v) : y.value.delete(v), y.value = new Set(y.value);
|
|
2056
2084
|
}
|
|
2057
|
-
function
|
|
2058
|
-
for (const
|
|
2059
|
-
$ ? y.value.add(
|
|
2085
|
+
function Pe(v, $) {
|
|
2086
|
+
for (const K of v)
|
|
2087
|
+
$ ? y.value.add(K) : y.value.delete(K);
|
|
2060
2088
|
y.value = new Set(y.value);
|
|
2061
2089
|
}
|
|
2062
2090
|
function Fe(v, $) {
|
|
@@ -2069,12 +2097,12 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2069
2097
|
if ($)
|
|
2070
2098
|
g.value = { ...g.value, [v]: $ };
|
|
2071
2099
|
else {
|
|
2072
|
-
const
|
|
2073
|
-
delete
|
|
2100
|
+
const K = { ...g.value };
|
|
2101
|
+
delete K[v], g.value = K;
|
|
2074
2102
|
}
|
|
2075
2103
|
}
|
|
2076
2104
|
function re(v) {
|
|
2077
|
-
|
|
2105
|
+
S.value = v;
|
|
2078
2106
|
}
|
|
2079
2107
|
const Te = x(null), oe = x(null), _e = x(null), Ye = x(null), be = x(null), Ge = x(null), et = x(null), Se = x("sidebar");
|
|
2080
2108
|
function ft() {
|
|
@@ -2123,8 +2151,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2123
2151
|
)
|
|
2124
2152
|
);
|
|
2125
2153
|
if ($.length === 0) return;
|
|
2126
|
-
const
|
|
2127
|
-
v.shiftKey ? document.activeElement ===
|
|
2154
|
+
const K = $[0], Z = $[$.length - 1];
|
|
2155
|
+
v.shiftKey ? document.activeElement === K && (v.preventDefault(), Z.focus()) : document.activeElement === Z && (v.preventDefault(), K.focus());
|
|
2128
2156
|
}
|
|
2129
2157
|
}
|
|
2130
2158
|
function pt(v) {
|
|
@@ -2139,11 +2167,11 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2139
2167
|
)
|
|
2140
2168
|
);
|
|
2141
2169
|
if ($.length === 0) return;
|
|
2142
|
-
const
|
|
2143
|
-
v.shiftKey ? document.activeElement ===
|
|
2170
|
+
const K = $[0], Z = $[$.length - 1];
|
|
2171
|
+
v.shiftKey ? document.activeElement === K && (v.preventDefault(), Z.focus()) : document.activeElement === Z && (v.preventDefault(), K.focus());
|
|
2144
2172
|
}
|
|
2145
2173
|
}
|
|
2146
|
-
N("layerboard-open-modal", Ae), N("layerboard-close-modal", le), N("layerboard-is-modal-open",
|
|
2174
|
+
N("layerboard-open-modal", Ae), N("layerboard-close-modal", le), N("layerboard-is-modal-open", q(ie)), a({
|
|
2147
2175
|
/** Layer configurations */
|
|
2148
2176
|
layerList: n,
|
|
2149
2177
|
/** Set of visible layer IDs */
|
|
@@ -2155,13 +2183,13 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2155
2183
|
/** Map of layer errors by ID */
|
|
2156
2184
|
layerErrors: g,
|
|
2157
2185
|
/** Current map zoom level */
|
|
2158
|
-
currentZoom:
|
|
2186
|
+
currentZoom: f,
|
|
2159
2187
|
/** Toggle a layer's visibility */
|
|
2160
2188
|
toggleLayer: De,
|
|
2161
2189
|
/** Set a layer's visibility explicitly */
|
|
2162
2190
|
setLayerVisible: je,
|
|
2163
2191
|
/** Set multiple layers' visibility at once */
|
|
2164
|
-
setLayersVisible:
|
|
2192
|
+
setLayersVisible: Pe,
|
|
2165
2193
|
/** Set a layer's opacity */
|
|
2166
2194
|
setLayerOpacity: Fe,
|
|
2167
2195
|
/** Reload layer configurations */
|
|
@@ -2172,7 +2200,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2172
2200
|
/** Set of visible tiled layer IDs */
|
|
2173
2201
|
visibleTiledLayers: L,
|
|
2174
2202
|
/** Tiled layer opacity values */
|
|
2175
|
-
tiledLayerOpacities:
|
|
2203
|
+
tiledLayerOpacities: C,
|
|
2176
2204
|
/** Toggle a tiled layer's visibility */
|
|
2177
2205
|
toggleTiledLayer: F,
|
|
2178
2206
|
/** Set a tiled layer's visibility explicitly */
|
|
@@ -2233,16 +2261,16 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2233
2261
|
"aria-label": "Toggle menu",
|
|
2234
2262
|
onClick: Ie
|
|
2235
2263
|
}, [
|
|
2236
|
-
|
|
2237
|
-
"icon-definition":
|
|
2264
|
+
J(p(ke), {
|
|
2265
|
+
"icon-definition": p(Fo),
|
|
2238
2266
|
size: "medium",
|
|
2239
2267
|
inline: "",
|
|
2240
2268
|
decorative: ""
|
|
2241
2269
|
}, null, 8, ["icon-definition"])
|
|
2242
2270
|
], 8, wa),
|
|
2243
2271
|
he(v.$slots, "header", {}, () => [
|
|
2244
|
-
P("h1", null,
|
|
2245
|
-
e.subtitle ? (h(), M("span", La,
|
|
2272
|
+
P("h1", null, H(e.title), 1),
|
|
2273
|
+
e.subtitle ? (h(), M("span", La, H(e.subtitle), 1)) : A("", !0)
|
|
2246
2274
|
], !0),
|
|
2247
2275
|
ae.value ? (h(), M("div", {
|
|
2248
2276
|
key: 0,
|
|
@@ -2261,7 +2289,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2261
2289
|
closeModal: le,
|
|
2262
2290
|
isModalOpen: ie.value
|
|
2263
2291
|
}, () => [
|
|
2264
|
-
$[0] || ($[0] =
|
|
2292
|
+
$[0] || ($[0] = $e(" City of Philadelphia ", -1))
|
|
2265
2293
|
], !0)
|
|
2266
2294
|
]),
|
|
2267
2295
|
P("button", {
|
|
@@ -2271,8 +2299,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2271
2299
|
"aria-label": "Close menu",
|
|
2272
2300
|
onClick: Ee
|
|
2273
2301
|
}, [
|
|
2274
|
-
|
|
2275
|
-
"icon-definition":
|
|
2302
|
+
J(p(ke), {
|
|
2303
|
+
"icon-definition": p(Dt),
|
|
2276
2304
|
size: "medium",
|
|
2277
2305
|
decorative: ""
|
|
2278
2306
|
}, null, 8, ["icon-definition"])
|
|
@@ -2285,15 +2313,15 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2285
2313
|
})) : A("", !0)
|
|
2286
2314
|
], 4),
|
|
2287
2315
|
P("div", Ca, [
|
|
2288
|
-
|
|
2316
|
+
c.value ? (h(), M("div", ka, [
|
|
2289
2317
|
P("div", {
|
|
2290
2318
|
class: "layerboard-spinner",
|
|
2291
2319
|
style: ye({ borderTopColor: e.themeColor })
|
|
2292
2320
|
}, null, 4),
|
|
2293
|
-
P("p", null, "Loading " +
|
|
2321
|
+
P("p", null, "Loading " + H(e.title) + "...", 1)
|
|
2294
2322
|
])) : w.value ? (h(), M("div", xa, [
|
|
2295
2323
|
$[3] || ($[3] = P("h2", null, "Error Loading Layers", -1)),
|
|
2296
|
-
P("p", null,
|
|
2324
|
+
P("p", null, H(w.value), 1),
|
|
2297
2325
|
P("button", {
|
|
2298
2326
|
class: "layerboard-retry-button",
|
|
2299
2327
|
style: ye({ backgroundColor: e.themeColor }),
|
|
@@ -2315,14 +2343,14 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2315
2343
|
layerOpacities: m.value,
|
|
2316
2344
|
loadingLayers: i.value,
|
|
2317
2345
|
layerErrors: g.value,
|
|
2318
|
-
currentZoom:
|
|
2346
|
+
currentZoom: f.value,
|
|
2319
2347
|
toggleLayer: De,
|
|
2320
2348
|
setLayerVisible: je,
|
|
2321
|
-
setLayersVisible:
|
|
2349
|
+
setLayersVisible: Pe,
|
|
2322
2350
|
setOpacity: Fe,
|
|
2323
2351
|
tiledLayers: e.tiledLayers,
|
|
2324
2352
|
visibleTiledLayers: L.value,
|
|
2325
|
-
tiledLayerOpacities:
|
|
2353
|
+
tiledLayerOpacities: C.value,
|
|
2326
2354
|
toggleTiledLayer: F,
|
|
2327
2355
|
setTiledLayerVisible: V,
|
|
2328
2356
|
setTiledLayerOpacity: T,
|
|
@@ -2331,15 +2359,15 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2331
2359
|
getDataSource: U,
|
|
2332
2360
|
refetchDataSource: de
|
|
2333
2361
|
}, () => [
|
|
2334
|
-
e.showDefaultSidebar ? (h(),
|
|
2362
|
+
e.showDefaultSidebar ? (h(), G(Xo, {
|
|
2335
2363
|
key: 0,
|
|
2336
2364
|
"layer-list": n.value,
|
|
2337
2365
|
"visible-layers": y.value,
|
|
2338
2366
|
"layer-opacities": m.value,
|
|
2339
2367
|
"loading-layers": i.value,
|
|
2340
2368
|
"layer-errors": g.value,
|
|
2341
|
-
"current-zoom":
|
|
2342
|
-
"search-query":
|
|
2369
|
+
"current-zoom": f.value,
|
|
2370
|
+
"search-query": S.value,
|
|
2343
2371
|
"layer-metadata": d.value,
|
|
2344
2372
|
onToggleLayer: De,
|
|
2345
2373
|
onSetOpacity: Fe,
|
|
@@ -2352,13 +2380,13 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2352
2380
|
"aria-label": "Map",
|
|
2353
2381
|
class: ne(["layerboard-map", { "is-active": Se.value === "map" }])
|
|
2354
2382
|
}, [
|
|
2355
|
-
|
|
2383
|
+
J(uo, {
|
|
2356
2384
|
"visible-layers": y.value,
|
|
2357
2385
|
"layer-opacities": m.value,
|
|
2358
2386
|
"layer-list": n.value,
|
|
2359
2387
|
"tiled-layers": e.tiledLayers,
|
|
2360
2388
|
"visible-tiled-layers": L.value,
|
|
2361
|
-
"tiled-layer-opacities":
|
|
2389
|
+
"tiled-layer-opacities": C.value,
|
|
2362
2390
|
"cyclomedia-config": e.cyclomediaConfig,
|
|
2363
2391
|
"pictometry-credentials": e.pictometryCredentials,
|
|
2364
2392
|
"basemap-control-position": e.basemapControlPosition,
|
|
@@ -2382,8 +2410,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2382
2410
|
"aria-label": fe.value ? "Expand sidebar" : "Collapse sidebar",
|
|
2383
2411
|
onClick: tt
|
|
2384
2412
|
}, [
|
|
2385
|
-
|
|
2386
|
-
"icon-definition": fe.value ?
|
|
2413
|
+
J(p(ke), {
|
|
2414
|
+
"icon-definition": fe.value ? p(Mo) : p(Po),
|
|
2387
2415
|
size: "medium",
|
|
2388
2416
|
decorative: ""
|
|
2389
2417
|
}, null, 8, ["icon-definition"])
|
|
@@ -2397,7 +2425,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2397
2425
|
style: ye(Ue.value),
|
|
2398
2426
|
onClick: ft
|
|
2399
2427
|
}, [
|
|
2400
|
-
Se.value === "map" ? (h(), M("span", Ma,
|
|
2428
|
+
Se.value === "map" ? (h(), M("span", Ma, H(e.sidebarLabel), 1)) : (h(), M("span", Pa, H(e.mapLabel), 1))
|
|
2401
2429
|
], 4),
|
|
2402
2430
|
P("footer", {
|
|
2403
2431
|
class: "layerboard-footer",
|
|
@@ -2408,7 +2436,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2408
2436
|
closeModal: le,
|
|
2409
2437
|
isModalOpen: ie.value
|
|
2410
2438
|
}, () => [
|
|
2411
|
-
$[4] || ($[4] =
|
|
2439
|
+
$[4] || ($[4] = $e(" City of Philadelphia ", -1))
|
|
2412
2440
|
], !0)
|
|
2413
2441
|
], 4),
|
|
2414
2442
|
ie.value ? (h(), M("div", {
|
|
@@ -2432,8 +2460,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2432
2460
|
"aria-label": "Close modal",
|
|
2433
2461
|
onClick: le
|
|
2434
2462
|
}, [
|
|
2435
|
-
|
|
2436
|
-
"icon-definition":
|
|
2463
|
+
J(p(ke), {
|
|
2464
|
+
"icon-definition": p(Dt),
|
|
2437
2465
|
size: "medium",
|
|
2438
2466
|
decorative: ""
|
|
2439
2467
|
}, null, 8, ["icon-definition"])
|
|
@@ -2441,10 +2469,10 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2441
2469
|
he(v.$slots, "modal", { closeModal: le }, void 0, !0)
|
|
2442
2470
|
], 512)
|
|
2443
2471
|
], 32)) : A("", !0),
|
|
2444
|
-
P("span", Fa,
|
|
2472
|
+
P("span", Fa, H(Se.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
|
|
2445
2473
|
]));
|
|
2446
2474
|
}
|
|
2447
|
-
}), Ya = /* @__PURE__ */
|
|
2475
|
+
}), Ya = /* @__PURE__ */ Me(Ta, [["__scopeId", "data-v-1c88d9ba"]]), Ia = ["aria-expanded"], Ea = {
|
|
2448
2476
|
key: 0,
|
|
2449
2477
|
class: "topic-icon"
|
|
2450
2478
|
}, Oa = { class: "topic-title" }, za = /* @__PURE__ */ ge({
|
|
@@ -2458,42 +2486,42 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2458
2486
|
},
|
|
2459
2487
|
emits: ["toggle", "layerChange"],
|
|
2460
2488
|
setup(e, { emit: a }) {
|
|
2461
|
-
const l = e, o = a, r = x(l.expanded), n = `topic-panel-${Tt()}`,
|
|
2489
|
+
const l = e, o = a, r = x(l.expanded), n = `topic-panel-${Tt()}`, c = `topic-header-${Tt()}`;
|
|
2462
2490
|
Oe(
|
|
2463
2491
|
() => l.expanded,
|
|
2464
|
-
(
|
|
2465
|
-
r.value =
|
|
2492
|
+
(f) => {
|
|
2493
|
+
r.value = f;
|
|
2466
2494
|
}
|
|
2467
2495
|
);
|
|
2468
2496
|
function w() {
|
|
2469
2497
|
r.value = !r.value, o("toggle", r.value);
|
|
2470
2498
|
}
|
|
2471
|
-
return (
|
|
2499
|
+
return (f, S) => {
|
|
2472
2500
|
const y = to("font-awesome-icon");
|
|
2473
2501
|
return h(), M("div", {
|
|
2474
2502
|
class: ne(["topic-accordion", { "is-expanded": r.value }])
|
|
2475
2503
|
}, [
|
|
2476
2504
|
P("button", {
|
|
2477
|
-
id:
|
|
2505
|
+
id: c,
|
|
2478
2506
|
class: ne(["topic-header", e.headerClass]),
|
|
2479
2507
|
type: "button",
|
|
2480
2508
|
"aria-expanded": r.value,
|
|
2481
2509
|
"aria-controls": n,
|
|
2482
2510
|
onClick: w
|
|
2483
2511
|
}, [
|
|
2484
|
-
e.icon ||
|
|
2485
|
-
he(
|
|
2486
|
-
e.icon ? (h(),
|
|
2512
|
+
e.icon || f.$slots.icon ? (h(), M("span", Ea, [
|
|
2513
|
+
he(f.$slots, "icon", {}, () => [
|
|
2514
|
+
e.icon ? (h(), G(y, {
|
|
2487
2515
|
key: 0,
|
|
2488
2516
|
icon: ["fas", e.icon],
|
|
2489
2517
|
"aria-hidden": "true"
|
|
2490
2518
|
}, null, 8, ["icon"])) : A("", !0)
|
|
2491
2519
|
], !0)
|
|
2492
2520
|
])) : A("", !0),
|
|
2493
|
-
P("span", Oa,
|
|
2521
|
+
P("span", Oa, H(e.title), 1),
|
|
2494
2522
|
P("span", {
|
|
2495
2523
|
class: ne(["topic-chevron", { "is-rotated": r.value }])
|
|
2496
|
-
}, [...
|
|
2524
|
+
}, [...S[0] || (S[0] = [
|
|
2497
2525
|
P("svg", {
|
|
2498
2526
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2499
2527
|
width: "20",
|
|
@@ -2513,11 +2541,11 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2513
2541
|
Zt(P("div", {
|
|
2514
2542
|
id: n,
|
|
2515
2543
|
role: "region",
|
|
2516
|
-
"aria-labelledby":
|
|
2544
|
+
"aria-labelledby": c,
|
|
2517
2545
|
class: "topic-content"
|
|
2518
2546
|
}, [
|
|
2519
|
-
he(
|
|
2520
|
-
|
|
2547
|
+
he(f.$slots, "default", {}, () => [
|
|
2548
|
+
S[1] || (S[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
|
|
2521
2549
|
], !0)
|
|
2522
2550
|
], 512), [
|
|
2523
2551
|
[oo, r.value]
|
|
@@ -2525,7 +2553,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2525
2553
|
], 2);
|
|
2526
2554
|
};
|
|
2527
2555
|
}
|
|
2528
|
-
}), ei = /* @__PURE__ */
|
|
2556
|
+
}), ei = /* @__PURE__ */ Me(za, [["__scopeId", "data-v-a2023afa"]]);
|
|
2529
2557
|
function Da(e) {
|
|
2530
2558
|
return e.displayOptions?.shouldShowCheckbox !== !1;
|
|
2531
2559
|
}
|
|
@@ -2556,10 +2584,10 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2556
2584
|
},
|
|
2557
2585
|
emits: ["toggleLayer", "setOpacity"],
|
|
2558
2586
|
setup(e, { emit: a }) {
|
|
2559
|
-
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading:
|
|
2587
|
+
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading: c, getLayerError: w, isLayerAvailableAtZoom: f } = Ct(
|
|
2560
2588
|
() => l
|
|
2561
2589
|
);
|
|
2562
|
-
function
|
|
2590
|
+
function S(y) {
|
|
2563
2591
|
o("toggleLayer", y);
|
|
2564
2592
|
}
|
|
2565
2593
|
return (y, m) => (h(), M("fieldset", {
|
|
@@ -2571,60 +2599,60 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2571
2599
|
key: i.id,
|
|
2572
2600
|
class: "layer-item"
|
|
2573
2601
|
}, [
|
|
2574
|
-
|
|
2602
|
+
p(Da)(i) ? (h(), M("label", {
|
|
2575
2603
|
key: 0,
|
|
2576
2604
|
class: ne(["layer-checkbox", {
|
|
2577
|
-
"layer-unavailable": !f
|
|
2578
|
-
"layer-error":
|
|
2605
|
+
"layer-unavailable": !p(f)(i),
|
|
2606
|
+
"layer-error": p(w)(i.id)
|
|
2579
2607
|
}])
|
|
2580
2608
|
}, [
|
|
2581
2609
|
P("input", {
|
|
2582
2610
|
type: "checkbox",
|
|
2583
|
-
checked:
|
|
2584
|
-
disabled: !f
|
|
2585
|
-
onChange: (g) =>
|
|
2611
|
+
checked: p(r)(i.id),
|
|
2612
|
+
disabled: !p(f)(i),
|
|
2613
|
+
onChange: (g) => S(i.id)
|
|
2586
2614
|
}, null, 40, Ra),
|
|
2587
2615
|
P("span", Aa, [
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
loading:
|
|
2591
|
-
error:
|
|
2592
|
-
unavailable: !f
|
|
2616
|
+
$e(H(p(ze)(i)) + " ", 1),
|
|
2617
|
+
J(nt, {
|
|
2618
|
+
loading: p(c)(i.id),
|
|
2619
|
+
error: p(w)(i.id),
|
|
2620
|
+
unavailable: !p(f)(i)
|
|
2593
2621
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2594
2622
|
])
|
|
2595
2623
|
], 2)) : (h(), M("div", {
|
|
2596
2624
|
key: 1,
|
|
2597
2625
|
class: ne(["layer-label-only", {
|
|
2598
|
-
"layer-unavailable": !f
|
|
2599
|
-
"layer-error":
|
|
2626
|
+
"layer-unavailable": !p(f)(i),
|
|
2627
|
+
"layer-error": p(w)(i.id)
|
|
2600
2628
|
}])
|
|
2601
2629
|
}, [
|
|
2602
2630
|
P("span", Ba, [
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
loading:
|
|
2606
|
-
error:
|
|
2607
|
-
unavailable: !f
|
|
2631
|
+
$e(H(p(ze)(i)) + " ", 1),
|
|
2632
|
+
J(nt, {
|
|
2633
|
+
loading: p(c)(i.id),
|
|
2634
|
+
error: p(w)(i.id),
|
|
2635
|
+
unavailable: !p(f)(i)
|
|
2608
2636
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2609
2637
|
])
|
|
2610
2638
|
], 2)),
|
|
2611
|
-
|
|
2639
|
+
p(jt)(i, e.showOpacity) && p(r)(i.id) && p(f)(i) ? (h(), G(Lt, {
|
|
2612
2640
|
key: 2,
|
|
2613
2641
|
"layer-id": i.id,
|
|
2614
|
-
"layer-name":
|
|
2615
|
-
opacity:
|
|
2642
|
+
"layer-name": p(ze)(i),
|
|
2643
|
+
opacity: p(n)(i.id),
|
|
2616
2644
|
"onUpdate:opacity": (g) => o("setOpacity", i.id, g)
|
|
2617
2645
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
2618
|
-
|
|
2646
|
+
p(qt)(i, e.showLegend) && p(r)(i.id) && p(f)(i) && i.legend?.length ? (h(), G(St, {
|
|
2619
2647
|
key: 3,
|
|
2620
2648
|
items: i.legend,
|
|
2621
|
-
label: "Legend for " +
|
|
2649
|
+
label: "Legend for " + p(ze)(i)
|
|
2622
2650
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
2623
2651
|
]))), 128)),
|
|
2624
2652
|
e.layers.length === 0 ? (h(), M("div", Va, "No layers available")) : A("", !0)
|
|
2625
2653
|
], 8, _a));
|
|
2626
2654
|
}
|
|
2627
|
-
}), ti = /* @__PURE__ */
|
|
2655
|
+
}), ti = /* @__PURE__ */ Me(Za, [["__scopeId", "data-v-bfcd7855"]]), Na = ["aria-label"], Ua = ["name", "checked", "disabled", "onChange"], Wa = { class: "layer-title" }, ja = {
|
|
2628
2656
|
key: 0,
|
|
2629
2657
|
class: "empty-state"
|
|
2630
2658
|
}, qa = /* @__PURE__ */ ge({
|
|
@@ -2643,10 +2671,10 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2643
2671
|
},
|
|
2644
2672
|
emits: ["selectLayer", "setOpacity"],
|
|
2645
2673
|
setup(e, { emit: a }) {
|
|
2646
|
-
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading:
|
|
2674
|
+
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading: c, getLayerError: w, isLayerAvailableAtZoom: f } = Ct(
|
|
2647
2675
|
() => l
|
|
2648
2676
|
);
|
|
2649
|
-
function
|
|
2677
|
+
function S(y) {
|
|
2650
2678
|
const m = l.layers.filter((i) => l.visibleLayerIds.has(i.id) && i.id !== y).map((i) => i.id);
|
|
2651
2679
|
o("selectLayer", y, m);
|
|
2652
2680
|
}
|
|
@@ -2661,48 +2689,48 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2661
2689
|
}, [
|
|
2662
2690
|
P("label", {
|
|
2663
2691
|
class: ne(["layer-radio", {
|
|
2664
|
-
"layer-unavailable": !f
|
|
2665
|
-
"layer-error":
|
|
2692
|
+
"layer-unavailable": !p(f)(i),
|
|
2693
|
+
"layer-error": p(w)(i.id)
|
|
2666
2694
|
}])
|
|
2667
2695
|
}, [
|
|
2668
2696
|
P("input", {
|
|
2669
2697
|
type: "radio",
|
|
2670
2698
|
name: e.groupName,
|
|
2671
|
-
checked:
|
|
2672
|
-
disabled: !f
|
|
2673
|
-
onChange: (g) =>
|
|
2699
|
+
checked: p(r)(i.id),
|
|
2700
|
+
disabled: !p(f)(i),
|
|
2701
|
+
onChange: (g) => S(i.id)
|
|
2674
2702
|
}, null, 40, Ua),
|
|
2675
2703
|
P("span", Wa, [
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
loading:
|
|
2679
|
-
error:
|
|
2680
|
-
unavailable: !f
|
|
2704
|
+
$e(H(p(ze)(i)) + " ", 1),
|
|
2705
|
+
J(nt, {
|
|
2706
|
+
loading: p(c)(i.id),
|
|
2707
|
+
error: p(w)(i.id),
|
|
2708
|
+
unavailable: !p(f)(i)
|
|
2681
2709
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2682
2710
|
])
|
|
2683
2711
|
], 2),
|
|
2684
|
-
|
|
2712
|
+
p(jt)(i, e.showOpacity) && p(r)(i.id) && p(f)(i) ? (h(), G(Lt, {
|
|
2685
2713
|
key: 0,
|
|
2686
2714
|
"layer-id": i.id,
|
|
2687
|
-
"layer-name":
|
|
2688
|
-
opacity:
|
|
2715
|
+
"layer-name": p(ze)(i),
|
|
2716
|
+
opacity: p(n)(i.id),
|
|
2689
2717
|
"onUpdate:opacity": (g) => o("setOpacity", i.id, g)
|
|
2690
2718
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
2691
|
-
|
|
2719
|
+
p(qt)(i, e.showLegend) && p(r)(i.id) && p(f)(i) && i.legend?.length ? (h(), G(St, {
|
|
2692
2720
|
key: 1,
|
|
2693
2721
|
items: i.legend,
|
|
2694
|
-
label: "Legend for " +
|
|
2722
|
+
label: "Legend for " + p(ze)(i)
|
|
2695
2723
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
2696
2724
|
]))), 128)),
|
|
2697
2725
|
e.layers.length === 0 ? (h(), M("div", ja, "No layers available")) : A("", !0)
|
|
2698
2726
|
], 8, Na));
|
|
2699
2727
|
}
|
|
2700
|
-
}), oi = /* @__PURE__ */
|
|
2728
|
+
}), oi = /* @__PURE__ */ Me(qa, [["__scopeId", "data-v-c368d815"]]);
|
|
2701
2729
|
function ai(e) {
|
|
2702
|
-
const a = x([]), l = x(/* @__PURE__ */ new Set()), o = x({}), r = x(/* @__PURE__ */ new Set()), n = x({}),
|
|
2703
|
-
if (!
|
|
2730
|
+
const a = x([]), l = x(/* @__PURE__ */ new Set()), o = x({}), r = x(/* @__PURE__ */ new Set()), n = x({}), c = x(""), w = x(!1), f = x(!1), S = x(null), y = _(() => {
|
|
2731
|
+
if (!c.value.trim())
|
|
2704
2732
|
return a.value;
|
|
2705
|
-
const T =
|
|
2733
|
+
const T = c.value.toLowerCase();
|
|
2706
2734
|
return a.value.filter((O) => O.title.toLowerCase().includes(T));
|
|
2707
2735
|
}), m = _(() => a.value.map((T) => ({
|
|
2708
2736
|
config: T,
|
|
@@ -2710,17 +2738,17 @@ function ai(e) {
|
|
|
2710
2738
|
// "circle", "fill", or "line"
|
|
2711
2739
|
})));
|
|
2712
2740
|
async function i() {
|
|
2713
|
-
if (!
|
|
2714
|
-
w.value = !0,
|
|
2741
|
+
if (!f.value) {
|
|
2742
|
+
w.value = !0, S.value = null;
|
|
2715
2743
|
try {
|
|
2716
2744
|
let T;
|
|
2717
2745
|
e.mode === "dynamic" || !e.mode ? e.webMapId ? T = await g(e.webMapId) : T = await wt() : T = await wt(), a.value = T;
|
|
2718
2746
|
const O = {};
|
|
2719
2747
|
T.forEach((D) => {
|
|
2720
2748
|
O[D.id] = D.opacity ?? 1;
|
|
2721
|
-
}), o.value = O,
|
|
2749
|
+
}), o.value = O, f.value = !0;
|
|
2722
2750
|
} catch (T) {
|
|
2723
|
-
|
|
2751
|
+
S.value = T instanceof Error ? T : new Error("Failed to initialize layerboard");
|
|
2724
2752
|
} finally {
|
|
2725
2753
|
w.value = !1;
|
|
2726
2754
|
}
|
|
@@ -2743,8 +2771,8 @@ function ai(e) {
|
|
|
2743
2771
|
[T]: Math.max(0, Math.min(1, O))
|
|
2744
2772
|
};
|
|
2745
2773
|
}
|
|
2746
|
-
function
|
|
2747
|
-
|
|
2774
|
+
function C(T) {
|
|
2775
|
+
c.value = T;
|
|
2748
2776
|
}
|
|
2749
2777
|
function E(T, O) {
|
|
2750
2778
|
const D = new Set(r.value);
|
|
@@ -2759,19 +2787,19 @@ function ai(e) {
|
|
|
2759
2787
|
}
|
|
2760
2788
|
}
|
|
2761
2789
|
function V() {
|
|
2762
|
-
a.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {},
|
|
2790
|
+
a.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {}, c.value = "", w.value = !1, f.value = !1, S.value = null;
|
|
2763
2791
|
}
|
|
2764
2792
|
return {
|
|
2765
2793
|
// State (readonly)
|
|
2766
|
-
layerConfigs:
|
|
2767
|
-
visibleLayers:
|
|
2768
|
-
layerOpacities:
|
|
2769
|
-
loadingLayers:
|
|
2770
|
-
layerErrors:
|
|
2771
|
-
searchQuery:
|
|
2772
|
-
isLoading:
|
|
2773
|
-
isInitialized:
|
|
2774
|
-
error:
|
|
2794
|
+
layerConfigs: q(a),
|
|
2795
|
+
visibleLayers: q(l),
|
|
2796
|
+
layerOpacities: q(o),
|
|
2797
|
+
loadingLayers: q(r),
|
|
2798
|
+
layerErrors: q(n),
|
|
2799
|
+
searchQuery: q(c),
|
|
2800
|
+
isLoading: q(w),
|
|
2801
|
+
isInitialized: q(f),
|
|
2802
|
+
error: q(S),
|
|
2775
2803
|
// Computed
|
|
2776
2804
|
filteredLayerConfigs: y,
|
|
2777
2805
|
layerList: m,
|
|
@@ -2781,7 +2809,7 @@ function ai(e) {
|
|
|
2781
2809
|
initialize: i,
|
|
2782
2810
|
toggleLayer: d,
|
|
2783
2811
|
setLayerOpacity: L,
|
|
2784
|
-
filterLayers:
|
|
2812
|
+
filterLayers: C,
|
|
2785
2813
|
setLayerLoading: E,
|
|
2786
2814
|
setLayerError: F,
|
|
2787
2815
|
reset: V
|
|
@@ -2805,29 +2833,29 @@ function ii() {
|
|
|
2805
2833
|
}
|
|
2806
2834
|
function Ga(e) {
|
|
2807
2835
|
const a = x(null), l = x(!1), o = x(null), r = x(0);
|
|
2808
|
-
async function n(
|
|
2836
|
+
async function n(f = {}) {
|
|
2809
2837
|
l.value = !0, o.value = null;
|
|
2810
|
-
const
|
|
2838
|
+
const S = e.pageSize || 2e3;
|
|
2811
2839
|
let y = 0, m = [], i = !0;
|
|
2812
2840
|
try {
|
|
2813
2841
|
for (; i; ) {
|
|
2814
|
-
const d = e.url.replace(/\/$/, ""), L = encodeURIComponent(
|
|
2815
|
-
let
|
|
2816
|
-
if (
|
|
2842
|
+
const d = e.url.replace(/\/$/, ""), L = encodeURIComponent(f.where || e.where || "1=1");
|
|
2843
|
+
let C = `${d}/query?where=${L}&outFields=*&returnGeometry=true&resultRecordCount=${S}&resultOffset=${y}&f=geojson`;
|
|
2844
|
+
if (f.bounds) {
|
|
2817
2845
|
const V = JSON.stringify({
|
|
2818
|
-
xmin:
|
|
2819
|
-
ymin:
|
|
2820
|
-
xmax:
|
|
2821
|
-
ymax:
|
|
2846
|
+
xmin: f.bounds.west,
|
|
2847
|
+
ymin: f.bounds.south,
|
|
2848
|
+
xmax: f.bounds.east,
|
|
2849
|
+
ymax: f.bounds.north,
|
|
2822
2850
|
spatialReference: { wkid: 4326 }
|
|
2823
2851
|
});
|
|
2824
|
-
|
|
2852
|
+
C += `&geometry=${encodeURIComponent(V)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
|
|
2825
2853
|
}
|
|
2826
|
-
const E = await fetch(
|
|
2854
|
+
const E = await fetch(C);
|
|
2827
2855
|
if (!E.ok)
|
|
2828
2856
|
throw new Error(`HTTP ${E.status}: ${E.statusText}`);
|
|
2829
2857
|
const F = await E.json();
|
|
2830
|
-
F.features && F.features.length > 0 ? (m = m.concat(F.features), y += F.features.length, i = F.features.length ===
|
|
2858
|
+
F.features && F.features.length > 0 ? (m = m.concat(F.features), y += F.features.length, i = F.features.length === S) : i = !1;
|
|
2831
2859
|
}
|
|
2832
2860
|
const g = {
|
|
2833
2861
|
type: "FeatureCollection",
|
|
@@ -2841,24 +2869,24 @@ function Ga(e) {
|
|
|
2841
2869
|
l.value = !1;
|
|
2842
2870
|
}
|
|
2843
2871
|
}
|
|
2844
|
-
function
|
|
2872
|
+
function c() {
|
|
2845
2873
|
a.value = null, r.value = 0, o.value = null;
|
|
2846
2874
|
}
|
|
2847
|
-
async function w(
|
|
2848
|
-
return n(
|
|
2875
|
+
async function w(f = {}) {
|
|
2876
|
+
return n(f);
|
|
2849
2877
|
}
|
|
2850
2878
|
return {
|
|
2851
2879
|
// State (readonly)
|
|
2852
|
-
data:
|
|
2853
|
-
isLoading:
|
|
2854
|
-
error:
|
|
2855
|
-
totalFeatures:
|
|
2880
|
+
data: q(a),
|
|
2881
|
+
isLoading: q(l),
|
|
2882
|
+
error: q(o),
|
|
2883
|
+
totalFeatures: q(r),
|
|
2856
2884
|
// Config
|
|
2857
2885
|
config: e,
|
|
2858
2886
|
// Methods
|
|
2859
2887
|
fetch: n,
|
|
2860
2888
|
refetch: w,
|
|
2861
|
-
clear:
|
|
2889
|
+
clear: c
|
|
2862
2890
|
};
|
|
2863
2891
|
}
|
|
2864
2892
|
function li(e, a, l) {
|