@phila/layerboard 3.0.0-beta.25 → 3.0.0-beta.26
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/index.js +2 -2
- package/dist/index.mjs +426 -425
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as he, ref as w, watch as Be, computed as D, nextTick as qe, onMounted as ot, onUnmounted as Ot, createElementBlock as x, openBlock as m, createVNode as H, unref as d, withCtx as Ke, createBlock as q, createCommentVNode as B, Fragment as ue, renderList as be, useAttrs as Nt, toRef as Ut, normalizeClass as se, createElementVNode as P, toDisplayString as G, renderSlot as me, withDirectives as zt, mergeProps as pt, vModelDynamic as Wt, createTextVNode as Pe, normalizeProps as St, guardReactiveProps as Ct, normalizeStyle as ye, withModifiers as jt, readonly as j, provide as Z, onBeforeUnmount as qt, useId as kt, resolveComponent as Gt, vShow as Ht } from "vue";
|
|
2
2
|
import { Map as Jt, DrawTool as Kt, RasterLayer as xt, CircleLayer as $t, FillLayer as Mt, LineLayer as dt, MapMarker as Qt, MapPopup as Xt } from "@phila/phila-ui-map-core";
|
|
3
|
-
import { cn as yt, Icon as
|
|
4
|
-
const eo = { class: "map-panel" }, to = /* @__PURE__ */
|
|
3
|
+
import { cn as yt, Icon as Me, BaseLink as Yt, ActionContent as Pt } from "@phila/phila-ui-core";
|
|
4
|
+
const eo = { class: "map-panel" }, to = /* @__PURE__ */ he({
|
|
5
5
|
__name: "MapPanel",
|
|
6
6
|
props: {
|
|
7
7
|
visibleLayers: {},
|
|
@@ -40,21 +40,21 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
40
40
|
xmax: c.east,
|
|
41
41
|
ymax: c.north,
|
|
42
42
|
spatialReference: { wkid: 4326 }
|
|
43
|
-
}),
|
|
44
|
-
let
|
|
43
|
+
}), le = k !== void 0 && k < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, k) * 512)}` : "", U = 2e3;
|
|
44
|
+
let oe = 0, V = [], ee = !0;
|
|
45
45
|
for (; ee; ) {
|
|
46
|
-
const Y = `${t}/query?where=${E}&geometry=${encodeURIComponent(A)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${U}&resultOffset=${
|
|
47
|
-
if (!
|
|
48
|
-
throw new Error(`HTTP ${
|
|
49
|
-
const
|
|
50
|
-
|
|
46
|
+
const Y = `${t}/query?where=${E}&geometry=${encodeURIComponent(A)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${U}&resultOffset=${oe}${le}&f=geojson`, pe = await fetch(Y);
|
|
47
|
+
if (!pe.ok)
|
|
48
|
+
throw new Error(`HTTP ${pe.status}: ${pe.statusText}`);
|
|
49
|
+
const Ie = await pe.json();
|
|
50
|
+
Ie.features && Ie.features.length > 0 ? (V = V.concat(Ie.features), oe += Ie.features.length, ee = Ie.features.length === U) : ee = !1;
|
|
51
51
|
}
|
|
52
52
|
return V = V.map((Y) => {
|
|
53
53
|
if (Y.properties) {
|
|
54
|
-
const
|
|
55
|
-
for (const
|
|
56
|
-
|
|
57
|
-
return { ...Y, properties:
|
|
54
|
+
const pe = {};
|
|
55
|
+
for (const Ie of Object.keys(Y.properties))
|
|
56
|
+
pe[Ie.toLowerCase()] = Y.properties[Ie];
|
|
57
|
+
return { ...Y, properties: pe };
|
|
58
58
|
}
|
|
59
59
|
return Y;
|
|
60
60
|
}), {
|
|
@@ -99,10 +99,10 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
99
99
|
const s = t.getZoom();
|
|
100
100
|
o("zoom", s), u.value = f(t), p(g.value);
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
Be(
|
|
103
103
|
() => l.visibleLayers,
|
|
104
104
|
async () => {
|
|
105
|
-
if (
|
|
105
|
+
if (ce.value.length > 0 && ie(), g.value) {
|
|
106
106
|
const t = new Set(l.visibleLayers), c = [...t].filter((s) => !v.value.has(s));
|
|
107
107
|
v.value = new Set(t), c.length > 0 && await b(g.value, c);
|
|
108
108
|
}
|
|
@@ -114,7 +114,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
114
114
|
function _(t) {
|
|
115
115
|
return !!$.value[t.id];
|
|
116
116
|
}
|
|
117
|
-
const
|
|
117
|
+
const J = D(
|
|
118
118
|
() => l.layerList.filter((t) => t.config.type === "circle" && T(t.config.id) && _(t.config)).map((t) => t.config)
|
|
119
119
|
), I = D(
|
|
120
120
|
() => l.layerList.filter((t) => t.config.type === "fill" && T(t.config.id) && _(t.config)).map((t) => t.config)
|
|
@@ -125,9 +125,9 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
125
125
|
), O = D(
|
|
126
126
|
() => l.layerList.filter((t) => t.config.type === "line" && T(t.config.id) && _(t.config)).map((t) => t.config)
|
|
127
127
|
);
|
|
128
|
-
|
|
128
|
+
Be(O, async (t) => {
|
|
129
129
|
if (t.length < 2) return;
|
|
130
|
-
await
|
|
130
|
+
await qe();
|
|
131
131
|
const c = r.value;
|
|
132
132
|
if (c)
|
|
133
133
|
for (let s = t.length - 1; s >= 0; s--) {
|
|
@@ -141,24 +141,24 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
141
141
|
function R(t) {
|
|
142
142
|
return l.visibleTiledLayers?.has(t) ?? !1;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function ne(t) {
|
|
145
145
|
return l.tiledLayerOpacities?.[t] ?? 1;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function K(t) {
|
|
148
148
|
return `${t.replace(/\/$/, "")}/tile/{z}/{y}/{x}`;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Ve(t) {
|
|
151
151
|
return {
|
|
152
152
|
type: "raster",
|
|
153
|
-
tiles: [
|
|
153
|
+
tiles: [K(t.url)],
|
|
154
154
|
tileSize: 256,
|
|
155
155
|
attribution: t.attribution || ""
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
const Le = w({}),
|
|
159
|
-
async function
|
|
160
|
-
if (!
|
|
161
|
-
|
|
158
|
+
const Le = w({}), ze = w(/* @__PURE__ */ new Set());
|
|
159
|
+
async function Fe(t) {
|
|
160
|
+
if (!ze.value.has(t.id)) {
|
|
161
|
+
ze.value.add(t.id);
|
|
162
162
|
try {
|
|
163
163
|
const c = t.url.replace(/\/$/, ""), s = await fetch(`${c}?f=json`);
|
|
164
164
|
if (!s.ok)
|
|
@@ -179,9 +179,9 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
179
179
|
ot(() => {
|
|
180
180
|
if (l.tiledLayers)
|
|
181
181
|
for (const t of l.tiledLayers)
|
|
182
|
-
t.scaleBasedRendering &&
|
|
182
|
+
t.scaleBasedRendering && Fe(t);
|
|
183
183
|
});
|
|
184
|
-
function
|
|
184
|
+
function Se(t) {
|
|
185
185
|
if (!t.scaleBasedRendering)
|
|
186
186
|
return "tiled";
|
|
187
187
|
const c = Le.value[t.id];
|
|
@@ -190,8 +190,8 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
190
190
|
const s = u.value;
|
|
191
191
|
return s === 0 || s > c.maxScale ? "tiled" : "dynamic";
|
|
192
192
|
}
|
|
193
|
-
const
|
|
194
|
-
function
|
|
193
|
+
const ge = D(() => l.tiledLayers ? l.tiledLayers.filter((t) => R(t.id) ? t.scaleBasedRendering ? Se(t) === "tiled" : !0 : !1) : []), Ze = D(() => l.tiledLayers ? l.tiledLayers.filter((t) => R(t.id) && t.scaleBasedRendering ? Se(t) === "dynamic" : !1) : []);
|
|
194
|
+
function Ee(t) {
|
|
195
195
|
return {
|
|
196
196
|
type: "raster",
|
|
197
197
|
tiles: [`${t.url.replace(/\/$/, "")}/export?bbox={bbox-epsg-3857}&bboxSR=3857&imageSR=3857&size=256,256&format=png32&transparent=true&f=image`],
|
|
@@ -199,44 +199,44 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
199
199
|
attribution: t.attribution || ""
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function W(t) {
|
|
203
203
|
return { type: "geojson", data: $.value[t.id], tolerance: 0 };
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function de(t) {
|
|
206
206
|
return l.layerOpacities[t] ?? 1;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
const c =
|
|
208
|
+
function te(t) {
|
|
209
|
+
const c = de(t.id), s = t.type === "circle" ? "circle-opacity" : t.type === "fill" ? "fill-opacity" : "line-opacity";
|
|
210
210
|
if (t.type === "fill" && t.paint["fill-opacity"] === 0)
|
|
211
211
|
return { ...t.paint, "fill-opacity": 0 };
|
|
212
|
-
const h = t.type === "circle" ? "circle-color" : t.type === "fill" ? "fill-color" : "line-color", k = { ...t.paint }, E = k[h], A = k[s] === 1,
|
|
213
|
-
if (A &&
|
|
212
|
+
const h = t.type === "circle" ? "circle-color" : t.type === "fill" ? "fill-color" : "line-color", k = { ...t.paint }, E = k[h], A = k[s] === 1, le = typeof E == "string" && E.startsWith("rgba(");
|
|
213
|
+
if (A && le) {
|
|
214
214
|
if (c === 1)
|
|
215
215
|
return k;
|
|
216
216
|
{
|
|
217
217
|
const U = E.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
218
218
|
if (U && U[4]) {
|
|
219
|
-
const [,
|
|
220
|
-
k[h] = `rgba(${
|
|
219
|
+
const [, oe, V, ee, Y] = U, pe = parseFloat(Y) * c;
|
|
220
|
+
k[h] = `rgba(${oe}, ${V}, ${ee}, ${pe})`, k[s] = 1;
|
|
221
221
|
}
|
|
222
222
|
return k;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
if (
|
|
225
|
+
if (le) {
|
|
226
226
|
const U = E.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
227
227
|
if (U) {
|
|
228
|
-
const [,
|
|
229
|
-
k[h] = `rgb(${
|
|
228
|
+
const [, oe, V, ee] = U;
|
|
229
|
+
k[h] = `rgb(${oe}, ${V}, ${ee})`;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
return k[s] = c, k;
|
|
233
233
|
}
|
|
234
234
|
function rt(t) {
|
|
235
|
-
const c =
|
|
235
|
+
const c = de(t.id);
|
|
236
236
|
return { ...t.outlinePaint, "line-opacity": c };
|
|
237
237
|
}
|
|
238
|
-
const
|
|
239
|
-
function
|
|
238
|
+
const ce = w([]), Ne = w(null), ae = w(0);
|
|
239
|
+
function De(t) {
|
|
240
240
|
const c = t.replace(/-outline$/, "");
|
|
241
241
|
return l.layerList.find((h) => h.config.id === c)?.config;
|
|
242
242
|
}
|
|
@@ -246,7 +246,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
246
246
|
return k == null ? "" : String(k);
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function Ce(t) {
|
|
250
250
|
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
251
251
|
}
|
|
252
252
|
function Ge(t, c, s) {
|
|
@@ -277,8 +277,8 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
277
277
|
return String(t);
|
|
278
278
|
const E = t.toFixed(h);
|
|
279
279
|
if (k) {
|
|
280
|
-
const A = E.split("."),
|
|
281
|
-
return U ? `${
|
|
280
|
+
const A = E.split("."), le = A[0] || "0", U = A[1], oe = le.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
281
|
+
return U ? `${oe}.${U}` : oe;
|
|
282
282
|
}
|
|
283
283
|
return E;
|
|
284
284
|
}
|
|
@@ -305,16 +305,16 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
305
305
|
}
|
|
306
306
|
return null;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function ke(t, c) {
|
|
309
309
|
const s = /* @__PURE__ */ new Map();
|
|
310
310
|
return c.forEach((h, k) => {
|
|
311
311
|
s.set(h.id, k);
|
|
312
312
|
}), t.sort((h, k) => {
|
|
313
|
-
const E = h.layer.id.replace(/-outline$/, ""), A = k.layer.id.replace(/-outline$/, ""),
|
|
314
|
-
return (s.get(A) ?? -1) -
|
|
313
|
+
const E = h.layer.id.replace(/-outline$/, ""), A = k.layer.id.replace(/-outline$/, ""), le = s.get(E) ?? -1;
|
|
314
|
+
return (s.get(A) ?? -1) - le;
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function Ue(t) {
|
|
318
318
|
const c = r.value;
|
|
319
319
|
if (!c) return;
|
|
320
320
|
const s = [];
|
|
@@ -326,53 +326,53 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
326
326
|
layers: s
|
|
327
327
|
});
|
|
328
328
|
if (k.length === 0) return;
|
|
329
|
-
const E = He(k), A = l.layerList.map((V) => V.config), U =
|
|
330
|
-
const ee = V.layer.id.replace(/-outline$/, ""), Y =
|
|
329
|
+
const E = He(k), A = l.layerList.map((V) => V.config), U = ke(E, A).map((V) => {
|
|
330
|
+
const ee = V.layer.id.replace(/-outline$/, ""), Y = De(ee);
|
|
331
331
|
if (!Y) return null;
|
|
332
|
-
const
|
|
332
|
+
const pe = Xe(Y.id, V.properties || {});
|
|
333
333
|
return {
|
|
334
334
|
layerId: Y.id,
|
|
335
335
|
layerTitle: Y.title,
|
|
336
336
|
properties: V.properties || {},
|
|
337
|
-
geometry:
|
|
337
|
+
geometry: pe || V.geometry,
|
|
338
338
|
popupConfig: Y.popup
|
|
339
339
|
};
|
|
340
340
|
}).filter((V) => V !== null);
|
|
341
341
|
if (U.length === 0) return;
|
|
342
|
-
|
|
343
|
-
const
|
|
344
|
-
if (
|
|
345
|
-
const V =
|
|
342
|
+
ce.value = U, ae.value = 0, Ne.value = [t.lngLat.lng, t.lngLat.lat];
|
|
343
|
+
const oe = U[0];
|
|
344
|
+
if (oe) {
|
|
345
|
+
const V = De(oe.layerId);
|
|
346
346
|
if (V) {
|
|
347
|
-
const ee = M(
|
|
347
|
+
const ee = M(oe.geometry), Y = Q(V.id, V.type);
|
|
348
348
|
y.value = {
|
|
349
|
-
geometry:
|
|
349
|
+
geometry: oe.geometry,
|
|
350
350
|
geometryType: ee,
|
|
351
351
|
layerId: V.id,
|
|
352
|
-
properties:
|
|
352
|
+
properties: oe.properties,
|
|
353
353
|
originalStyle: Y
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
|
|
358
|
+
function ie() {
|
|
359
|
+
ce.value = [], Ne.value = null, ae.value = 0, y.value = null;
|
|
360
360
|
}
|
|
361
361
|
function Ye(t) {
|
|
362
|
-
if (
|
|
362
|
+
if (ce.value.length === 0) return;
|
|
363
363
|
const c = t.target;
|
|
364
364
|
if (!(c.tagName === "INPUT" || c.tagName === "TEXTAREA" || c.isContentEditable))
|
|
365
365
|
switch (t.key) {
|
|
366
366
|
case "ArrowLeft":
|
|
367
367
|
case "ArrowUp":
|
|
368
|
-
t.preventDefault(),
|
|
368
|
+
t.preventDefault(), fe();
|
|
369
369
|
break;
|
|
370
370
|
case "ArrowRight":
|
|
371
371
|
case "ArrowDown":
|
|
372
|
-
t.preventDefault(),
|
|
372
|
+
t.preventDefault(), _e();
|
|
373
373
|
break;
|
|
374
374
|
case "Escape":
|
|
375
|
-
t.preventDefault(),
|
|
375
|
+
t.preventDefault(), ie();
|
|
376
376
|
break;
|
|
377
377
|
}
|
|
378
378
|
}
|
|
@@ -381,36 +381,36 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
381
381
|
}), Ot(() => {
|
|
382
382
|
window.removeEventListener("keydown", Ye);
|
|
383
383
|
});
|
|
384
|
-
function
|
|
385
|
-
const t =
|
|
386
|
-
t <= 1 ||
|
|
384
|
+
function _e() {
|
|
385
|
+
const t = ce.value.length;
|
|
386
|
+
t <= 1 || ae.value >= t - 1 || (ae.value = ae.value + 1);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
|
|
388
|
+
function fe() {
|
|
389
|
+
ce.value.length <= 1 || ae.value <= 0 || (ae.value = ae.value - 1);
|
|
390
390
|
}
|
|
391
|
-
const
|
|
392
|
-
const t =
|
|
391
|
+
const Re = D(() => ce.value.length === 0 ? null : ce.value[ae.value]), ve = D(() => {
|
|
392
|
+
const t = Re.value;
|
|
393
393
|
return !t || !t.popupConfig ? t?.layerTitle || "" : st(t.popupConfig.title, t.properties);
|
|
394
394
|
}), Je = D(() => {
|
|
395
|
-
const t =
|
|
395
|
+
const t = Re.value;
|
|
396
396
|
if (!t) return "";
|
|
397
397
|
let c = '<div class="popup-content">';
|
|
398
|
-
if (c += `<h3 class="popup-title">${
|
|
399
|
-
c += `<table class="popup-table" aria-label="${
|
|
398
|
+
if (c += `<h3 class="popup-title">${Ce(ve.value)}</h3>`, t.popupConfig?.fields?.length) {
|
|
399
|
+
c += `<table class="popup-table" aria-label="${Ce(ve.value)}">`;
|
|
400
400
|
for (const s of t.popupConfig.fields) {
|
|
401
|
-
const h = Ge(t.properties[s.field], s.format, t.popupConfig.showTime), k = s.label.toLowerCase(), E = k.includes("url") || k.includes("website"), A = h.startsWith("http://") || h.startsWith("https://") || h.startsWith("www.") || E && h.includes("."),
|
|
402
|
-
c += `<tr><th scope="row">${
|
|
401
|
+
const h = Ge(t.properties[s.field], s.format, t.popupConfig.showTime), k = s.label.toLowerCase(), E = k.includes("url") || k.includes("website"), A = h.startsWith("http://") || h.startsWith("https://") || h.startsWith("www.") || E && h.includes("."), le = h.startsWith("http://") || h.startsWith("https://") ? h : `https://${h}`, U = A ? `<a href="${Ce(le)}" target="_blank" rel="noopener noreferrer">${Ce(h)}</a>` : Ce(h);
|
|
402
|
+
c += `<tr><th scope="row">${Ce(s.label)}</th><td>${U}</td></tr>`;
|
|
403
403
|
}
|
|
404
404
|
c += "</table>";
|
|
405
405
|
}
|
|
406
406
|
return c += "</div>", c;
|
|
407
|
-
}),
|
|
407
|
+
}), xe = w({
|
|
408
408
|
type: "FeatureCollection",
|
|
409
409
|
features: []
|
|
410
|
-
}),
|
|
410
|
+
}), re = w({
|
|
411
411
|
type: "FeatureCollection",
|
|
412
412
|
features: []
|
|
413
|
-
}),
|
|
413
|
+
}), We = w({
|
|
414
414
|
type: "FeatureCollection",
|
|
415
415
|
features: []
|
|
416
416
|
}), ct = {
|
|
@@ -430,8 +430,8 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
430
430
|
function M(t) {
|
|
431
431
|
return t.type;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
434
|
-
const s =
|
|
433
|
+
function Q(t, c) {
|
|
434
|
+
const s = De(t);
|
|
435
435
|
if (!s) return { radius: 5, width: 2 };
|
|
436
436
|
const h = s.paint || {};
|
|
437
437
|
if (c === "circle") {
|
|
@@ -454,7 +454,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
454
454
|
function N(t) {
|
|
455
455
|
return !t || t.length === 0 ? [] : t[0] ?? [];
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function X(t) {
|
|
458
458
|
const { geometry: c, geometryType: s, originalStyle: h } = t;
|
|
459
459
|
if (s === "Point" || s === "MultiPoint") {
|
|
460
460
|
const E = (h.radius || 5) + 3;
|
|
@@ -487,7 +487,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
487
487
|
};
|
|
488
488
|
}
|
|
489
489
|
if (s === "Polygon") {
|
|
490
|
-
const k = c.coordinates, E = N(k),
|
|
490
|
+
const k = c.coordinates, E = N(k), le = (h.width || 2) + 3;
|
|
491
491
|
return {
|
|
492
492
|
type: "FeatureCollection",
|
|
493
493
|
features: [
|
|
@@ -498,7 +498,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
498
498
|
coordinates: E
|
|
499
499
|
},
|
|
500
500
|
properties: {
|
|
501
|
-
highlightWidth:
|
|
501
|
+
highlightWidth: le
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
]
|
|
@@ -525,41 +525,41 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
525
525
|
features: []
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function $e(t) {
|
|
529
529
|
const { geometry: c, geometryType: s } = t;
|
|
530
530
|
return s === "Polygon" || s === "MultiPolygon" ? {
|
|
531
531
|
type: "FeatureCollection",
|
|
532
532
|
features: [{ type: "Feature", geometry: c, properties: {} }]
|
|
533
533
|
} : { type: "FeatureCollection", features: [] };
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function je(t) {
|
|
536
536
|
if (!t) {
|
|
537
537
|
Vt();
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
const c =
|
|
541
|
-
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (
|
|
540
|
+
const c = X(t);
|
|
541
|
+
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (xe.value = c, re.value = { type: "FeatureCollection", features: [] }, We.value = { type: "FeatureCollection", features: [] }) : (re.value = c, xe.value = { type: "FeatureCollection", features: [] }, We.value = $e(t));
|
|
542
542
|
}
|
|
543
543
|
function Vt() {
|
|
544
|
-
|
|
544
|
+
xe.value = { type: "FeatureCollection", features: [] }, re.value = { type: "FeatureCollection", features: [] }, We.value = { type: "FeatureCollection", features: [] };
|
|
545
545
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
}),
|
|
546
|
+
Be(y, (t) => {
|
|
547
|
+
je(t);
|
|
548
|
+
}), Be(
|
|
549
549
|
() => l.visibleLayers,
|
|
550
550
|
(t) => {
|
|
551
|
-
y.value && !t.has(y.value.layerId) && (y.value = null,
|
|
551
|
+
y.value && !t.has(y.value.layerId) && (y.value = null, ie());
|
|
552
552
|
},
|
|
553
553
|
{ deep: !0 }
|
|
554
|
-
),
|
|
555
|
-
const t =
|
|
554
|
+
), Be(ae, () => {
|
|
555
|
+
const t = Re.value;
|
|
556
556
|
if (!t) {
|
|
557
557
|
y.value = null;
|
|
558
558
|
return;
|
|
559
559
|
}
|
|
560
|
-
const c =
|
|
560
|
+
const c = De(t.layerId);
|
|
561
561
|
if (c) {
|
|
562
|
-
const s = M(t.geometry), h =
|
|
562
|
+
const s = M(t.geometry), h = Q(c.id, c.type);
|
|
563
563
|
y.value = {
|
|
564
564
|
geometry: t.geometry,
|
|
565
565
|
geometryType: s,
|
|
@@ -575,7 +575,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
575
575
|
Lt.value = [c, s];
|
|
576
576
|
}
|
|
577
577
|
return (t, c) => (m(), x("div", eo, [
|
|
578
|
-
|
|
578
|
+
H(d(Jt), {
|
|
579
579
|
ref_key: "mapRef",
|
|
580
580
|
ref: n,
|
|
581
581
|
zoom: l.initialZoom,
|
|
@@ -593,124 +593,124 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ ge({
|
|
|
593
593
|
"tool-panel-layout": "vertical",
|
|
594
594
|
"tool-panel-split-ratio": 50,
|
|
595
595
|
onZoom: S,
|
|
596
|
-
onClick:
|
|
596
|
+
onClick: ie,
|
|
597
597
|
onMoveend: L,
|
|
598
598
|
onLoad: C,
|
|
599
599
|
onSearchResult: Zt
|
|
600
600
|
}, {
|
|
601
601
|
default: Ke(() => [
|
|
602
|
-
l.drawControlPosition !== null ? (m(),
|
|
602
|
+
l.drawControlPosition !== null ? (m(), q(d(Kt), {
|
|
603
603
|
key: 0,
|
|
604
604
|
position: l.drawControlPosition
|
|
605
605
|
}, null, 8, ["position"])) : B("", !0),
|
|
606
|
-
(m(!0), x(
|
|
606
|
+
(m(!0), x(ue, null, be(ge.value, (s) => (m(), q(d(xt), {
|
|
607
607
|
id: "tiled-" + s.id,
|
|
608
608
|
key: "tiled-" + s.id,
|
|
609
|
-
source:
|
|
610
|
-
paint: { "raster-opacity":
|
|
609
|
+
source: Ve(s),
|
|
610
|
+
paint: { "raster-opacity": ne(s.id) },
|
|
611
611
|
minzoom: s.minZoom,
|
|
612
612
|
maxzoom: s.maxZoom
|
|
613
613
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
614
|
-
(m(!0), x(
|
|
614
|
+
(m(!0), x(ue, null, be(Ze.value, (s) => (m(), q(d(xt), {
|
|
615
615
|
id: "dynamic-" + s.id,
|
|
616
616
|
key: "dynamic-" + s.id,
|
|
617
|
-
source:
|
|
618
|
-
paint: { "raster-opacity":
|
|
617
|
+
source: Ee(s),
|
|
618
|
+
paint: { "raster-opacity": ne(s.id) },
|
|
619
619
|
minzoom: s.minZoom,
|
|
620
620
|
maxzoom: s.maxZoom
|
|
621
621
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
622
|
-
(m(!0), x(
|
|
622
|
+
(m(!0), x(ue, null, be(J.value, (s) => (m(), q(d($t), {
|
|
623
623
|
id: s.id,
|
|
624
624
|
key: s.id,
|
|
625
|
-
source:
|
|
626
|
-
paint:
|
|
625
|
+
source: W(s),
|
|
626
|
+
paint: te(s),
|
|
627
627
|
minzoom: s.minZoom,
|
|
628
628
|
maxzoom: s.maxZoom,
|
|
629
629
|
"before-id": "highlight-circles",
|
|
630
|
-
onClick:
|
|
630
|
+
onClick: Ue
|
|
631
631
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
632
|
-
(m(!0), x(
|
|
632
|
+
(m(!0), x(ue, null, be(I.value, (s) => (m(), q(d(Mt), {
|
|
633
633
|
id: s.id,
|
|
634
634
|
key: s.id,
|
|
635
|
-
source:
|
|
636
|
-
paint:
|
|
635
|
+
source: W(s),
|
|
636
|
+
paint: te(s),
|
|
637
637
|
minzoom: s.minZoom,
|
|
638
638
|
maxzoom: s.maxZoom,
|
|
639
639
|
"before-id": "highlight-circles",
|
|
640
|
-
onClick:
|
|
640
|
+
onClick: Ue
|
|
641
641
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
642
|
-
(m(!0), x(
|
|
642
|
+
(m(!0), x(ue, null, be(F.value, (s) => (m(), q(d(dt), {
|
|
643
643
|
id: s.id + "-outline",
|
|
644
644
|
key: s.id + "-outline",
|
|
645
|
-
source:
|
|
645
|
+
source: W(s),
|
|
646
646
|
paint: rt(s),
|
|
647
647
|
minzoom: s.minZoom,
|
|
648
648
|
maxzoom: s.maxZoom,
|
|
649
649
|
"before-id": "highlight-lines",
|
|
650
|
-
onClick:
|
|
650
|
+
onClick: Ue
|
|
651
651
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
652
|
-
(m(!0), x(
|
|
652
|
+
(m(!0), x(ue, null, be(O.value, (s) => (m(), q(d(dt), {
|
|
653
653
|
id: s.id,
|
|
654
654
|
key: s.id,
|
|
655
|
-
source:
|
|
656
|
-
paint:
|
|
655
|
+
source: W(s),
|
|
656
|
+
paint: te(s),
|
|
657
657
|
minzoom: s.minZoom,
|
|
658
658
|
maxzoom: s.maxZoom,
|
|
659
659
|
"before-id": "highlight-lines",
|
|
660
|
-
onClick:
|
|
660
|
+
onClick: Ue
|
|
661
661
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
662
|
-
|
|
662
|
+
H(d($t), {
|
|
663
663
|
id: "highlight-circles",
|
|
664
664
|
key: "highlight-circles-layer",
|
|
665
|
-
source: { type: "geojson", data:
|
|
665
|
+
source: { type: "geojson", data: xe.value },
|
|
666
666
|
paint: ct
|
|
667
667
|
}, null, 8, ["source"]),
|
|
668
|
-
|
|
668
|
+
H(d(Mt), {
|
|
669
669
|
id: "highlight-fill",
|
|
670
670
|
key: "highlight-fill-layer",
|
|
671
|
-
source: { type: "geojson", data:
|
|
671
|
+
source: { type: "geojson", data: We.value },
|
|
672
672
|
paint: et
|
|
673
673
|
}, null, 8, ["source"]),
|
|
674
|
-
|
|
674
|
+
H(d(dt), {
|
|
675
675
|
id: "highlight-lines",
|
|
676
676
|
key: "highlight-lines-layer",
|
|
677
|
-
source: { type: "geojson", data:
|
|
677
|
+
source: { type: "geojson", data: re.value },
|
|
678
678
|
paint: ut
|
|
679
679
|
}, null, 8, ["source"]),
|
|
680
|
-
|
|
680
|
+
H(d(Qt), {
|
|
681
681
|
"lng-lat": Lt.value,
|
|
682
682
|
color: "#2176d2"
|
|
683
683
|
}, null, 8, ["lng-lat"]),
|
|
684
|
-
|
|
684
|
+
Re.value && Ne.value ? (m(), q(d(Xt), {
|
|
685
685
|
key: 1,
|
|
686
|
-
"lng-lat":
|
|
686
|
+
"lng-lat": Ne.value,
|
|
687
687
|
html: Je.value,
|
|
688
688
|
"close-on-click": !1,
|
|
689
689
|
offset: [0, -15],
|
|
690
|
-
"show-navigation":
|
|
691
|
-
"current-feature-index":
|
|
692
|
-
"total-features":
|
|
693
|
-
"layer-name":
|
|
694
|
-
onClose:
|
|
695
|
-
onNext:
|
|
696
|
-
onPrevious:
|
|
690
|
+
"show-navigation": ce.value.length > 1,
|
|
691
|
+
"current-feature-index": ae.value,
|
|
692
|
+
"total-features": ce.value.length,
|
|
693
|
+
"layer-name": Re.value.layerTitle,
|
|
694
|
+
onClose: ie,
|
|
695
|
+
onNext: _e,
|
|
696
|
+
onPrevious: fe
|
|
697
697
|
}, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) : B("", !0)
|
|
698
698
|
]),
|
|
699
699
|
_: 1
|
|
700
700
|
}, 8, ["zoom", "center", "navigation-controls", "geolocation-control", "basemap-change-controls", "map-search-control", "cyclomedia-config", "cyclomedia-button-position", "pictometry-credentials", "pictometry-button-position"])
|
|
701
701
|
]));
|
|
702
702
|
}
|
|
703
|
-
}),
|
|
703
|
+
}), Te = (e, a) => {
|
|
704
704
|
const l = e.__vccOpts || e;
|
|
705
705
|
for (const [o, n] of a)
|
|
706
706
|
l[o] = n;
|
|
707
707
|
return l;
|
|
708
|
-
}, oo = /* @__PURE__ */
|
|
708
|
+
}, oo = /* @__PURE__ */ Te(to, [["__scopeId", "data-v-fb4efa11"]]);
|
|
709
709
|
function Dt(e) {
|
|
710
710
|
let a = e.split("?")[0] || e;
|
|
711
711
|
return a = a.replace(/\/query$/, ""), a = a.replace(/\/$/, ""), a.toLowerCase();
|
|
712
712
|
}
|
|
713
|
-
const ao = ["disabled"], io = /* @__PURE__ */
|
|
713
|
+
const ao = ["disabled"], io = /* @__PURE__ */ he({
|
|
714
714
|
inheritAttrs: !1,
|
|
715
715
|
__name: "PhlButton",
|
|
716
716
|
props: {
|
|
@@ -760,12 +760,12 @@ const ao = ["disabled"], io = /* @__PURE__ */ ge({
|
|
|
760
760
|
size: a.size
|
|
761
761
|
})
|
|
762
762
|
);
|
|
763
|
-
return (u, S) => l(a) ? (m(),
|
|
763
|
+
return (u, S) => l(a) ? (m(), q(d(Yt), pt({ key: 0 }, { ...n.value, ...u.$attrs }, { role: "button" }), {
|
|
764
764
|
default: Ke(() => [
|
|
765
|
-
|
|
765
|
+
H(d(Pt), St(Ct(r.value)), {
|
|
766
766
|
default: Ke(() => [
|
|
767
|
-
|
|
768
|
-
|
|
767
|
+
me(u.$slots, "default", {}, () => [
|
|
768
|
+
Pe(G(a.text), 1)
|
|
769
769
|
])
|
|
770
770
|
]),
|
|
771
771
|
_: 3
|
|
@@ -778,10 +778,10 @@ const ao = ["disabled"], io = /* @__PURE__ */ ge({
|
|
|
778
778
|
disabled: a.disabled,
|
|
779
779
|
class: o.value
|
|
780
780
|
}, u.$attrs), [
|
|
781
|
-
|
|
781
|
+
H(d(Pt), St(Ct(r.value)), {
|
|
782
782
|
default: Ke(() => [
|
|
783
|
-
|
|
784
|
-
|
|
783
|
+
me(u.$slots, "default", {}, () => [
|
|
784
|
+
Pe(G(a.text), 1)
|
|
785
785
|
])
|
|
786
786
|
]),
|
|
787
787
|
_: 3
|
|
@@ -804,7 +804,7 @@ const co = ["for"], uo = { class: "state-layer" }, fo = { class: "content" }, po
|
|
|
804
804
|
}, ho = {
|
|
805
805
|
key: 2,
|
|
806
806
|
class: "has-text-body-small phila-error-text"
|
|
807
|
-
}, go = /* @__PURE__ */
|
|
807
|
+
}, go = /* @__PURE__ */ he({
|
|
808
808
|
inheritAttrs: !1,
|
|
809
809
|
__name: "TextField",
|
|
810
810
|
props: {
|
|
@@ -840,19 +840,19 @@ const co = ["for"], uo = { class: "state-layer" }, fo = { class: "content" }, po
|
|
|
840
840
|
p.target.closest("button") || i.value?.focus();
|
|
841
841
|
};
|
|
842
842
|
return (p, L) => (m(), x("div", {
|
|
843
|
-
class:
|
|
843
|
+
class: se(["phila-input", $.value])
|
|
844
844
|
}, [
|
|
845
845
|
o.label ? (m(), x("label", {
|
|
846
846
|
key: 0,
|
|
847
847
|
for: r.value,
|
|
848
848
|
class: "has-text-label-small phila-label"
|
|
849
|
-
},
|
|
849
|
+
}, G(o.label), 9, co)) : B("", !0),
|
|
850
850
|
P("div", {
|
|
851
|
-
class:
|
|
851
|
+
class: se(["phila-text-field", g.value]),
|
|
852
852
|
onClick: b
|
|
853
853
|
}, [
|
|
854
854
|
P("div", uo, [
|
|
855
|
-
o.leadingIcon ? (m(),
|
|
855
|
+
o.leadingIcon ? (m(), q(d(Me), {
|
|
856
856
|
key: 0,
|
|
857
857
|
"icon-class": o.leadingIcon,
|
|
858
858
|
inline: "",
|
|
@@ -873,7 +873,7 @@ const co = ["for"], uo = { class: "state-layer" }, fo = { class: "content" }, po
|
|
|
873
873
|
])
|
|
874
874
|
])
|
|
875
875
|
]),
|
|
876
|
-
f.value != "" ? (m(),
|
|
876
|
+
f.value != "" ? (m(), q(d(io), {
|
|
877
877
|
key: 1,
|
|
878
878
|
variant: "standard",
|
|
879
879
|
size: "small",
|
|
@@ -881,25 +881,25 @@ const co = ["for"], uo = { class: "state-layer" }, fo = { class: "content" }, po
|
|
|
881
881
|
"icon-definition": d(so),
|
|
882
882
|
onClick: L[1] || (L[1] = (C) => f.value = "")
|
|
883
883
|
}, null, 8, ["icon-definition"])) : B("", !0),
|
|
884
|
-
o.trailingIcon ? (m(),
|
|
884
|
+
o.trailingIcon ? (m(), q(d(Me), {
|
|
885
885
|
key: 2,
|
|
886
886
|
size: "small",
|
|
887
887
|
"icon-class": o.trailingIcon,
|
|
888
888
|
inline: "",
|
|
889
889
|
decorative: ""
|
|
890
890
|
}, null, 8, ["icon-class"])) : B("", !0),
|
|
891
|
-
|
|
891
|
+
me(p.$slots, "trailing-action")
|
|
892
892
|
])
|
|
893
893
|
], 2),
|
|
894
|
-
o.supportingText ? (m(), x("div", mo,
|
|
894
|
+
o.supportingText ? (m(), x("div", mo, G(o.supportingText), 1)) : B("", !0),
|
|
895
895
|
n.value ? (m(), x("div", ho, [
|
|
896
|
-
|
|
896
|
+
H(d(Me), {
|
|
897
897
|
"icon-definition": d(no),
|
|
898
898
|
size: "small",
|
|
899
899
|
inline: "",
|
|
900
900
|
decorative: ""
|
|
901
901
|
}, null, 8, ["icon-definition"]),
|
|
902
|
-
|
|
902
|
+
Pe(" " + G(n.value), 1)
|
|
903
903
|
])) : B("", !0)
|
|
904
904
|
], 2));
|
|
905
905
|
}
|
|
@@ -936,7 +936,7 @@ const Co = {
|
|
|
936
936
|
}, ko = ["aria-label"], xo = {
|
|
937
937
|
key: 2,
|
|
938
938
|
class: "zoom-indicator"
|
|
939
|
-
}, $o = /* @__PURE__ */
|
|
939
|
+
}, $o = /* @__PURE__ */ he({
|
|
940
940
|
__name: "LayerStatusIndicators",
|
|
941
941
|
props: {
|
|
942
942
|
loading: { type: Boolean },
|
|
@@ -944,7 +944,7 @@ const Co = {
|
|
|
944
944
|
unavailable: { type: Boolean }
|
|
945
945
|
},
|
|
946
946
|
setup(e) {
|
|
947
|
-
return (a, l) => (m(), x(
|
|
947
|
+
return (a, l) => (m(), x(ue, null, [
|
|
948
948
|
e.loading && !e.unavailable ? (m(), x("span", Co, " Loading... ")) : B("", !0),
|
|
949
949
|
e.error ? (m(), x("span", {
|
|
950
950
|
key: 1,
|
|
@@ -955,7 +955,7 @@ const Co = {
|
|
|
955
955
|
e.unavailable ? (m(), x("span", xo, " (zoom in) ")) : B("", !0)
|
|
956
956
|
], 64));
|
|
957
957
|
}
|
|
958
|
-
}), at = /* @__PURE__ */
|
|
958
|
+
}), at = /* @__PURE__ */ Te($o, [["__scopeId", "data-v-19b1b402"]]), Mo = { class: "opacity-control" }, Po = ["for"], To = ["id", "value", "aria-label"], Fo = /* @__PURE__ */ he({
|
|
959
959
|
__name: "LayerOpacitySlider",
|
|
960
960
|
props: {
|
|
961
961
|
layerId: {},
|
|
@@ -973,7 +973,7 @@ const Co = {
|
|
|
973
973
|
P("label", {
|
|
974
974
|
class: "opacity-label",
|
|
975
975
|
for: "opacity-" + e.layerId
|
|
976
|
-
}, " Opacity: " +
|
|
976
|
+
}, " Opacity: " + G(Math.round(e.opacity * 100)) + "% ", 9, Po),
|
|
977
977
|
P("input", {
|
|
978
978
|
id: "opacity-" + e.layerId,
|
|
979
979
|
type: "range",
|
|
@@ -987,7 +987,7 @@ const Co = {
|
|
|
987
987
|
}, null, 40, To)
|
|
988
988
|
]));
|
|
989
989
|
}
|
|
990
|
-
}), ht = /* @__PURE__ */
|
|
990
|
+
}), ht = /* @__PURE__ */ Te(Fo, [["__scopeId", "data-v-1a025f6a"]]), Eo = ["aria-label"], Io = { class: "legend-label" }, Oo = /* @__PURE__ */ he({
|
|
991
991
|
__name: "LayerLegend",
|
|
992
992
|
props: {
|
|
993
993
|
items: {},
|
|
@@ -998,19 +998,19 @@ const Co = {
|
|
|
998
998
|
class: "layer-legend",
|
|
999
999
|
"aria-label": e.label
|
|
1000
1000
|
}, [
|
|
1001
|
-
(m(!0), x(
|
|
1001
|
+
(m(!0), x(ue, null, be(e.items, (o, n) => (m(), x("li", {
|
|
1002
1002
|
key: n,
|
|
1003
1003
|
class: "legend-item"
|
|
1004
1004
|
}, [
|
|
1005
1005
|
o.type === "circle" ? (m(), x("span", {
|
|
1006
1006
|
key: 0,
|
|
1007
1007
|
class: "legend-symbol legend-circle",
|
|
1008
|
-
style:
|
|
1008
|
+
style: ye({ backgroundColor: o.color }),
|
|
1009
1009
|
"aria-hidden": "true"
|
|
1010
1010
|
}, null, 4)) : o.type === "line" ? (m(), x("span", {
|
|
1011
1011
|
key: 1,
|
|
1012
1012
|
class: "legend-symbol legend-line",
|
|
1013
|
-
style:
|
|
1013
|
+
style: ye({
|
|
1014
1014
|
backgroundColor: o.color,
|
|
1015
1015
|
height: `${o.width || 2}px`
|
|
1016
1016
|
}),
|
|
@@ -1018,14 +1018,14 @@ const Co = {
|
|
|
1018
1018
|
}, null, 4)) : o.type === "fill" ? (m(), x("span", {
|
|
1019
1019
|
key: 2,
|
|
1020
1020
|
class: "legend-symbol legend-fill",
|
|
1021
|
-
style:
|
|
1021
|
+
style: ye({ backgroundColor: o.color }),
|
|
1022
1022
|
"aria-hidden": "true"
|
|
1023
1023
|
}, null, 4)) : B("", !0),
|
|
1024
|
-
P("span", Io,
|
|
1024
|
+
P("span", Io, G(o.label), 1)
|
|
1025
1025
|
]))), 128))
|
|
1026
1026
|
], 8, Eo));
|
|
1027
1027
|
}
|
|
1028
|
-
}), gt = /* @__PURE__ */
|
|
1028
|
+
}), gt = /* @__PURE__ */ Te(Oo, [["__scopeId", "data-v-62e210e3"]]);
|
|
1029
1029
|
function vt(e) {
|
|
1030
1030
|
function a(u) {
|
|
1031
1031
|
return e().visibleLayerIds.has(u);
|
|
@@ -1057,7 +1057,7 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1057
1057
|
}, Vo = ["checked", "disabled", "onChange"], Zo = { class: "layer-title" }, No = {
|
|
1058
1058
|
key: 0,
|
|
1059
1059
|
class: "no-results"
|
|
1060
|
-
}, Uo = /* @__PURE__ */
|
|
1060
|
+
}, Uo = /* @__PURE__ */ he({
|
|
1061
1061
|
__name: "LayerPanel",
|
|
1062
1062
|
props: {
|
|
1063
1063
|
layerList: {},
|
|
@@ -1101,14 +1101,14 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
return (p, L) => (m(), x("div", zo, [
|
|
1103
1103
|
e.showSearch ? (m(), x("div", Do, [
|
|
1104
|
-
|
|
1104
|
+
H(d(go), {
|
|
1105
1105
|
modelValue: i.value,
|
|
1106
1106
|
"onUpdate:modelValue": L[0] || (L[0] = (C) => i.value = C),
|
|
1107
1107
|
placeholder: e.searchPlaceholder,
|
|
1108
1108
|
"class-name": "layer-search-field"
|
|
1109
1109
|
}, {
|
|
1110
1110
|
"trailing-action": Ke(() => [
|
|
1111
|
-
|
|
1111
|
+
H(d(Me), {
|
|
1112
1112
|
"icon-definition": d(vo),
|
|
1113
1113
|
size: "small",
|
|
1114
1114
|
inline: "",
|
|
@@ -1119,14 +1119,14 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1119
1119
|
}, 8, ["modelValue", "placeholder"])
|
|
1120
1120
|
])) : B("", !0),
|
|
1121
1121
|
e.mode === "topics" ? (m(), x("div", _o, [
|
|
1122
|
-
|
|
1122
|
+
me(p.$slots, "topics", {}, () => [
|
|
1123
1123
|
L[2] || (L[2] = P("div", { class: "no-topics" }, ' No topic components provided. Use the "topics" slot to add TopicAccordion components. ', -1))
|
|
1124
1124
|
], !0)
|
|
1125
1125
|
])) : (m(), x("div", {
|
|
1126
1126
|
key: 2,
|
|
1127
|
-
class:
|
|
1127
|
+
class: se(["layer-list", { "has-metadata": u.value }])
|
|
1128
1128
|
}, [
|
|
1129
|
-
(m(!0), x(
|
|
1129
|
+
(m(!0), x(ue, null, be(n.value, (C) => (m(), x("div", {
|
|
1130
1130
|
key: C.config.id,
|
|
1131
1131
|
class: "layer-item"
|
|
1132
1132
|
}, [
|
|
@@ -1141,7 +1141,7 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1141
1141
|
onClick: L[1] || (L[1] = jt(() => {
|
|
1142
1142
|
}, ["stop"]))
|
|
1143
1143
|
}, [
|
|
1144
|
-
|
|
1144
|
+
H(d(Me), {
|
|
1145
1145
|
"icon-definition": d(So),
|
|
1146
1146
|
size: "small",
|
|
1147
1147
|
inline: "",
|
|
@@ -1149,7 +1149,7 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1149
1149
|
}, null, 8, ["icon-definition"])
|
|
1150
1150
|
], 8, Bo)) : u.value ? (m(), x("span", Ao)) : B("", !0),
|
|
1151
1151
|
P("label", {
|
|
1152
|
-
class:
|
|
1152
|
+
class: se(["layer-checkbox", {
|
|
1153
1153
|
"layer-unavailable": !d(v)(C.config),
|
|
1154
1154
|
"layer-error": d(g)(C.config.id)
|
|
1155
1155
|
}])
|
|
@@ -1161,8 +1161,8 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1161
1161
|
onChange: (T) => b(C.config.id)
|
|
1162
1162
|
}, null, 40, Vo),
|
|
1163
1163
|
P("span", Zo, [
|
|
1164
|
-
|
|
1165
|
-
|
|
1164
|
+
Pe(G(C.config.title) + " ", 1),
|
|
1165
|
+
H(at, {
|
|
1166
1166
|
loading: d($)(C.config.id),
|
|
1167
1167
|
error: d(g)(C.config.id),
|
|
1168
1168
|
unavailable: !d(v)(C.config)
|
|
@@ -1170,24 +1170,24 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1170
1170
|
])
|
|
1171
1171
|
], 2)
|
|
1172
1172
|
]),
|
|
1173
|
-
e.showOpacity && d(S)(C.config.id) && d(v)(C.config) ? (m(),
|
|
1173
|
+
e.showOpacity && d(S)(C.config.id) && d(v)(C.config) ? (m(), q(ht, {
|
|
1174
1174
|
key: 0,
|
|
1175
1175
|
"layer-id": C.config.id,
|
|
1176
1176
|
"layer-name": C.config.title,
|
|
1177
1177
|
opacity: d(f)(C.config.id),
|
|
1178
1178
|
"onUpdate:opacity": (T) => o("setOpacity", C.config.id, T)
|
|
1179
1179
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : B("", !0),
|
|
1180
|
-
e.showLegend && d(S)(C.config.id) && d(v)(C.config) && C.config.legend?.length ? (m(),
|
|
1180
|
+
e.showLegend && d(S)(C.config.id) && d(v)(C.config) && C.config.legend?.length ? (m(), q(gt, {
|
|
1181
1181
|
key: 1,
|
|
1182
1182
|
items: C.config.legend,
|
|
1183
1183
|
label: "Legend for " + C.config.title
|
|
1184
1184
|
}, null, 8, ["items", "label"])) : B("", !0)
|
|
1185
1185
|
]))), 128)),
|
|
1186
|
-
n.value.length === 0 ? (m(), x("div", No, 'No layers match "' +
|
|
1186
|
+
n.value.length === 0 ? (m(), x("div", No, 'No layers match "' + G(e.searchQuery) + '"', 1)) : B("", !0)
|
|
1187
1187
|
], 2))
|
|
1188
1188
|
]));
|
|
1189
1189
|
}
|
|
1190
|
-
}), Wo = /* @__PURE__ */
|
|
1190
|
+
}), Wo = /* @__PURE__ */ Te(Uo, [["__scopeId", "data-v-e48bb978"]]), jo = {
|
|
1191
1191
|
esriSLSSolid: null,
|
|
1192
1192
|
esriSLSDash: [4, 3],
|
|
1193
1193
|
esriSLSDot: [1, 3],
|
|
@@ -1240,7 +1240,7 @@ function nt(e) {
|
|
|
1240
1240
|
return "fill";
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function Oe(e) {
|
|
1244
1244
|
return !(!e || e.style === "esriSLSNull" || e.color === null || e.width === 0 || e.color && e.color[3] === 0);
|
|
1245
1245
|
}
|
|
1246
1246
|
function ft(e) {
|
|
@@ -1254,7 +1254,7 @@ function _t(e, a, l) {
|
|
|
1254
1254
|
if (r = {
|
|
1255
1255
|
"fill-color": $,
|
|
1256
1256
|
"fill-opacity": g
|
|
1257
|
-
},
|
|
1257
|
+
}, Oe(o.outline)) {
|
|
1258
1258
|
const v = o.outline.width || 1;
|
|
1259
1259
|
S = {
|
|
1260
1260
|
"line-color": z(o.outline.color),
|
|
@@ -1289,7 +1289,7 @@ function _t(e, a, l) {
|
|
|
1289
1289
|
"circle-color": z(o.color),
|
|
1290
1290
|
"circle-radius": f,
|
|
1291
1291
|
"circle-opacity": we(a)
|
|
1292
|
-
},
|
|
1292
|
+
}, Oe(o.outline) && (r["circle-stroke-color"] = z(o.outline.color), r["circle-stroke-width"] = o.outline.width || 1), u = [
|
|
1293
1293
|
{
|
|
1294
1294
|
type: "circle",
|
|
1295
1295
|
color: z(o.color),
|
|
@@ -1321,7 +1321,7 @@ function Ho(e, a, l) {
|
|
|
1321
1321
|
if (v.push(r ? z(r.color) : "rgba(0, 0, 0, 0)"), f = {
|
|
1322
1322
|
"fill-color": v,
|
|
1323
1323
|
"fill-opacity": we(a)
|
|
1324
|
-
},
|
|
1324
|
+
}, Oe(u?.outline)) {
|
|
1325
1325
|
const i = Math.max(u.outline.width || 1, 1);
|
|
1326
1326
|
g = {
|
|
1327
1327
|
"line-color": z(u.outline.color),
|
|
@@ -1367,7 +1367,7 @@ function Ho(e, a, l) {
|
|
|
1367
1367
|
"circle-color": v,
|
|
1368
1368
|
"circle-radius": i,
|
|
1369
1369
|
"circle-opacity": we(a)
|
|
1370
|
-
},
|
|
1370
|
+
}, Oe(u?.outline) && (f["circle-stroke-color"] = z(u.outline.color), f["circle-stroke-width"] = u.outline.width || 1);
|
|
1371
1371
|
}
|
|
1372
1372
|
return { paint: f, legend: $, geomType: S, outlinePaint: g };
|
|
1373
1373
|
}
|
|
@@ -1395,7 +1395,7 @@ function Jo(e, a) {
|
|
|
1395
1395
|
if (S = {
|
|
1396
1396
|
"fill-color": g,
|
|
1397
1397
|
"fill-opacity": we(a)
|
|
1398
|
-
},
|
|
1398
|
+
}, Oe(r?.outline)) {
|
|
1399
1399
|
const v = r.outline.width || 1;
|
|
1400
1400
|
$ = {
|
|
1401
1401
|
"line-color": z(r.outline.color),
|
|
@@ -1406,38 +1406,39 @@ function Jo(e, a) {
|
|
|
1406
1406
|
const g = o.map((T) => T.symbol?.style || "esriSLSSolid"), v = [...new Set(g)];
|
|
1407
1407
|
if (v.length > 1) {
|
|
1408
1408
|
const T = [];
|
|
1409
|
-
let _ = g[0],
|
|
1409
|
+
let _ = g[0], J = [o[0]], I = 0;
|
|
1410
1410
|
for (let R = 1; R < o.length; R++)
|
|
1411
|
-
g[R] === _ ?
|
|
1412
|
-
T.push({ style: _, breaks:
|
|
1411
|
+
g[R] === _ ? J.push(o[R]) : (T.push({ style: _, breaks: J, startIndex: I }), _ = g[R], J = [o[R]], I = R);
|
|
1412
|
+
T.push({ style: _, breaks: J, startIndex: I });
|
|
1413
1413
|
const F = [];
|
|
1414
1414
|
let O = e.minValue ?? 0;
|
|
1415
1415
|
for (let R = 0; R < T.length; R++) {
|
|
1416
|
-
const
|
|
1417
|
-
let
|
|
1418
|
-
|
|
1419
|
-
|
|
1416
|
+
const ne = T[R], K = ne.breaks, Ve = it(ne.style), Le = R === 0 ? null : T[R - 1].breaks[T[R - 1].breaks.length - 1].classMaxValue, ze = K[K.length - 1].classMaxValue;
|
|
1417
|
+
let Fe;
|
|
1418
|
+
const Se = !!e.defaultSymbol;
|
|
1419
|
+
Le === null ? Fe = `${!Se && e.minValue != null ? `${l} >= ${e.minValue} AND ` : ""}${l} <= ${ze}` : R === T.length - 1 && Se ? Fe = `${l} > ${Le}` : Fe = `${l} > ${Le} AND ${l} <= ${ze}`;
|
|
1420
|
+
const ge = {
|
|
1420
1421
|
"line-opacity": we(a)
|
|
1421
1422
|
};
|
|
1422
|
-
if (
|
|
1423
|
-
|
|
1423
|
+
if (Ve && (ge["line-dasharray"] = Ve), K.length === 1)
|
|
1424
|
+
ge["line-color"] = z(K[0].symbol?.color), ge["line-width"] = K[0].symbol?.width || 2;
|
|
1424
1425
|
else {
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1427
|
-
for (let
|
|
1428
|
-
|
|
1429
|
-
|
|
1426
|
+
const W = ["step", ["get", l]], de = ["step", ["get", l]];
|
|
1427
|
+
W.push(z(K[0].symbol?.color)), de.push(K[0].symbol?.width || 2);
|
|
1428
|
+
for (let te = 1; te < K.length; te++)
|
|
1429
|
+
W.push(K[te - 1].classMaxValue), W.push(z(K[te].symbol?.color)), de.push(K[te - 1].classMaxValue), de.push(K[te].symbol?.width || 2);
|
|
1430
|
+
ge["line-color"] = W, ge["line-width"] = de;
|
|
1430
1431
|
}
|
|
1431
|
-
const
|
|
1432
|
-
for (const
|
|
1433
|
-
|
|
1432
|
+
const Ze = [];
|
|
1433
|
+
for (const W of K)
|
|
1434
|
+
Ze.push({
|
|
1434
1435
|
type: "line",
|
|
1435
|
-
color: z(
|
|
1436
|
-
width:
|
|
1437
|
-
label:
|
|
1438
|
-
}), O =
|
|
1439
|
-
const
|
|
1440
|
-
F.push({ suffix:
|
|
1436
|
+
color: z(W.symbol?.color),
|
|
1437
|
+
width: W.symbol?.width || 2,
|
|
1438
|
+
label: W.label || `${O} - ${W.classMaxValue}`
|
|
1439
|
+
}), O = W.classMaxValue + 1;
|
|
1440
|
+
const Ee = R === 0 ? "" : `-${ne.style.replace("esriSLS", "").toLowerCase()}`;
|
|
1441
|
+
F.push({ suffix: Ee, where: Fe, paint: ge, legend: Ze });
|
|
1441
1442
|
}
|
|
1442
1443
|
return { paint: {}, legend: [], geomType: u, outlinePaint: $, splitLayers: F };
|
|
1443
1444
|
}
|
|
@@ -1490,7 +1491,7 @@ function Ko(e, a, l, o) {
|
|
|
1490
1491
|
// Otherwise use the interpolated color
|
|
1491
1492
|
],
|
|
1492
1493
|
"fill-opacity": we(o)
|
|
1493
|
-
},
|
|
1494
|
+
}, Oe(r?.outline)) {
|
|
1494
1495
|
const i = r.outline.width || 1;
|
|
1495
1496
|
$ = {
|
|
1496
1497
|
"line-color": z(r.outline.color),
|
|
@@ -1577,11 +1578,11 @@ async function Rt(e) {
|
|
|
1577
1578
|
if ((S || f) && n.url) {
|
|
1578
1579
|
const F = await aa(n.url);
|
|
1579
1580
|
if (F) {
|
|
1580
|
-
if (r = F.drawingInfo, $ &&
|
|
1581
|
+
if (r = F.drawingInfo, $ && Oe($) && r?.renderer) {
|
|
1581
1582
|
const O = r.renderer, R = O.uniqueValueInfos?.[0]?.symbol?.outline || O.defaultSymbol?.outline;
|
|
1582
|
-
if (!
|
|
1583
|
-
for (const
|
|
1584
|
-
|
|
1583
|
+
if (!Oe(R)) {
|
|
1584
|
+
for (const ne of O.uniqueValueInfos || [])
|
|
1585
|
+
ne.symbol && (ne.symbol.outline = $);
|
|
1585
1586
|
O.defaultSymbol && (O.defaultSymbol.outline = $);
|
|
1586
1587
|
}
|
|
1587
1588
|
}
|
|
@@ -1593,12 +1594,12 @@ async function Rt(e) {
|
|
|
1593
1594
|
n.opacity,
|
|
1594
1595
|
u,
|
|
1595
1596
|
n.title
|
|
1596
|
-
), L = Xo(n.popupInfo), C = Yo(n.layerDefinition), T = Go(n.layerDefinition?.minScale, n.layerDefinition?.maxScale), _ = ea(n.title),
|
|
1597
|
+
), L = Xo(n.popupInfo), C = Yo(n.layerDefinition), T = Go(n.layerDefinition?.minScale, n.layerDefinition?.maxScale), _ = ea(n.title), J = ta(n.title), I = n.opacity ?? 1;
|
|
1597
1598
|
if (p && p.length > 0)
|
|
1598
1599
|
for (const F of p) {
|
|
1599
1600
|
const O = C ? `(${C}) AND (${F.where})` : F.where, R = {
|
|
1600
1601
|
id: `${_}${F.suffix}`,
|
|
1601
|
-
title:
|
|
1602
|
+
title: J,
|
|
1602
1603
|
type: i,
|
|
1603
1604
|
url: n.url,
|
|
1604
1605
|
opacity: I,
|
|
@@ -1611,7 +1612,7 @@ async function Rt(e) {
|
|
|
1611
1612
|
else {
|
|
1612
1613
|
const F = {
|
|
1613
1614
|
id: _,
|
|
1614
|
-
title:
|
|
1615
|
+
title: J,
|
|
1615
1616
|
type: i,
|
|
1616
1617
|
url: n.url,
|
|
1617
1618
|
opacity: I,
|
|
@@ -1742,7 +1743,7 @@ function sa(e) {
|
|
|
1742
1743
|
const C = `${i.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, T = await fetch(C, i.options);
|
|
1743
1744
|
if (!T.ok)
|
|
1744
1745
|
throw new Error(`HTTP ${T.status}: ${T.statusText}`);
|
|
1745
|
-
p = (await T.json()).features?.map((
|
|
1746
|
+
p = (await T.json()).features?.map((J) => J.attributes) || [];
|
|
1746
1747
|
} else
|
|
1747
1748
|
throw new Error(`Unknown data source type: ${i.type}`);
|
|
1748
1749
|
i.transform && (p = i.transform(p)), a.value = {
|
|
@@ -1804,7 +1805,7 @@ function sa(e) {
|
|
|
1804
1805
|
v();
|
|
1805
1806
|
}), {
|
|
1806
1807
|
/** Reactive state for all data sources */
|
|
1807
|
-
state:
|
|
1808
|
+
state: j(a),
|
|
1808
1809
|
/** Whether any data source is currently loading */
|
|
1809
1810
|
isLoading: S,
|
|
1810
1811
|
/** Fetch all data sources */
|
|
@@ -1836,7 +1837,7 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
1836
1837
|
}, ha = ["aria-expanded", "aria-label"], ga = { key: 0 }, va = { key: 1 }, ba = {
|
|
1837
1838
|
class: "sr-only",
|
|
1838
1839
|
"aria-live": "polite"
|
|
1839
|
-
}, wa = /* @__PURE__ */
|
|
1840
|
+
}, wa = /* @__PURE__ */ he({
|
|
1840
1841
|
__name: "Layerboard",
|
|
1841
1842
|
props: {
|
|
1842
1843
|
title: {},
|
|
@@ -1876,56 +1877,56 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
1876
1877
|
function _(y) {
|
|
1877
1878
|
L.value.has(y) ? L.value.delete(y) : L.value.add(y), L.value = new Set(L.value);
|
|
1878
1879
|
}
|
|
1879
|
-
function
|
|
1880
|
+
function J(y, M) {
|
|
1880
1881
|
M ? L.value.add(y) : L.value.delete(y), L.value = new Set(L.value);
|
|
1881
1882
|
}
|
|
1882
1883
|
function I(y, M) {
|
|
1883
1884
|
C.value = { ...C.value, [y]: M };
|
|
1884
1885
|
}
|
|
1885
1886
|
const F = o.dataSources.length > 0 ? sa(o.dataSources) : null, O = D(() => F?.state.value ?? {}), R = D(() => F?.isLoading.value ?? !1);
|
|
1886
|
-
function
|
|
1887
|
+
function ne(y) {
|
|
1887
1888
|
return F?.getData(y) ?? null;
|
|
1888
1889
|
}
|
|
1889
|
-
function
|
|
1890
|
+
function K(y) {
|
|
1890
1891
|
return F?.refetch(y) ?? Promise.resolve();
|
|
1891
1892
|
}
|
|
1892
|
-
Z("layerboard-layers",
|
|
1893
|
-
const
|
|
1893
|
+
Z("layerboard-layers", j(r)), Z("layerboard-visible", g), Z("layerboard-opacities", v), Z("layerboard-loading", j(i)), Z("layerboard-errors", j(b)), Z("layerboard-zoom", j(f)), Z("layerboard-toggle-layer", Ee), Z("layerboard-set-layer-visible", W), Z("layerboard-set-layers-visible", de), Z("layerboard-set-opacity", te), Z("layerboard-tiled-layers", j(D(() => o.tiledLayers))), Z("layerboard-visible-tiled", L), Z("layerboard-tiled-opacities", C), Z("layerboard-toggle-tiled", _), Z("layerboard-set-tiled-opacity", I), Z("layerboard-set-tiled-visible", J), Z("layerboard-data-sources-state", O), Z("layerboard-data-sources-loading", R), Z("layerboard-get-data-source", ne), Z("layerboard-refetch-data-source", K);
|
|
1894
|
+
const Ve = D(() => ({
|
|
1894
1895
|
backgroundColor: o.themeColor
|
|
1895
1896
|
})), Le = D(() => ({
|
|
1896
1897
|
backgroundColor: o.themeColor
|
|
1897
|
-
})),
|
|
1898
|
+
})), ze = D(() => ({
|
|
1898
1899
|
backgroundColor: o.themeColor
|
|
1899
|
-
})),
|
|
1900
|
-
width:
|
|
1900
|
+
})), Fe = D(() => ({
|
|
1901
|
+
width: fe.value ? "0" : o.sidebarWidth
|
|
1901
1902
|
}));
|
|
1902
|
-
async function
|
|
1903
|
+
async function Se() {
|
|
1903
1904
|
try {
|
|
1904
1905
|
u.value = !0, S.value = null;
|
|
1905
1906
|
const M = (await mt(o.webMapId)).map((N) => {
|
|
1906
|
-
let
|
|
1907
|
-
const
|
|
1908
|
-
|
|
1909
|
-
...
|
|
1910
|
-
paint:
|
|
1911
|
-
outlinePaint:
|
|
1912
|
-
legend:
|
|
1913
|
-
type:
|
|
1907
|
+
let X = N;
|
|
1908
|
+
const $e = o.layerStyleOverrides[N.id];
|
|
1909
|
+
$e && (X = {
|
|
1910
|
+
...X,
|
|
1911
|
+
paint: $e.paint ?? X.paint,
|
|
1912
|
+
outlinePaint: $e.outlinePaint ?? X.outlinePaint,
|
|
1913
|
+
legend: $e.legend ?? X.legend,
|
|
1914
|
+
type: $e.type ?? X.type
|
|
1914
1915
|
});
|
|
1915
|
-
const
|
|
1916
|
-
return
|
|
1917
|
-
...
|
|
1918
|
-
popup: { ...
|
|
1919
|
-
}),
|
|
1916
|
+
const je = o.popupOverrides[N.id];
|
|
1917
|
+
return je && X.popup && (X = {
|
|
1918
|
+
...X,
|
|
1919
|
+
popup: { ...X.popup, ...je }
|
|
1920
|
+
}), X;
|
|
1920
1921
|
});
|
|
1921
1922
|
r.value = M.map((N) => ({
|
|
1922
1923
|
config: N,
|
|
1923
1924
|
component: N.type
|
|
1924
1925
|
}));
|
|
1925
|
-
const
|
|
1926
|
+
const Q = {};
|
|
1926
1927
|
M.forEach((N) => {
|
|
1927
|
-
|
|
1928
|
-
}), v.value =
|
|
1928
|
+
Q[N.id] = N.opacity ?? 1;
|
|
1929
|
+
}), v.value = Q, n("configs-loaded", M);
|
|
1929
1930
|
} catch (y) {
|
|
1930
1931
|
const M = y instanceof Error ? y.message : "Failed to load layer configurations";
|
|
1931
1932
|
S.value = M, n("load-error", M);
|
|
@@ -1933,92 +1934,92 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
1933
1934
|
u.value = !1;
|
|
1934
1935
|
}
|
|
1935
1936
|
}
|
|
1936
|
-
async function
|
|
1937
|
+
async function ge() {
|
|
1937
1938
|
if (o.fetchMetadata)
|
|
1938
1939
|
try {
|
|
1939
1940
|
const y = "https://phl.carto.com/api/v2/sql?q=" + encodeURIComponent(
|
|
1940
1941
|
"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"
|
|
1941
1942
|
), M = await fetch(y);
|
|
1942
1943
|
if (!M.ok) return;
|
|
1943
|
-
const
|
|
1944
|
-
for (const
|
|
1945
|
-
if (
|
|
1946
|
-
const
|
|
1947
|
-
N[
|
|
1944
|
+
const Q = await M.json(), N = {};
|
|
1945
|
+
for (const X of Q.rows || [])
|
|
1946
|
+
if (X.url_text && X.representation) {
|
|
1947
|
+
const $e = Dt(X.url_text), je = `https://metadata.phila.gov/#home/representationdetails/${X.representation}/`;
|
|
1948
|
+
N[$e] = je;
|
|
1948
1949
|
}
|
|
1949
1950
|
p.value = N;
|
|
1950
1951
|
} catch {
|
|
1951
1952
|
}
|
|
1952
1953
|
}
|
|
1953
|
-
function
|
|
1954
|
+
function Ze(y) {
|
|
1954
1955
|
f.value = y, n("zoom", y);
|
|
1955
1956
|
}
|
|
1956
|
-
function
|
|
1957
|
+
function Ee(y) {
|
|
1957
1958
|
g.value.has(y) ? g.value.delete(y) : g.value.add(y), g.value = new Set(g.value);
|
|
1958
1959
|
}
|
|
1959
|
-
function
|
|
1960
|
+
function W(y, M) {
|
|
1960
1961
|
M ? g.value.add(y) : g.value.delete(y), g.value = new Set(g.value);
|
|
1961
1962
|
}
|
|
1962
|
-
function
|
|
1963
|
-
for (const
|
|
1964
|
-
M ? g.value.add(
|
|
1963
|
+
function de(y, M) {
|
|
1964
|
+
for (const Q of y)
|
|
1965
|
+
M ? g.value.add(Q) : g.value.delete(Q);
|
|
1965
1966
|
g.value = new Set(g.value);
|
|
1966
1967
|
}
|
|
1967
|
-
function
|
|
1968
|
+
function te(y, M) {
|
|
1968
1969
|
v.value = { ...v.value, [y]: M };
|
|
1969
1970
|
}
|
|
1970
1971
|
function rt(y, M) {
|
|
1971
1972
|
M ? i.value.add(y) : i.value.delete(y), i.value = new Set(i.value);
|
|
1972
1973
|
}
|
|
1973
|
-
function
|
|
1974
|
+
function ce(y, M) {
|
|
1974
1975
|
if (M)
|
|
1975
1976
|
b.value = { ...b.value, [y]: M };
|
|
1976
1977
|
else {
|
|
1977
|
-
const
|
|
1978
|
-
delete
|
|
1978
|
+
const Q = { ...b.value };
|
|
1979
|
+
delete Q[y], b.value = Q;
|
|
1979
1980
|
}
|
|
1980
1981
|
}
|
|
1981
|
-
function
|
|
1982
|
+
function Ne(y) {
|
|
1982
1983
|
$.value = y;
|
|
1983
1984
|
}
|
|
1984
|
-
const
|
|
1985
|
-
function
|
|
1986
|
-
|
|
1987
|
-
|
|
1985
|
+
const ae = w(null), De = w(null), st = w(null), Ce = w(null), Ge = w(null), He = w(null), Xe = w(null), ke = w("map");
|
|
1986
|
+
function Ue() {
|
|
1987
|
+
ke.value = ke.value === "sidebar" ? "map" : "sidebar", qe(() => {
|
|
1988
|
+
ke.value === "sidebar" && ae.value?.focus();
|
|
1988
1989
|
});
|
|
1989
1990
|
}
|
|
1990
|
-
const
|
|
1991
|
+
const ie = w(!1);
|
|
1991
1992
|
function Ye() {
|
|
1992
|
-
|
|
1993
|
-
|
|
1993
|
+
ie.value = !ie.value, ie.value && qe(() => {
|
|
1994
|
+
Ce.value?.focus();
|
|
1994
1995
|
});
|
|
1995
1996
|
}
|
|
1996
|
-
function
|
|
1997
|
-
|
|
1998
|
-
|
|
1997
|
+
function _e() {
|
|
1998
|
+
ie.value = !1, qe(() => {
|
|
1999
|
+
De.value?.focus();
|
|
1999
2000
|
});
|
|
2000
2001
|
}
|
|
2001
|
-
const
|
|
2002
|
-
function
|
|
2003
|
-
|
|
2002
|
+
const fe = w(!1);
|
|
2003
|
+
function Re() {
|
|
2004
|
+
fe.value = !fe.value;
|
|
2004
2005
|
}
|
|
2005
2006
|
const ve = w(!1), Je = w(null);
|
|
2006
|
-
function
|
|
2007
|
-
Je.value = document.activeElement, ve.value = !0,
|
|
2007
|
+
function xe() {
|
|
2008
|
+
Je.value = document.activeElement, ve.value = !0, qe(() => {
|
|
2008
2009
|
Xe.value?.focus();
|
|
2009
2010
|
});
|
|
2010
2011
|
}
|
|
2011
|
-
function
|
|
2012
|
-
ve.value = !1,
|
|
2012
|
+
function re() {
|
|
2013
|
+
ve.value = !1, qe(() => {
|
|
2013
2014
|
Je.value?.focus(), Je.value = null;
|
|
2014
2015
|
});
|
|
2015
2016
|
}
|
|
2016
|
-
function
|
|
2017
|
-
y.target.classList.contains("layerboard-modal-backdrop") &&
|
|
2017
|
+
function We(y) {
|
|
2018
|
+
y.target.classList.contains("layerboard-modal-backdrop") && re();
|
|
2018
2019
|
}
|
|
2019
2020
|
function ct(y) {
|
|
2020
2021
|
if (y.key === "Escape") {
|
|
2021
|
-
|
|
2022
|
+
_e();
|
|
2022
2023
|
return;
|
|
2023
2024
|
}
|
|
2024
2025
|
if (y.key === "Tab" && Ge.value) {
|
|
@@ -2028,13 +2029,13 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2028
2029
|
)
|
|
2029
2030
|
);
|
|
2030
2031
|
if (M.length === 0) return;
|
|
2031
|
-
const
|
|
2032
|
-
y.shiftKey ? document.activeElement ===
|
|
2032
|
+
const Q = M[0], N = M[M.length - 1];
|
|
2033
|
+
y.shiftKey ? document.activeElement === Q && (y.preventDefault(), N.focus()) : document.activeElement === N && (y.preventDefault(), Q.focus());
|
|
2033
2034
|
}
|
|
2034
2035
|
}
|
|
2035
2036
|
function ut(y) {
|
|
2036
2037
|
if (y.key === "Escape") {
|
|
2037
|
-
|
|
2038
|
+
re();
|
|
2038
2039
|
return;
|
|
2039
2040
|
}
|
|
2040
2041
|
if (y.key === "Tab" && He.value) {
|
|
@@ -2044,11 +2045,11 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2044
2045
|
)
|
|
2045
2046
|
);
|
|
2046
2047
|
if (M.length === 0) return;
|
|
2047
|
-
const
|
|
2048
|
-
y.shiftKey ? document.activeElement ===
|
|
2048
|
+
const Q = M[0], N = M[M.length - 1];
|
|
2049
|
+
y.shiftKey ? document.activeElement === Q && (y.preventDefault(), N.focus()) : document.activeElement === N && (y.preventDefault(), Q.focus());
|
|
2049
2050
|
}
|
|
2050
2051
|
}
|
|
2051
|
-
Z("layerboard-open-modal",
|
|
2052
|
+
Z("layerboard-open-modal", xe), Z("layerboard-close-modal", re), Z("layerboard-is-modal-open", j(ve)), a({
|
|
2052
2053
|
/** Layer configurations */
|
|
2053
2054
|
layerList: r,
|
|
2054
2055
|
/** Set of visible layer IDs */
|
|
@@ -2062,15 +2063,15 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2062
2063
|
/** Current map zoom level */
|
|
2063
2064
|
currentZoom: f,
|
|
2064
2065
|
/** Toggle a layer's visibility */
|
|
2065
|
-
toggleLayer:
|
|
2066
|
+
toggleLayer: Ee,
|
|
2066
2067
|
/** Set a layer's visibility explicitly */
|
|
2067
|
-
setLayerVisible:
|
|
2068
|
+
setLayerVisible: W,
|
|
2068
2069
|
/** Set multiple layers' visibility at once */
|
|
2069
|
-
setLayersVisible:
|
|
2070
|
+
setLayersVisible: de,
|
|
2070
2071
|
/** Set a layer's opacity */
|
|
2071
|
-
setLayerOpacity:
|
|
2072
|
+
setLayerOpacity: te,
|
|
2072
2073
|
/** Reload layer configurations */
|
|
2073
|
-
reloadConfigs:
|
|
2074
|
+
reloadConfigs: Se,
|
|
2074
2075
|
/** Clear configuration cache */
|
|
2075
2076
|
clearCache: () => ia(o.webMapId),
|
|
2076
2077
|
// Tiled layer APIs
|
|
@@ -2081,7 +2082,7 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2081
2082
|
/** Toggle a tiled layer's visibility */
|
|
2082
2083
|
toggleTiledLayer: _,
|
|
2083
2084
|
/** Set a tiled layer's visibility explicitly */
|
|
2084
|
-
setTiledLayerVisible:
|
|
2085
|
+
setTiledLayerVisible: J,
|
|
2085
2086
|
/** Set a tiled layer's opacity */
|
|
2086
2087
|
setTiledLayerOpacity: I,
|
|
2087
2088
|
// Data source APIs
|
|
@@ -2090,22 +2091,22 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2090
2091
|
/** Whether any data source is loading */
|
|
2091
2092
|
dataSourcesLoading: R,
|
|
2092
2093
|
/** Get data from a specific data source */
|
|
2093
|
-
getDataSourceData:
|
|
2094
|
+
getDataSourceData: ne,
|
|
2094
2095
|
/** Refetch a specific data source */
|
|
2095
|
-
refetchDataSource:
|
|
2096
|
+
refetchDataSource: K,
|
|
2096
2097
|
// Modal APIs
|
|
2097
2098
|
/** Whether the modal is currently open */
|
|
2098
2099
|
isModalOpen: ve,
|
|
2099
2100
|
/** Open the modal */
|
|
2100
|
-
openModal:
|
|
2101
|
+
openModal: xe,
|
|
2101
2102
|
/** Close the modal */
|
|
2102
|
-
closeModal:
|
|
2103
|
+
closeModal: re
|
|
2103
2104
|
});
|
|
2104
2105
|
function et(y) {
|
|
2105
|
-
y.key === "Escape" &&
|
|
2106
|
+
y.key === "Escape" && ie.value && _e();
|
|
2106
2107
|
}
|
|
2107
2108
|
return ot(() => {
|
|
2108
|
-
|
|
2109
|
+
Se(), ge(), T(), document.addEventListener("keydown", et);
|
|
2109
2110
|
}), qt(() => {
|
|
2110
2111
|
document.removeEventListener("keydown", et);
|
|
2111
2112
|
}), (y, M) => (m(), x("div", ca, [
|
|
@@ -2115,7 +2116,7 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2115
2116
|
}, "Skip to main content", -1)),
|
|
2116
2117
|
P("header", {
|
|
2117
2118
|
class: "layerboard-header",
|
|
2118
|
-
style:
|
|
2119
|
+
style: ye(Ve.value)
|
|
2119
2120
|
}, [
|
|
2120
2121
|
M[1] || (M[1] = P("a", {
|
|
2121
2122
|
href: "https://www.phila.gov/",
|
|
@@ -2132,24 +2133,24 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2132
2133
|
}, null, -1)),
|
|
2133
2134
|
P("button", {
|
|
2134
2135
|
ref_key: "hamburgerRef",
|
|
2135
|
-
ref:
|
|
2136
|
+
ref: De,
|
|
2136
2137
|
class: "layerboard-hamburger layerboard-mobile-only",
|
|
2137
|
-
"aria-expanded":
|
|
2138
|
+
"aria-expanded": ie.value,
|
|
2138
2139
|
"aria-label": "Toggle menu",
|
|
2139
2140
|
onClick: Ye
|
|
2140
2141
|
}, [
|
|
2141
|
-
|
|
2142
|
+
H(d(Me), {
|
|
2142
2143
|
"icon-definition": d(Lo),
|
|
2143
2144
|
size: "medium",
|
|
2144
2145
|
inline: "",
|
|
2145
2146
|
decorative: ""
|
|
2146
2147
|
}, null, 8, ["icon-definition"])
|
|
2147
2148
|
], 8, ua),
|
|
2148
|
-
|
|
2149
|
-
P("h1", null,
|
|
2150
|
-
e.subtitle ? (m(), x("span", da,
|
|
2149
|
+
me(y.$slots, "header", {}, () => [
|
|
2150
|
+
P("h1", null, G(e.title), 1),
|
|
2151
|
+
e.subtitle ? (m(), x("span", da, G(e.subtitle), 1)) : B("", !0)
|
|
2151
2152
|
], !0),
|
|
2152
|
-
|
|
2153
|
+
ie.value ? (m(), x("div", {
|
|
2153
2154
|
key: 0,
|
|
2154
2155
|
ref_key: "mobileMenuRef",
|
|
2155
2156
|
ref: Ge,
|
|
@@ -2157,86 +2158,86 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2157
2158
|
role: "dialog",
|
|
2158
2159
|
"aria-modal": "true",
|
|
2159
2160
|
"aria-label": "Site menu",
|
|
2160
|
-
style:
|
|
2161
|
+
style: ye({ backgroundColor: e.themeColor }),
|
|
2161
2162
|
onKeydown: ct
|
|
2162
2163
|
}, [
|
|
2163
2164
|
P("div", fa, [
|
|
2164
|
-
|
|
2165
|
-
openModal:
|
|
2166
|
-
closeModal:
|
|
2165
|
+
me(y.$slots, "footer", {
|
|
2166
|
+
openModal: xe,
|
|
2167
|
+
closeModal: re,
|
|
2167
2168
|
isModalOpen: ve.value
|
|
2168
2169
|
}, () => [
|
|
2169
|
-
M[0] || (M[0] =
|
|
2170
|
+
M[0] || (M[0] = Pe(" City of Philadelphia ", -1))
|
|
2170
2171
|
], !0)
|
|
2171
2172
|
]),
|
|
2172
2173
|
P("button", {
|
|
2173
2174
|
ref_key: "mobileMenuCloseRef",
|
|
2174
|
-
ref:
|
|
2175
|
+
ref: Ce,
|
|
2175
2176
|
class: "layerboard-mobile-menu-close",
|
|
2176
2177
|
"aria-label": "Close menu",
|
|
2177
|
-
onClick:
|
|
2178
|
+
onClick: _e
|
|
2178
2179
|
}, [
|
|
2179
|
-
|
|
2180
|
+
H(d(Me), {
|
|
2180
2181
|
"icon-definition": d(Tt),
|
|
2181
2182
|
size: "medium",
|
|
2182
2183
|
decorative: ""
|
|
2183
2184
|
}, null, 8, ["icon-definition"])
|
|
2184
2185
|
], 512)
|
|
2185
2186
|
], 36)) : B("", !0),
|
|
2186
|
-
|
|
2187
|
+
ie.value ? (m(), x("div", {
|
|
2187
2188
|
key: 1,
|
|
2188
2189
|
class: "layerboard-mobile-menu-backdrop",
|
|
2189
|
-
onClick:
|
|
2190
|
+
onClick: _e
|
|
2190
2191
|
})) : B("", !0)
|
|
2191
2192
|
], 4),
|
|
2192
2193
|
P("div", pa, [
|
|
2193
2194
|
u.value ? (m(), x("div", ya, [
|
|
2194
2195
|
P("div", {
|
|
2195
2196
|
class: "layerboard-spinner",
|
|
2196
|
-
style:
|
|
2197
|
+
style: ye({ borderTopColor: e.themeColor })
|
|
2197
2198
|
}, null, 4),
|
|
2198
|
-
P("p", null, "Loading " +
|
|
2199
|
+
P("p", null, "Loading " + G(e.title) + "...", 1)
|
|
2199
2200
|
])) : S.value ? (m(), x("div", ma, [
|
|
2200
2201
|
M[3] || (M[3] = P("h2", null, "Error Loading Layers", -1)),
|
|
2201
|
-
P("p", null,
|
|
2202
|
+
P("p", null, G(S.value), 1),
|
|
2202
2203
|
P("button", {
|
|
2203
2204
|
class: "layerboard-retry-button",
|
|
2204
|
-
style:
|
|
2205
|
-
onClick:
|
|
2205
|
+
style: ye({ backgroundColor: e.themeColor }),
|
|
2206
|
+
onClick: Se
|
|
2206
2207
|
}, " Retry ", 4)
|
|
2207
|
-
])) : (m(), x(
|
|
2208
|
+
])) : (m(), x(ue, { key: 2 }, [
|
|
2208
2209
|
P("aside", {
|
|
2209
2210
|
id: "main-content",
|
|
2210
2211
|
ref_key: "sidebarRef",
|
|
2211
|
-
ref:
|
|
2212
|
-
class:
|
|
2213
|
-
style:
|
|
2212
|
+
ref: ae,
|
|
2213
|
+
class: se(["layerboard-sidebar", { "is-active": ke.value === "sidebar" }]),
|
|
2214
|
+
style: ye(Fe.value),
|
|
2214
2215
|
"aria-label": "Map layers",
|
|
2215
2216
|
tabindex: "-1"
|
|
2216
2217
|
}, [
|
|
2217
|
-
|
|
2218
|
+
me(y.$slots, "sidebar", {
|
|
2218
2219
|
layers: r.value,
|
|
2219
2220
|
visibleLayers: g.value,
|
|
2220
2221
|
layerOpacities: v.value,
|
|
2221
2222
|
loadingLayers: i.value,
|
|
2222
2223
|
layerErrors: b.value,
|
|
2223
2224
|
currentZoom: f.value,
|
|
2224
|
-
toggleLayer:
|
|
2225
|
-
setLayerVisible:
|
|
2226
|
-
setLayersVisible:
|
|
2227
|
-
setOpacity:
|
|
2225
|
+
toggleLayer: Ee,
|
|
2226
|
+
setLayerVisible: W,
|
|
2227
|
+
setLayersVisible: de,
|
|
2228
|
+
setOpacity: te,
|
|
2228
2229
|
tiledLayers: e.tiledLayers,
|
|
2229
2230
|
visibleTiledLayers: L.value,
|
|
2230
2231
|
tiledLayerOpacities: C.value,
|
|
2231
2232
|
toggleTiledLayer: _,
|
|
2232
|
-
setTiledLayerVisible:
|
|
2233
|
+
setTiledLayerVisible: J,
|
|
2233
2234
|
setTiledLayerOpacity: I,
|
|
2234
2235
|
dataSourcesState: O.value,
|
|
2235
2236
|
dataSourcesLoading: R.value,
|
|
2236
|
-
getDataSource:
|
|
2237
|
-
refetchDataSource:
|
|
2237
|
+
getDataSource: ne,
|
|
2238
|
+
refetchDataSource: K
|
|
2238
2239
|
}, () => [
|
|
2239
|
-
e.showDefaultSidebar ? (m(),
|
|
2240
|
+
e.showDefaultSidebar ? (m(), q(Wo, {
|
|
2240
2241
|
key: 0,
|
|
2241
2242
|
"layer-list": r.value,
|
|
2242
2243
|
"visible-layers": g.value,
|
|
@@ -2246,18 +2247,18 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2246
2247
|
"current-zoom": f.value,
|
|
2247
2248
|
"search-query": $.value,
|
|
2248
2249
|
"layer-metadata": p.value,
|
|
2249
|
-
onToggleLayer:
|
|
2250
|
-
onSetOpacity:
|
|
2251
|
-
onUpdateSearch:
|
|
2250
|
+
onToggleLayer: Ee,
|
|
2251
|
+
onSetOpacity: te,
|
|
2252
|
+
onUpdateSearch: Ne
|
|
2252
2253
|
}, null, 8, ["layer-list", "visible-layers", "layer-opacities", "loading-layers", "layer-errors", "current-zoom", "search-query", "layer-metadata"])) : B("", !0)
|
|
2253
2254
|
], !0)
|
|
2254
2255
|
], 6),
|
|
2255
2256
|
P("div", {
|
|
2256
2257
|
role: "main",
|
|
2257
2258
|
"aria-label": "Map",
|
|
2258
|
-
class:
|
|
2259
|
+
class: se(["layerboard-map", { "is-active": ke.value === "map" }])
|
|
2259
2260
|
}, [
|
|
2260
|
-
|
|
2261
|
+
H(oo, {
|
|
2261
2262
|
"visible-layers": g.value,
|
|
2262
2263
|
"layer-opacities": v.value,
|
|
2263
2264
|
"layer-list": r.value,
|
|
@@ -2275,20 +2276,20 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2275
2276
|
"pictometry-button-position": e.pictometryButtonPosition,
|
|
2276
2277
|
"initial-zoom": e.initialZoom,
|
|
2277
2278
|
"initial-center": e.initialCenter,
|
|
2278
|
-
onZoom:
|
|
2279
|
+
onZoom: Ze,
|
|
2279
2280
|
onLayerLoading: rt,
|
|
2280
|
-
onLayerError:
|
|
2281
|
+
onLayerError: ce
|
|
2281
2282
|
}, null, 8, ["visible-layers", "layer-opacities", "layer-list", "tiled-layers", "visible-tiled-layers", "tiled-layer-opacities", "cyclomedia-config", "pictometry-credentials", "basemap-control-position", "navigation-control-position", "geolocation-control-position", "search-control-position", "draw-control-position", "cyclomedia-button-position", "pictometry-button-position", "initial-zoom", "initial-center"])
|
|
2282
2283
|
], 2),
|
|
2283
2284
|
P("button", {
|
|
2284
|
-
class:
|
|
2285
|
-
style:
|
|
2286
|
-
"aria-expanded": !
|
|
2287
|
-
"aria-label":
|
|
2288
|
-
onClick:
|
|
2285
|
+
class: se(["layerboard-sidebar-toggle", { "is-collapsed": fe.value }]),
|
|
2286
|
+
style: ye({ left: fe.value ? "0" : o.sidebarWidth }),
|
|
2287
|
+
"aria-expanded": !fe.value,
|
|
2288
|
+
"aria-label": fe.value ? "Expand sidebar" : "Collapse sidebar",
|
|
2289
|
+
onClick: Re
|
|
2289
2290
|
}, [
|
|
2290
|
-
|
|
2291
|
-
"icon-definition":
|
|
2291
|
+
H(d(Me), {
|
|
2292
|
+
"icon-definition": fe.value ? d(bo) : d(wo),
|
|
2292
2293
|
size: "medium",
|
|
2293
2294
|
decorative: ""
|
|
2294
2295
|
}, null, 8, ["icon-definition"])
|
|
@@ -2299,27 +2300,27 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2299
2300
|
ref_key: "mobileToggleRef",
|
|
2300
2301
|
ref: st,
|
|
2301
2302
|
class: "layerboard-mobile-toggle",
|
|
2302
|
-
style:
|
|
2303
|
-
onClick:
|
|
2303
|
+
style: ye(ze.value),
|
|
2304
|
+
onClick: Ue
|
|
2304
2305
|
}, [
|
|
2305
|
-
|
|
2306
|
+
ke.value === "map" ? (m(), x("span", ga, G(e.sidebarLabel), 1)) : (m(), x("span", va, G(e.mapLabel), 1))
|
|
2306
2307
|
], 4),
|
|
2307
2308
|
P("footer", {
|
|
2308
2309
|
class: "layerboard-footer",
|
|
2309
|
-
style:
|
|
2310
|
+
style: ye(Le.value)
|
|
2310
2311
|
}, [
|
|
2311
|
-
|
|
2312
|
-
openModal:
|
|
2313
|
-
closeModal:
|
|
2312
|
+
me(y.$slots, "footer", {
|
|
2313
|
+
openModal: xe,
|
|
2314
|
+
closeModal: re,
|
|
2314
2315
|
isModalOpen: ve.value
|
|
2315
2316
|
}, () => [
|
|
2316
|
-
M[4] || (M[4] =
|
|
2317
|
+
M[4] || (M[4] = Pe(" City of Philadelphia ", -1))
|
|
2317
2318
|
], !0)
|
|
2318
2319
|
], 4),
|
|
2319
2320
|
ve.value ? (m(), x("div", {
|
|
2320
2321
|
key: 0,
|
|
2321
2322
|
class: "layerboard-modal-backdrop",
|
|
2322
|
-
onClick:
|
|
2323
|
+
onClick: We,
|
|
2323
2324
|
onKeydown: ut
|
|
2324
2325
|
}, [
|
|
2325
2326
|
P("div", {
|
|
@@ -2335,24 +2336,24 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2335
2336
|
ref: Xe,
|
|
2336
2337
|
class: "layerboard-modal-close",
|
|
2337
2338
|
"aria-label": "Close modal",
|
|
2338
|
-
onClick:
|
|
2339
|
+
onClick: re
|
|
2339
2340
|
}, [
|
|
2340
|
-
|
|
2341
|
+
H(d(Me), {
|
|
2341
2342
|
"icon-definition": d(Tt),
|
|
2342
2343
|
size: "medium",
|
|
2343
2344
|
decorative: ""
|
|
2344
2345
|
}, null, 8, ["icon-definition"])
|
|
2345
2346
|
], 512),
|
|
2346
|
-
|
|
2347
|
+
me(y.$slots, "modal", { closeModal: re }, void 0, !0)
|
|
2347
2348
|
], 512)
|
|
2348
2349
|
], 32)) : B("", !0),
|
|
2349
|
-
P("span", ba,
|
|
2350
|
+
P("span", ba, G(ke.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
|
|
2350
2351
|
]));
|
|
2351
2352
|
}
|
|
2352
|
-
}), Ua = /* @__PURE__ */
|
|
2353
|
+
}), Ua = /* @__PURE__ */ Te(wa, [["__scopeId", "data-v-67021805"]]), La = ["aria-expanded"], Sa = {
|
|
2353
2354
|
key: 0,
|
|
2354
2355
|
class: "topic-icon"
|
|
2355
|
-
}, Ca = { class: "topic-title" }, ka = /* @__PURE__ */
|
|
2356
|
+
}, Ca = { class: "topic-title" }, ka = /* @__PURE__ */ he({
|
|
2356
2357
|
__name: "TopicAccordion",
|
|
2357
2358
|
props: {
|
|
2358
2359
|
title: {},
|
|
@@ -2364,7 +2365,7 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2364
2365
|
emits: ["toggle", "layerChange"],
|
|
2365
2366
|
setup(e, { emit: a }) {
|
|
2366
2367
|
const l = e, o = a, n = w(l.expanded), r = `topic-panel-${kt()}`, u = `topic-header-${kt()}`;
|
|
2367
|
-
|
|
2368
|
+
Be(
|
|
2368
2369
|
() => l.expanded,
|
|
2369
2370
|
(f) => {
|
|
2370
2371
|
n.value = f;
|
|
@@ -2376,28 +2377,28 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2376
2377
|
return (f, $) => {
|
|
2377
2378
|
const g = Gt("font-awesome-icon");
|
|
2378
2379
|
return m(), x("div", {
|
|
2379
|
-
class:
|
|
2380
|
+
class: se(["topic-accordion", { "is-expanded": n.value }])
|
|
2380
2381
|
}, [
|
|
2381
2382
|
P("button", {
|
|
2382
2383
|
id: u,
|
|
2383
|
-
class:
|
|
2384
|
+
class: se(["topic-header", e.headerClass]),
|
|
2384
2385
|
type: "button",
|
|
2385
2386
|
"aria-expanded": n.value,
|
|
2386
2387
|
"aria-controls": r,
|
|
2387
2388
|
onClick: S
|
|
2388
2389
|
}, [
|
|
2389
2390
|
e.icon || f.$slots.icon ? (m(), x("span", Sa, [
|
|
2390
|
-
|
|
2391
|
-
e.icon ? (m(),
|
|
2391
|
+
me(f.$slots, "icon", {}, () => [
|
|
2392
|
+
e.icon ? (m(), q(g, {
|
|
2392
2393
|
key: 0,
|
|
2393
2394
|
icon: ["fas", e.icon],
|
|
2394
2395
|
"aria-hidden": "true"
|
|
2395
2396
|
}, null, 8, ["icon"])) : B("", !0)
|
|
2396
2397
|
], !0)
|
|
2397
2398
|
])) : B("", !0),
|
|
2398
|
-
P("span", Ca,
|
|
2399
|
+
P("span", Ca, G(e.title), 1),
|
|
2399
2400
|
P("span", {
|
|
2400
|
-
class:
|
|
2401
|
+
class: se(["topic-chevron", { "is-rotated": n.value }])
|
|
2401
2402
|
}, [...$[0] || ($[0] = [
|
|
2402
2403
|
P("svg", {
|
|
2403
2404
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2421,7 +2422,7 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2421
2422
|
"aria-labelledby": u,
|
|
2422
2423
|
class: "topic-content"
|
|
2423
2424
|
}, [
|
|
2424
|
-
|
|
2425
|
+
me(f.$slots, "default", {}, () => [
|
|
2425
2426
|
$[1] || ($[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
|
|
2426
2427
|
], !0)
|
|
2427
2428
|
], 512), [
|
|
@@ -2430,7 +2431,7 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2430
2431
|
], 2);
|
|
2431
2432
|
};
|
|
2432
2433
|
}
|
|
2433
|
-
}), Wa = /* @__PURE__ */
|
|
2434
|
+
}), Wa = /* @__PURE__ */ Te(ka, [["__scopeId", "data-v-a2023afa"]]);
|
|
2434
2435
|
function xa(e) {
|
|
2435
2436
|
return e.displayOptions?.shouldShowCheckbox !== !1;
|
|
2436
2437
|
}
|
|
@@ -2440,13 +2441,13 @@ function Bt(e, a) {
|
|
|
2440
2441
|
function At(e, a) {
|
|
2441
2442
|
return a ? e.displayOptions?.shouldShowLegendBox !== !1 : !1;
|
|
2442
2443
|
}
|
|
2443
|
-
function
|
|
2444
|
+
function Ae(e) {
|
|
2444
2445
|
return e.displayOptions?.layerNameChange || e.title;
|
|
2445
2446
|
}
|
|
2446
2447
|
const $a = ["aria-label"], Ma = ["checked", "disabled", "onChange"], Pa = { class: "layer-title" }, Ta = { class: "layer-title" }, Fa = {
|
|
2447
2448
|
key: 0,
|
|
2448
2449
|
class: "empty-state"
|
|
2449
|
-
}, Ea = /* @__PURE__ */
|
|
2450
|
+
}, Ea = /* @__PURE__ */ he({
|
|
2450
2451
|
__name: "LayerCheckboxSet",
|
|
2451
2452
|
props: {
|
|
2452
2453
|
layers: {},
|
|
@@ -2472,13 +2473,13 @@ const $a = ["aria-label"], Ma = ["checked", "disabled", "onChange"], Pa = { clas
|
|
|
2472
2473
|
role: "group",
|
|
2473
2474
|
"aria-label": e.groupLabel
|
|
2474
2475
|
}, [
|
|
2475
|
-
(m(!0), x(
|
|
2476
|
+
(m(!0), x(ue, null, be(e.layers, (i) => (m(), x("div", {
|
|
2476
2477
|
key: i.id,
|
|
2477
2478
|
class: "layer-item"
|
|
2478
2479
|
}, [
|
|
2479
2480
|
d(xa)(i) ? (m(), x("label", {
|
|
2480
2481
|
key: 0,
|
|
2481
|
-
class:
|
|
2482
|
+
class: se(["layer-checkbox", {
|
|
2482
2483
|
"layer-unavailable": !d(f)(i),
|
|
2483
2484
|
"layer-error": d(S)(i.id)
|
|
2484
2485
|
}])
|
|
@@ -2490,8 +2491,8 @@ const $a = ["aria-label"], Ma = ["checked", "disabled", "onChange"], Pa = { clas
|
|
|
2490
2491
|
onChange: (b) => $(i.id)
|
|
2491
2492
|
}, null, 40, Ma),
|
|
2492
2493
|
P("span", Pa, [
|
|
2493
|
-
|
|
2494
|
-
|
|
2494
|
+
Pe(G(d(Ae)(i)) + " ", 1),
|
|
2495
|
+
H(at, {
|
|
2495
2496
|
loading: d(u)(i.id),
|
|
2496
2497
|
error: d(S)(i.id),
|
|
2497
2498
|
unavailable: !d(f)(i)
|
|
@@ -2499,40 +2500,40 @@ const $a = ["aria-label"], Ma = ["checked", "disabled", "onChange"], Pa = { clas
|
|
|
2499
2500
|
])
|
|
2500
2501
|
], 2)) : (m(), x("div", {
|
|
2501
2502
|
key: 1,
|
|
2502
|
-
class:
|
|
2503
|
+
class: se(["layer-label-only", {
|
|
2503
2504
|
"layer-unavailable": !d(f)(i),
|
|
2504
2505
|
"layer-error": d(S)(i.id)
|
|
2505
2506
|
}])
|
|
2506
2507
|
}, [
|
|
2507
2508
|
P("span", Ta, [
|
|
2508
|
-
|
|
2509
|
-
|
|
2509
|
+
Pe(G(d(Ae)(i)) + " ", 1),
|
|
2510
|
+
H(at, {
|
|
2510
2511
|
loading: d(u)(i.id),
|
|
2511
2512
|
error: d(S)(i.id),
|
|
2512
2513
|
unavailable: !d(f)(i)
|
|
2513
2514
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2514
2515
|
])
|
|
2515
2516
|
], 2)),
|
|
2516
|
-
d(Bt)(i, e.showOpacity) && d(n)(i.id) && d(f)(i) ? (m(),
|
|
2517
|
+
d(Bt)(i, e.showOpacity) && d(n)(i.id) && d(f)(i) ? (m(), q(ht, {
|
|
2517
2518
|
key: 2,
|
|
2518
2519
|
"layer-id": i.id,
|
|
2519
|
-
"layer-name": d(
|
|
2520
|
+
"layer-name": d(Ae)(i),
|
|
2520
2521
|
opacity: d(r)(i.id),
|
|
2521
2522
|
"onUpdate:opacity": (b) => o("setOpacity", i.id, b)
|
|
2522
2523
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : B("", !0),
|
|
2523
|
-
d(At)(i, e.showLegend) && d(n)(i.id) && d(f)(i) && i.legend?.length ? (m(),
|
|
2524
|
+
d(At)(i, e.showLegend) && d(n)(i.id) && d(f)(i) && i.legend?.length ? (m(), q(gt, {
|
|
2524
2525
|
key: 3,
|
|
2525
2526
|
items: i.legend,
|
|
2526
|
-
label: "Legend for " + d(
|
|
2527
|
+
label: "Legend for " + d(Ae)(i)
|
|
2527
2528
|
}, null, 8, ["items", "label"])) : B("", !0)
|
|
2528
2529
|
]))), 128)),
|
|
2529
2530
|
e.layers.length === 0 ? (m(), x("div", Fa, "No layers available")) : B("", !0)
|
|
2530
2531
|
], 8, $a));
|
|
2531
2532
|
}
|
|
2532
|
-
}), ja = /* @__PURE__ */
|
|
2533
|
+
}), ja = /* @__PURE__ */ Te(Ea, [["__scopeId", "data-v-bfcd7855"]]), Ia = ["aria-label"], Oa = ["name", "checked", "disabled", "onChange"], za = { class: "layer-title" }, Da = {
|
|
2533
2534
|
key: 0,
|
|
2534
2535
|
class: "empty-state"
|
|
2535
|
-
}, _a = /* @__PURE__ */
|
|
2536
|
+
}, _a = /* @__PURE__ */ he({
|
|
2536
2537
|
__name: "LayerRadioButtonSet",
|
|
2537
2538
|
props: {
|
|
2538
2539
|
layers: {},
|
|
@@ -2560,12 +2561,12 @@ const $a = ["aria-label"], Ma = ["checked", "disabled", "onChange"], Pa = { clas
|
|
|
2560
2561
|
role: "radiogroup",
|
|
2561
2562
|
"aria-label": e.groupLabel
|
|
2562
2563
|
}, [
|
|
2563
|
-
(m(!0), x(
|
|
2564
|
+
(m(!0), x(ue, null, be(e.layers, (i) => (m(), x("div", {
|
|
2564
2565
|
key: i.id,
|
|
2565
2566
|
class: "layer-item"
|
|
2566
2567
|
}, [
|
|
2567
2568
|
P("label", {
|
|
2568
|
-
class:
|
|
2569
|
+
class: se(["layer-radio", {
|
|
2569
2570
|
"layer-unavailable": !d(f)(i),
|
|
2570
2571
|
"layer-error": d(S)(i.id)
|
|
2571
2572
|
}])
|
|
@@ -2578,31 +2579,31 @@ const $a = ["aria-label"], Ma = ["checked", "disabled", "onChange"], Pa = { clas
|
|
|
2578
2579
|
onChange: (b) => $(i.id)
|
|
2579
2580
|
}, null, 40, Oa),
|
|
2580
2581
|
P("span", za, [
|
|
2581
|
-
|
|
2582
|
-
|
|
2582
|
+
Pe(G(d(Ae)(i)) + " ", 1),
|
|
2583
|
+
H(at, {
|
|
2583
2584
|
loading: d(u)(i.id),
|
|
2584
2585
|
error: d(S)(i.id),
|
|
2585
2586
|
unavailable: !d(f)(i)
|
|
2586
2587
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2587
2588
|
])
|
|
2588
2589
|
], 2),
|
|
2589
|
-
d(Bt)(i, e.showOpacity) && d(n)(i.id) && d(f)(i) ? (m(),
|
|
2590
|
+
d(Bt)(i, e.showOpacity) && d(n)(i.id) && d(f)(i) ? (m(), q(ht, {
|
|
2590
2591
|
key: 0,
|
|
2591
2592
|
"layer-id": i.id,
|
|
2592
|
-
"layer-name": d(
|
|
2593
|
+
"layer-name": d(Ae)(i),
|
|
2593
2594
|
opacity: d(r)(i.id),
|
|
2594
2595
|
"onUpdate:opacity": (b) => o("setOpacity", i.id, b)
|
|
2595
2596
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : B("", !0),
|
|
2596
|
-
d(At)(i, e.showLegend) && d(n)(i.id) && d(f)(i) && i.legend?.length ? (m(),
|
|
2597
|
+
d(At)(i, e.showLegend) && d(n)(i.id) && d(f)(i) && i.legend?.length ? (m(), q(gt, {
|
|
2597
2598
|
key: 1,
|
|
2598
2599
|
items: i.legend,
|
|
2599
|
-
label: "Legend for " + d(
|
|
2600
|
+
label: "Legend for " + d(Ae)(i)
|
|
2600
2601
|
}, null, 8, ["items", "label"])) : B("", !0)
|
|
2601
2602
|
]))), 128)),
|
|
2602
2603
|
e.layers.length === 0 ? (m(), x("div", Da, "No layers available")) : B("", !0)
|
|
2603
2604
|
], 8, Ia));
|
|
2604
2605
|
}
|
|
2605
|
-
}), qa = /* @__PURE__ */
|
|
2606
|
+
}), qa = /* @__PURE__ */ Te(_a, [["__scopeId", "data-v-c368d815"]]);
|
|
2606
2607
|
function Ga(e) {
|
|
2607
2608
|
const a = w([]), l = w(/* @__PURE__ */ new Set()), o = w({}), n = w(/* @__PURE__ */ new Set()), r = w({}), u = w(""), S = w(!1), f = w(!1), $ = w(null), g = D(() => {
|
|
2608
2609
|
if (!u.value.trim())
|
|
@@ -2663,20 +2664,20 @@ function Ga(e) {
|
|
|
2663
2664
|
delete O[I], r.value = O;
|
|
2664
2665
|
}
|
|
2665
2666
|
}
|
|
2666
|
-
function
|
|
2667
|
+
function J() {
|
|
2667
2668
|
a.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, n.value = /* @__PURE__ */ new Set(), r.value = {}, u.value = "", S.value = !1, f.value = !1, $.value = null;
|
|
2668
2669
|
}
|
|
2669
2670
|
return {
|
|
2670
2671
|
// State (readonly)
|
|
2671
|
-
layerConfigs:
|
|
2672
|
-
visibleLayers:
|
|
2673
|
-
layerOpacities:
|
|
2674
|
-
loadingLayers:
|
|
2675
|
-
layerErrors:
|
|
2676
|
-
searchQuery:
|
|
2677
|
-
isLoading:
|
|
2678
|
-
isInitialized:
|
|
2679
|
-
error:
|
|
2672
|
+
layerConfigs: j(a),
|
|
2673
|
+
visibleLayers: j(l),
|
|
2674
|
+
layerOpacities: j(o),
|
|
2675
|
+
loadingLayers: j(n),
|
|
2676
|
+
layerErrors: j(r),
|
|
2677
|
+
searchQuery: j(u),
|
|
2678
|
+
isLoading: j(S),
|
|
2679
|
+
isInitialized: j(f),
|
|
2680
|
+
error: j($),
|
|
2680
2681
|
// Computed
|
|
2681
2682
|
filteredLayerConfigs: g,
|
|
2682
2683
|
layerList: v,
|
|
@@ -2689,7 +2690,7 @@ function Ga(e) {
|
|
|
2689
2690
|
filterLayers: C,
|
|
2690
2691
|
setLayerLoading: T,
|
|
2691
2692
|
setLayerError: _,
|
|
2692
|
-
reset:
|
|
2693
|
+
reset: J
|
|
2693
2694
|
};
|
|
2694
2695
|
}
|
|
2695
2696
|
function Ha() {
|
|
@@ -2719,14 +2720,14 @@ function Ra(e) {
|
|
|
2719
2720
|
const p = e.url.replace(/\/$/, ""), L = encodeURIComponent(f.where || e.where || "1=1");
|
|
2720
2721
|
let C = `${p}/query?where=${L}&outFields=*&returnGeometry=true&resultRecordCount=${$}&resultOffset=${g}&f=geojson`;
|
|
2721
2722
|
if (f.bounds) {
|
|
2722
|
-
const
|
|
2723
|
+
const J = JSON.stringify({
|
|
2723
2724
|
xmin: f.bounds.west,
|
|
2724
2725
|
ymin: f.bounds.south,
|
|
2725
2726
|
xmax: f.bounds.east,
|
|
2726
2727
|
ymax: f.bounds.north,
|
|
2727
2728
|
spatialReference: { wkid: 4326 }
|
|
2728
2729
|
});
|
|
2729
|
-
C += `&geometry=${encodeURIComponent(
|
|
2730
|
+
C += `&geometry=${encodeURIComponent(J)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
|
|
2730
2731
|
}
|
|
2731
2732
|
const T = await fetch(C);
|
|
2732
2733
|
if (!T.ok)
|
|
@@ -2754,10 +2755,10 @@ function Ra(e) {
|
|
|
2754
2755
|
}
|
|
2755
2756
|
return {
|
|
2756
2757
|
// State (readonly)
|
|
2757
|
-
data:
|
|
2758
|
-
isLoading:
|
|
2759
|
-
error:
|
|
2760
|
-
totalFeatures:
|
|
2758
|
+
data: j(a),
|
|
2759
|
+
isLoading: j(l),
|
|
2760
|
+
error: j(o),
|
|
2761
|
+
totalFeatures: j(n),
|
|
2761
2762
|
// Config
|
|
2762
2763
|
config: e,
|
|
2763
2764
|
// Methods
|
|
@@ -2768,7 +2769,7 @@ function Ra(e) {
|
|
|
2768
2769
|
}
|
|
2769
2770
|
function Ja(e, a, l) {
|
|
2770
2771
|
const o = Ra(e);
|
|
2771
|
-
return
|
|
2772
|
+
return Be(
|
|
2772
2773
|
a,
|
|
2773
2774
|
async (n) => {
|
|
2774
2775
|
if (n) {
|
|
@@ -2790,7 +2791,7 @@ export {
|
|
|
2790
2791
|
wt as buildWebMapUrl,
|
|
2791
2792
|
ia as clearCache,
|
|
2792
2793
|
mt as getLayerConfigs,
|
|
2793
|
-
|
|
2794
|
+
Ae as getLayerDisplayName,
|
|
2794
2795
|
Na as getWebMapUrl,
|
|
2795
2796
|
Dt as normalizeUrl,
|
|
2796
2797
|
xa as shouldShowCheckbox,
|