@phila/layerboard 3.0.0-beta.31 → 3.0.0-beta.33
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 +3 -0
- package/dist/composables/useLayerConfig.d.ts +1 -0
- package/dist/composables/useLayerboard.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +1227 -1172
- package/dist/layerboard.css +1 -1
- package/dist/types/layer.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Map as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as ge, ref as k, watch as Ee, computed as _, nextTick as Ze, onMounted as it, onUnmounted as At, createElementBlock as M, openBlock as m, createVNode as J, unref as f, withCtx as Ge, createBlock as G, createCommentVNode as R, Fragment as de, renderList as we, useAttrs as Ht, toRef as Jt, normalizeClass as se, createElementVNode as P, toDisplayString as H, renderSlot as me, withDirectives as Bt, mergeProps as ht, vModelDynamic as Kt, createTextVNode as ke, normalizeProps as $t, guardReactiveProps as Mt, normalizeStyle as ye, withModifiers as Qt, readonly as q, provide as Z, onBeforeUnmount as Xt, useId as Pt, resolveComponent as Yt, vShow as eo } from "vue";
|
|
2
|
+
import { Map as to, DrawTool as oo, RasterLayer as Ft, CircleLayer as Tt, FillLayer as It, LineLayer as mt, MapMarker as ao, MapPopup as io } from "@phila/phila-ui-map-core";
|
|
3
|
+
import { cn as gt, Icon as Ce, BaseLink as lo, ActionContent as Et } from "@phila/phila-ui-core";
|
|
4
|
+
const no = { class: "map-panel" }, ro = /* @__PURE__ */ ge({
|
|
5
5
|
__name: "MapPanel",
|
|
6
6
|
props: {
|
|
7
7
|
visibleLayers: {},
|
|
@@ -24,177 +24,187 @@ const io = { class: "map-panel" }, lo = /* @__PURE__ */ ye({
|
|
|
24
24
|
},
|
|
25
25
|
emits: ["zoom", "layerLoading", "layerError"],
|
|
26
26
|
setup(e, { emit: i }) {
|
|
27
|
-
const l = e, o = i, r = k(null), n = k(null),
|
|
27
|
+
const l = e, o = i, r = k(null), n = k(null), u = k(0);
|
|
28
28
|
function w(t) {
|
|
29
|
-
o("zoom", t), n.value && (
|
|
29
|
+
o("zoom", t), n.value && (u.value = p(n.value));
|
|
30
30
|
}
|
|
31
31
|
function p(t) {
|
|
32
|
-
const
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
const
|
|
36
|
-
async function a(t,
|
|
37
|
-
const
|
|
38
|
-
xmin:
|
|
39
|
-
ymin:
|
|
40
|
-
xmax:
|
|
41
|
-
ymax:
|
|
32
|
+
const c = t.getZoom(), b = t.getCenter().lat, $ = 559082264028e-3, E = b * Math.PI / 180;
|
|
33
|
+
return $ * Math.cos(E) / Math.pow(2, c);
|
|
34
|
+
}
|
|
35
|
+
const C = k({}), y = k(null), h = k(/* @__PURE__ */ new Set());
|
|
36
|
+
async function a(t, c, s, b, $) {
|
|
37
|
+
const E = encodeURIComponent(b || "1=1"), B = JSON.stringify({
|
|
38
|
+
xmin: c.west,
|
|
39
|
+
ymin: c.south,
|
|
40
|
+
xmax: c.east,
|
|
41
|
+
ymax: c.north,
|
|
42
42
|
spatialReference: { wkid: 4326 }
|
|
43
|
-
}),
|
|
44
|
-
let
|
|
45
|
-
for (;
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
48
|
-
throw new Error(`HTTP ${
|
|
49
|
-
const
|
|
50
|
-
|
|
43
|
+
}), ee = $ !== void 0 && $ < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, $) * 512)}` : "", Y = 2e3;
|
|
44
|
+
let ie = 0, oe = [], A = !0;
|
|
45
|
+
for (; A; ) {
|
|
46
|
+
const j = `${t}/query?where=${E}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${Y}&resultOffset=${ie}${ee}&f=geojson`, N = await fetch(j);
|
|
47
|
+
if (!N.ok)
|
|
48
|
+
throw new Error(`HTTP ${N.status}: ${N.statusText}`);
|
|
49
|
+
const ue = await N.json();
|
|
50
|
+
ue.features && ue.features.length > 0 ? (oe = oe.concat(ue.features), ie += ue.features.length, A = ue.features.length === Y) : A = !1;
|
|
51
51
|
}
|
|
52
|
-
return
|
|
53
|
-
if (
|
|
54
|
-
const
|
|
55
|
-
for (const
|
|
56
|
-
|
|
57
|
-
return { ...
|
|
52
|
+
return oe = oe.map((j) => {
|
|
53
|
+
if (j.properties) {
|
|
54
|
+
const N = {};
|
|
55
|
+
for (const ue of Object.keys(j.properties))
|
|
56
|
+
N[ue.toLowerCase()] = j.properties[ue];
|
|
57
|
+
return { ...j, properties: N };
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return j;
|
|
60
60
|
}), {
|
|
61
61
|
type: "FeatureCollection",
|
|
62
|
-
features:
|
|
62
|
+
features: oe
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
async function
|
|
66
|
-
const b =
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
o("layerLoading",
|
|
65
|
+
async function g(t, c, s) {
|
|
66
|
+
const b = c.map(async ($) => {
|
|
67
|
+
const E = l.layerList.find((B) => B.config.id === $)?.config;
|
|
68
|
+
if (E) {
|
|
69
|
+
o("layerLoading", $, !0);
|
|
70
70
|
try {
|
|
71
|
-
const B = await a(
|
|
72
|
-
|
|
71
|
+
const B = await a(E.url, t, $, E.where, s);
|
|
72
|
+
C.value = { ...C.value, [$]: B }, o("layerError", $, null);
|
|
73
73
|
} catch (B) {
|
|
74
|
-
const
|
|
75
|
-
o("layerError",
|
|
74
|
+
const ee = B instanceof Error ? B.message : "Failed to load";
|
|
75
|
+
o("layerError", $, ee);
|
|
76
76
|
} finally {
|
|
77
|
-
o("layerLoading",
|
|
77
|
+
o("layerLoading", $, !1);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
await Promise.all(b);
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
|
|
83
|
+
function d(t) {
|
|
84
|
+
const c = new Set(t);
|
|
85
|
+
for (const s of l.layerList)
|
|
86
|
+
s.config.parentId && c.has(s.config.parentId) && c.add(s.config.id);
|
|
87
|
+
return [...c];
|
|
86
88
|
}
|
|
87
|
-
function L(t) {
|
|
88
|
-
|
|
89
|
+
async function L(t, c) {
|
|
90
|
+
const s = d([...l.visibleLayers]);
|
|
91
|
+
await g(t, s, c);
|
|
89
92
|
}
|
|
90
93
|
function S(t) {
|
|
94
|
+
y.value = t.bounds, L(t.bounds, t.zoom);
|
|
95
|
+
}
|
|
96
|
+
function I(t) {
|
|
91
97
|
n.value = t;
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
west:
|
|
95
|
-
south:
|
|
96
|
-
east:
|
|
97
|
-
north:
|
|
98
|
+
const c = t.getBounds();
|
|
99
|
+
y.value = {
|
|
100
|
+
west: c.getWest(),
|
|
101
|
+
south: c.getSouth(),
|
|
102
|
+
east: c.getEast(),
|
|
103
|
+
north: c.getNorth()
|
|
98
104
|
};
|
|
99
105
|
const s = t.getZoom();
|
|
100
|
-
o("zoom", s),
|
|
106
|
+
o("zoom", s), u.value = p(t), L(y.value, s);
|
|
101
107
|
}
|
|
102
|
-
|
|
108
|
+
Ee(
|
|
103
109
|
() => l.visibleLayers,
|
|
104
110
|
async () => {
|
|
105
|
-
if (
|
|
106
|
-
const t = new Set(l.visibleLayers),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
if (ce.value.length > 0 && Te(), y.value) {
|
|
112
|
+
const t = new Set(l.visibleLayers), c = [...t].filter((b) => !h.value.has(b));
|
|
113
|
+
h.value = new Set(t);
|
|
114
|
+
const s = d(c);
|
|
115
|
+
if (s.length > 0) {
|
|
116
|
+
const b = n.value?.getZoom();
|
|
117
|
+
await g(y.value, s, b);
|
|
110
118
|
}
|
|
111
119
|
}
|
|
112
120
|
}
|
|
113
121
|
);
|
|
114
|
-
function
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
() => l.layerList.filter((t) => t.config.type === "
|
|
124
|
-
), O =
|
|
122
|
+
function F(t) {
|
|
123
|
+
if (l.visibleLayers.has(t)) return !0;
|
|
124
|
+
const c = l.layerList.find((s) => s.config.id === t)?.config;
|
|
125
|
+
return !!c?.parentId && l.visibleLayers.has(c.parentId);
|
|
126
|
+
}
|
|
127
|
+
function V(t) {
|
|
128
|
+
return !!C.value[t.id];
|
|
129
|
+
}
|
|
130
|
+
const T = _(
|
|
131
|
+
() => l.layerList.filter((t) => t.config.type === "circle" && F(t.config.id) && V(t.config)).map((t) => t.config)
|
|
132
|
+
), O = _(
|
|
133
|
+
() => l.layerList.filter((t) => t.config.type === "fill" && F(t.config.id) && V(t.config)).map((t) => t.config)
|
|
134
|
+
), D = _(
|
|
125
135
|
() => l.layerList.filter(
|
|
126
|
-
(t) => t.config.type === "fill" && t.config.outlinePaint &&
|
|
136
|
+
(t) => t.config.type === "fill" && t.config.outlinePaint && F(t.config.id) && V(t.config)
|
|
127
137
|
).map((t) => t.config)
|
|
128
|
-
),
|
|
129
|
-
() => l.layerList.filter((t) => t.config.type === "line" &&
|
|
138
|
+
), te = _(
|
|
139
|
+
() => l.layerList.filter((t) => t.config.type === "line" && F(t.config.id) && V(t.config)).map((t) => t.config)
|
|
130
140
|
);
|
|
131
|
-
|
|
141
|
+
Ee(te, async (t) => {
|
|
132
142
|
if (t.length < 2) return;
|
|
133
|
-
await
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
143
|
+
await Ze();
|
|
144
|
+
const c = n.value;
|
|
145
|
+
if (c)
|
|
136
146
|
for (let s = t.length - 1; s >= 0; s--) {
|
|
137
147
|
const b = s < t.length - 1 ? t[s + 1].id : "highlight-lines";
|
|
138
148
|
try {
|
|
139
|
-
|
|
149
|
+
c.getLayer(t[s].id) && c.moveLayer(t[s].id, b);
|
|
140
150
|
} catch {
|
|
141
151
|
}
|
|
142
152
|
}
|
|
143
153
|
});
|
|
144
|
-
function
|
|
154
|
+
function U(t) {
|
|
145
155
|
return l.visibleTiledLayers?.has(t) ?? !1;
|
|
146
156
|
}
|
|
147
|
-
function
|
|
157
|
+
function fe(t) {
|
|
148
158
|
return l.tiledLayerOpacities?.[t] ?? 1;
|
|
149
159
|
}
|
|
150
|
-
function
|
|
160
|
+
function ve(t) {
|
|
151
161
|
return `${t.replace(/\/$/, "")}/tile/{z}/{y}/{x}`;
|
|
152
162
|
}
|
|
153
|
-
function
|
|
163
|
+
function st(t) {
|
|
154
164
|
return {
|
|
155
165
|
type: "raster",
|
|
156
|
-
tiles: [
|
|
166
|
+
tiles: [ve(t.url)],
|
|
157
167
|
tileSize: 256,
|
|
158
168
|
attribution: t.attribution || ""
|
|
159
169
|
};
|
|
160
170
|
}
|
|
161
|
-
const
|
|
162
|
-
async function
|
|
163
|
-
if (!
|
|
164
|
-
|
|
171
|
+
const Ne = k({}), Ke = k(/* @__PURE__ */ new Set());
|
|
172
|
+
async function Ue(t) {
|
|
173
|
+
if (!Ke.value.has(t.id)) {
|
|
174
|
+
Ke.value.add(t.id);
|
|
165
175
|
try {
|
|
166
|
-
const
|
|
176
|
+
const c = t.url.replace(/\/$/, ""), s = await fetch(`${c}?f=json`);
|
|
167
177
|
if (!s.ok)
|
|
168
178
|
return;
|
|
169
|
-
const b = await s.json(),
|
|
170
|
-
let
|
|
179
|
+
const b = await s.json(), $ = b.minScale || 0;
|
|
180
|
+
let E = b.maxScale || 0;
|
|
171
181
|
if (b.layers && b.layers.length > 0)
|
|
172
182
|
for (const B of b.layers)
|
|
173
|
-
B.maxScale && B.maxScale > 0 && (
|
|
174
|
-
|
|
175
|
-
...
|
|
176
|
-
[t.id]: { minScale:
|
|
183
|
+
B.maxScale && B.maxScale > 0 && (E === 0 || B.maxScale < E) && (E = B.maxScale);
|
|
184
|
+
E === 0 && (E = 72e3), Ne.value = {
|
|
185
|
+
...Ne.value,
|
|
186
|
+
[t.id]: { minScale: $, maxScale: E }
|
|
177
187
|
};
|
|
178
188
|
} catch {
|
|
179
189
|
}
|
|
180
190
|
}
|
|
181
191
|
}
|
|
182
|
-
|
|
192
|
+
it(() => {
|
|
183
193
|
if (l.tiledLayers)
|
|
184
194
|
for (const t of l.tiledLayers)
|
|
185
|
-
t.scaleBasedRendering &&
|
|
195
|
+
t.scaleBasedRendering && Ue(t);
|
|
186
196
|
});
|
|
187
|
-
function
|
|
197
|
+
function Qe(t) {
|
|
188
198
|
if (!t.scaleBasedRendering)
|
|
189
199
|
return "tiled";
|
|
190
|
-
const
|
|
191
|
-
if (!
|
|
200
|
+
const c = Ne.value[t.id];
|
|
201
|
+
if (!c)
|
|
192
202
|
return "tiled";
|
|
193
|
-
const s =
|
|
194
|
-
return s === 0 || s >
|
|
203
|
+
const s = u.value;
|
|
204
|
+
return s === 0 || s > c.maxScale ? "tiled" : "dynamic";
|
|
195
205
|
}
|
|
196
|
-
const
|
|
197
|
-
function
|
|
206
|
+
const ct = _(() => l.tiledLayers ? l.tiledLayers.filter((t) => U(t.id) ? t.scaleBasedRendering ? Qe(t) === "tiled" : !0 : !1) : []), ze = _(() => l.tiledLayers ? l.tiledLayers.filter((t) => U(t.id) && t.scaleBasedRendering ? Qe(t) === "dynamic" : !1) : []);
|
|
207
|
+
function We(t) {
|
|
198
208
|
return {
|
|
199
209
|
type: "raster",
|
|
200
210
|
tiles: [`${t.url.replace(/\/$/, "")}/export?bbox={bbox-epsg-3857}&bboxSR=3857&imageSR=3857&size=256,256&format=png32&transparent=true&f=image`],
|
|
@@ -202,63 +212,63 @@ const io = { class: "map-panel" }, lo = /* @__PURE__ */ ye({
|
|
|
202
212
|
attribution: t.attribution || ""
|
|
203
213
|
};
|
|
204
214
|
}
|
|
205
|
-
function
|
|
206
|
-
return { type: "geojson", data:
|
|
215
|
+
function $e(t) {
|
|
216
|
+
return { type: "geojson", data: C.value[t.id], tolerance: 0 };
|
|
207
217
|
}
|
|
208
|
-
function
|
|
218
|
+
function Pe(t) {
|
|
209
219
|
return l.layerOpacities[t] ?? 1;
|
|
210
220
|
}
|
|
211
|
-
function
|
|
212
|
-
const
|
|
221
|
+
function je(t) {
|
|
222
|
+
const c = Pe(t.id), s = t.type === "circle" ? "circle-opacity" : t.type === "fill" ? "fill-opacity" : "line-opacity";
|
|
213
223
|
if (t.type === "fill" && t.paint["fill-opacity"] === 0)
|
|
214
224
|
return { ...t.paint, "fill-opacity": 0 };
|
|
215
|
-
const b = t.type === "circle" ? "circle-color" : t.type === "fill" ? "fill-color" : "line-color",
|
|
216
|
-
if (B &&
|
|
217
|
-
if (
|
|
218
|
-
return
|
|
225
|
+
const b = t.type === "circle" ? "circle-color" : t.type === "fill" ? "fill-color" : "line-color", $ = { ...t.paint }, E = $[b], B = $[s] === 1, ee = typeof E == "string" && E.startsWith("rgba(");
|
|
226
|
+
if (B && ee) {
|
|
227
|
+
if (c === 1)
|
|
228
|
+
return $;
|
|
219
229
|
{
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
222
|
-
const [, oe, A,
|
|
223
|
-
|
|
230
|
+
const Y = E.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
231
|
+
if (Y && Y[4]) {
|
|
232
|
+
const [, ie, oe, A, j] = Y, N = parseFloat(j) * c;
|
|
233
|
+
$[b] = `rgba(${ie}, ${oe}, ${A}, ${N})`, $[s] = 1;
|
|
224
234
|
}
|
|
225
|
-
return
|
|
235
|
+
return $;
|
|
226
236
|
}
|
|
227
237
|
}
|
|
228
|
-
if (
|
|
229
|
-
const
|
|
230
|
-
if (
|
|
231
|
-
const [, oe, A
|
|
232
|
-
|
|
238
|
+
if (ee) {
|
|
239
|
+
const Y = E.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
240
|
+
if (Y) {
|
|
241
|
+
const [, ie, oe, A] = Y;
|
|
242
|
+
$[b] = `rgb(${ie}, ${oe}, ${A})`;
|
|
233
243
|
}
|
|
234
244
|
}
|
|
235
|
-
return
|
|
245
|
+
return $[s] = c, $;
|
|
236
246
|
}
|
|
237
|
-
function
|
|
238
|
-
const
|
|
239
|
-
return { ...t.outlinePaint, "line-opacity":
|
|
247
|
+
function ut(t) {
|
|
248
|
+
const c = Pe(t.id);
|
|
249
|
+
return { ...t.outlinePaint, "line-opacity": c };
|
|
240
250
|
}
|
|
241
|
-
const
|
|
242
|
-
function
|
|
243
|
-
const
|
|
244
|
-
return l.layerList.find((b) => b.config.id ===
|
|
251
|
+
const ce = k([]), Fe = k(null), ae = k(0);
|
|
252
|
+
function De(t) {
|
|
253
|
+
const c = t.replace(/-outline$/, "");
|
|
254
|
+
return l.layerList.find((b) => b.config.id === c)?.config;
|
|
245
255
|
}
|
|
246
|
-
function
|
|
256
|
+
function Xe(t, c) {
|
|
247
257
|
return t.replace(/\{([^}]+)\}/g, (s, b) => {
|
|
248
|
-
const
|
|
249
|
-
return
|
|
258
|
+
const $ = c[b];
|
|
259
|
+
return $ == null ? "" : String($);
|
|
250
260
|
});
|
|
251
261
|
}
|
|
252
|
-
function
|
|
262
|
+
function be(t) {
|
|
253
263
|
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
254
264
|
}
|
|
255
|
-
function
|
|
265
|
+
function qe(t, c, s) {
|
|
256
266
|
if (t == null) return "-";
|
|
257
|
-
if (
|
|
267
|
+
if (c?.dateFormat && typeof t == "number") {
|
|
258
268
|
const b = new Date(t);
|
|
259
|
-
if (s &&
|
|
269
|
+
if (s && c.dateFormat === "shortDateShortTime")
|
|
260
270
|
return b.toLocaleString(void 0, { dateStyle: "short", timeStyle: "short" });
|
|
261
|
-
switch (
|
|
271
|
+
switch (c.dateFormat) {
|
|
262
272
|
case "shortDateShortTime":
|
|
263
273
|
return b.toLocaleDateString();
|
|
264
274
|
case "longMonthDayYear":
|
|
@@ -272,92 +282,94 @@ const io = { class: "map-panel" }, lo = /* @__PURE__ */ ye({
|
|
|
272
282
|
}
|
|
273
283
|
}
|
|
274
284
|
if (typeof t == "number") {
|
|
275
|
-
if (t > 1e12 && !
|
|
285
|
+
if (t > 1e12 && !c)
|
|
276
286
|
return new Date(t).toLocaleDateString();
|
|
277
|
-
const b =
|
|
287
|
+
const b = c?.places, $ = c?.digitSeparator ?? !0;
|
|
278
288
|
if (b !== void 0) {
|
|
279
289
|
if (Number.isInteger(t) && b >= 0)
|
|
280
290
|
return String(t);
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
283
|
-
const B =
|
|
284
|
-
return
|
|
291
|
+
const E = t.toFixed(b);
|
|
292
|
+
if ($) {
|
|
293
|
+
const B = E.split("."), ee = B[0] || "0", Y = B[1], ie = ee.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
294
|
+
return Y ? `${ie}.${Y}` : ie;
|
|
285
295
|
}
|
|
286
|
-
return
|
|
296
|
+
return E;
|
|
287
297
|
}
|
|
288
|
-
return Number.isInteger(t) ? String(t) :
|
|
298
|
+
return Number.isInteger(t) ? String(t) : $ ? t.toLocaleString() : String(t);
|
|
289
299
|
}
|
|
290
300
|
return String(t);
|
|
291
301
|
}
|
|
292
|
-
function
|
|
293
|
-
const
|
|
302
|
+
function Ye(t) {
|
|
303
|
+
const c = /* @__PURE__ */ new Set();
|
|
294
304
|
return t.filter((s) => {
|
|
295
|
-
const
|
|
296
|
-
return
|
|
305
|
+
const $ = `${s.layer.id.replace(/-outline$/, "")}:${JSON.stringify(s.properties)}`;
|
|
306
|
+
return c.has($) ? !1 : (c.add($), !0);
|
|
297
307
|
});
|
|
298
308
|
}
|
|
299
|
-
function
|
|
300
|
-
const s =
|
|
309
|
+
function Le(t, c) {
|
|
310
|
+
const s = C.value[t];
|
|
301
311
|
if (!s?.features) return null;
|
|
302
|
-
const b =
|
|
312
|
+
const b = c.objectid ?? c.OBJECTID ?? c.FID;
|
|
303
313
|
if (b != null) {
|
|
304
|
-
const
|
|
305
|
-
(
|
|
314
|
+
const $ = s.features.find(
|
|
315
|
+
(E) => (E.properties?.objectid ?? E.properties?.OBJECTID ?? E.properties?.FID) === b
|
|
306
316
|
);
|
|
307
|
-
if (
|
|
317
|
+
if ($) return $.geometry;
|
|
308
318
|
}
|
|
309
319
|
return null;
|
|
310
320
|
}
|
|
311
|
-
function
|
|
321
|
+
function dt(t, c) {
|
|
312
322
|
const s = /* @__PURE__ */ new Map();
|
|
313
|
-
return
|
|
314
|
-
s.set(b.id,
|
|
315
|
-
}), t.sort((b,
|
|
316
|
-
const
|
|
317
|
-
return (s.get(B) ?? -1) -
|
|
323
|
+
return c.forEach((b, $) => {
|
|
324
|
+
s.set(b.id, $);
|
|
325
|
+
}), t.sort((b, $) => {
|
|
326
|
+
const E = b.layer.id.replace(/-outline$/, ""), B = $.layer.id.replace(/-outline$/, ""), ee = s.get(E) ?? -1;
|
|
327
|
+
return (s.get(B) ?? -1) - ee;
|
|
318
328
|
});
|
|
319
329
|
}
|
|
320
|
-
function
|
|
321
|
-
const
|
|
322
|
-
if (!
|
|
330
|
+
function le(t) {
|
|
331
|
+
const c = n.value;
|
|
332
|
+
if (!c) return;
|
|
323
333
|
const s = [];
|
|
324
334
|
l.layerList.forEach((A) => {
|
|
325
|
-
const
|
|
326
|
-
|
|
335
|
+
const j = A.config;
|
|
336
|
+
F(j.id) && (s.push(j.id), j.outlinePaint && s.push(`${j.id}-outline`));
|
|
327
337
|
});
|
|
328
|
-
const b =
|
|
329
|
-
|
|
338
|
+
const b = s.filter((A) => c.getLayer(A));
|
|
339
|
+
if (b.length === 0) return;
|
|
340
|
+
const $ = c.project([t.lngLat.lng, t.lngLat.lat]), E = c.queryRenderedFeatures($, {
|
|
341
|
+
layers: b
|
|
330
342
|
});
|
|
331
|
-
if (
|
|
332
|
-
const
|
|
333
|
-
const
|
|
343
|
+
if (E.length === 0) return;
|
|
344
|
+
const B = Ye(E), ee = l.layerList.map((A) => A.config), ie = dt(B, ee).map((A) => {
|
|
345
|
+
const j = A.layer.id.replace(/-outline$/, ""), N = De(j);
|
|
334
346
|
if (!N) return null;
|
|
335
|
-
const
|
|
347
|
+
const ue = Le(N.id, A.properties || {});
|
|
336
348
|
return {
|
|
337
349
|
layerId: N.id,
|
|
338
350
|
layerTitle: N.title,
|
|
339
351
|
properties: A.properties || {},
|
|
340
|
-
geometry:
|
|
352
|
+
geometry: ue || A.geometry,
|
|
341
353
|
popupConfig: N.popup
|
|
342
354
|
};
|
|
343
355
|
}).filter((A) => A !== null);
|
|
344
|
-
if (
|
|
345
|
-
|
|
346
|
-
const N = A.popupConfig?.popupSortField,
|
|
347
|
-
if (!N || N !==
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
350
|
-
const
|
|
351
|
-
return
|
|
352
|
-
}),
|
|
353
|
-
const oe =
|
|
356
|
+
if (ie.length === 0) return;
|
|
357
|
+
ie.sort((A, j) => {
|
|
358
|
+
const N = A.popupConfig?.popupSortField, ue = j.popupConfig?.popupSortField;
|
|
359
|
+
if (!N || N !== ue) return 0;
|
|
360
|
+
const pt = A.properties[N], yt = j.properties[N];
|
|
361
|
+
if (pt == null || yt == null) return 0;
|
|
362
|
+
const xt = A.popupConfig?.popupSortOrder !== "asc";
|
|
363
|
+
return pt < yt ? xt ? 1 : -1 : pt > yt ? xt ? -1 : 1 : 0;
|
|
364
|
+
}), ce.value = ie, ae.value = 0, Fe.value = [t.lngLat.lng, t.lngLat.lat];
|
|
365
|
+
const oe = ie[0];
|
|
354
366
|
if (oe) {
|
|
355
|
-
const A =
|
|
367
|
+
const A = De(oe.layerId);
|
|
356
368
|
if (A) {
|
|
357
|
-
const
|
|
358
|
-
|
|
369
|
+
const j = K(oe.geometry), N = W(A.id, A.type);
|
|
370
|
+
x.value = {
|
|
359
371
|
geometry: oe.geometry,
|
|
360
|
-
geometryType:
|
|
372
|
+
geometryType: j,
|
|
361
373
|
layerId: A.id,
|
|
362
374
|
properties: oe.properties,
|
|
363
375
|
originalStyle: N
|
|
@@ -365,139 +377,139 @@ const io = { class: "map-panel" }, lo = /* @__PURE__ */ ye({
|
|
|
365
377
|
}
|
|
366
378
|
}
|
|
367
379
|
}
|
|
368
|
-
function
|
|
369
|
-
|
|
380
|
+
function Te() {
|
|
381
|
+
ce.value = [], Fe.value = null, ae.value = 0, x.value = null;
|
|
370
382
|
}
|
|
371
|
-
function
|
|
372
|
-
if (
|
|
373
|
-
const
|
|
374
|
-
if (!(
|
|
383
|
+
function Ie(t) {
|
|
384
|
+
if (ce.value.length === 0) return;
|
|
385
|
+
const c = t.target;
|
|
386
|
+
if (!(c.tagName === "INPUT" || c.tagName === "TEXTAREA" || c.isContentEditable))
|
|
375
387
|
switch (t.key) {
|
|
376
388
|
case "ArrowLeft":
|
|
377
389
|
case "ArrowUp":
|
|
378
|
-
t.preventDefault(),
|
|
390
|
+
t.preventDefault(), et();
|
|
379
391
|
break;
|
|
380
392
|
case "ArrowRight":
|
|
381
393
|
case "ArrowDown":
|
|
382
|
-
t.preventDefault(),
|
|
394
|
+
t.preventDefault(), pe();
|
|
383
395
|
break;
|
|
384
396
|
case "Escape":
|
|
385
|
-
t.preventDefault(),
|
|
397
|
+
t.preventDefault(), Te();
|
|
386
398
|
break;
|
|
387
399
|
}
|
|
388
400
|
}
|
|
389
|
-
|
|
390
|
-
window.addEventListener("keydown",
|
|
391
|
-
}),
|
|
392
|
-
window.removeEventListener("keydown",
|
|
401
|
+
it(() => {
|
|
402
|
+
window.addEventListener("keydown", Ie);
|
|
403
|
+
}), At(() => {
|
|
404
|
+
window.removeEventListener("keydown", Ie);
|
|
393
405
|
});
|
|
394
|
-
function
|
|
395
|
-
const t =
|
|
406
|
+
function pe() {
|
|
407
|
+
const t = ce.value.length;
|
|
396
408
|
t <= 1 || ae.value >= t - 1 || (ae.value = ae.value + 1);
|
|
397
409
|
}
|
|
398
|
-
function
|
|
399
|
-
|
|
410
|
+
function et() {
|
|
411
|
+
ce.value.length <= 1 || ae.value <= 0 || (ae.value = ae.value - 1);
|
|
400
412
|
}
|
|
401
|
-
const
|
|
402
|
-
const t =
|
|
403
|
-
return !t || !t.popupConfig ? t?.layerTitle || "" :
|
|
404
|
-
}),
|
|
405
|
-
const t =
|
|
413
|
+
const ne = _(() => ce.value.length === 0 ? null : ce.value[ae.value]), _e = _(() => {
|
|
414
|
+
const t = ne.value;
|
|
415
|
+
return !t || !t.popupConfig ? t?.layerTitle || "" : Xe(t.popupConfig.title, t.properties);
|
|
416
|
+
}), Re = _(() => {
|
|
417
|
+
const t = ne.value;
|
|
406
418
|
if (!t) return "";
|
|
407
|
-
let
|
|
408
|
-
if (
|
|
409
|
-
|
|
419
|
+
let c = '<div class="popup-content">';
|
|
420
|
+
if (c += `<h3 class="popup-title">${be(_e.value)}</h3>`, t.popupConfig?.fields?.length) {
|
|
421
|
+
c += `<table class="popup-table" aria-label="${be(_e.value)}">`;
|
|
410
422
|
for (const s of t.popupConfig.fields) {
|
|
411
|
-
const b =
|
|
412
|
-
|
|
423
|
+
const b = qe(t.properties[s.field], s.format, t.popupConfig.showTime), $ = s.label.toLowerCase(), E = $.includes("url") || $.includes("website"), B = b.startsWith("http://") || b.startsWith("https://") || b.startsWith("www.") || E && b.includes("."), ee = b.startsWith("http://") || b.startsWith("https://") ? b : `https://${b}`, Y = B ? `<a href="${be(ee)}" target="_blank" rel="noopener noreferrer">${be(b)}</a>` : be(b);
|
|
424
|
+
c += `<tr><th scope="row">${be(s.label)}</th><td>${Y}</td></tr>`;
|
|
413
425
|
}
|
|
414
|
-
|
|
426
|
+
c += "</table>";
|
|
415
427
|
}
|
|
416
|
-
return
|
|
417
|
-
}),
|
|
428
|
+
return c += "</div>", c;
|
|
429
|
+
}), re = k({
|
|
418
430
|
type: "FeatureCollection",
|
|
419
431
|
features: []
|
|
420
|
-
}),
|
|
432
|
+
}), Ae = k({
|
|
421
433
|
type: "FeatureCollection",
|
|
422
434
|
features: []
|
|
423
|
-
}),
|
|
435
|
+
}), Be = k({
|
|
424
436
|
type: "FeatureCollection",
|
|
425
437
|
features: []
|
|
426
|
-
}),
|
|
438
|
+
}), ft = {
|
|
427
439
|
"circle-radius": ["get", "highlightRadius"],
|
|
428
440
|
"circle-color": "#00FFFF",
|
|
429
441
|
"circle-opacity": 0.8,
|
|
430
442
|
"circle-stroke-width": 2,
|
|
431
443
|
"circle-stroke-color": "#FFFFFF"
|
|
432
|
-
},
|
|
444
|
+
}, tt = {
|
|
433
445
|
"line-width": ["get", "highlightWidth"],
|
|
434
446
|
"line-color": "#00FFFF",
|
|
435
447
|
"line-opacity": 0.9
|
|
436
|
-
},
|
|
448
|
+
}, v = {
|
|
437
449
|
"fill-color": "#808080",
|
|
438
450
|
"fill-opacity": 0.5
|
|
439
|
-
},
|
|
440
|
-
function
|
|
451
|
+
}, x = k(null);
|
|
452
|
+
function K(t) {
|
|
441
453
|
return t.type;
|
|
442
454
|
}
|
|
443
|
-
function
|
|
444
|
-
const s =
|
|
455
|
+
function W(t, c) {
|
|
456
|
+
const s = De(t);
|
|
445
457
|
if (!s) return { radius: 5, width: 2 };
|
|
446
458
|
const b = s.paint || {};
|
|
447
|
-
if (
|
|
448
|
-
const
|
|
449
|
-
return typeof
|
|
459
|
+
if (c === "circle") {
|
|
460
|
+
const $ = b["circle-radius"];
|
|
461
|
+
return typeof $ == "number" ? { radius: $ } : { radius: 5 };
|
|
450
462
|
}
|
|
451
|
-
if (
|
|
452
|
-
const
|
|
453
|
-
if (typeof
|
|
454
|
-
return { width:
|
|
463
|
+
if (c === "line" || c === "fill") {
|
|
464
|
+
const $ = b["line-width"];
|
|
465
|
+
if (typeof $ == "number")
|
|
466
|
+
return { width: $ };
|
|
455
467
|
if (s.outlinePaint && s.outlinePaint["line-width"]) {
|
|
456
|
-
const
|
|
457
|
-
if (typeof
|
|
458
|
-
return { width:
|
|
468
|
+
const E = s.outlinePaint["line-width"];
|
|
469
|
+
if (typeof E == "number")
|
|
470
|
+
return { width: E };
|
|
459
471
|
}
|
|
460
472
|
return { width: 2 };
|
|
461
473
|
}
|
|
462
474
|
return { radius: 5, width: 2 };
|
|
463
475
|
}
|
|
464
|
-
function
|
|
476
|
+
function Q(t) {
|
|
465
477
|
return !t || t.length === 0 ? [] : t[0] ?? [];
|
|
466
478
|
}
|
|
467
|
-
function
|
|
468
|
-
const { geometry:
|
|
479
|
+
function Se(t) {
|
|
480
|
+
const { geometry: c, geometryType: s, originalStyle: b } = t;
|
|
469
481
|
if (s === "Point" || s === "MultiPoint") {
|
|
470
|
-
const
|
|
482
|
+
const E = (b.radius || 5) + 3;
|
|
471
483
|
return {
|
|
472
484
|
type: "FeatureCollection",
|
|
473
485
|
features: [
|
|
474
486
|
{
|
|
475
487
|
type: "Feature",
|
|
476
|
-
geometry:
|
|
488
|
+
geometry: c,
|
|
477
489
|
properties: {
|
|
478
|
-
highlightRadius:
|
|
490
|
+
highlightRadius: E
|
|
479
491
|
}
|
|
480
492
|
}
|
|
481
493
|
]
|
|
482
494
|
};
|
|
483
495
|
}
|
|
484
496
|
if (s === "LineString" || s === "MultiLineString") {
|
|
485
|
-
const
|
|
497
|
+
const E = (b.width || 2) + 3;
|
|
486
498
|
return {
|
|
487
499
|
type: "FeatureCollection",
|
|
488
500
|
features: [
|
|
489
501
|
{
|
|
490
502
|
type: "Feature",
|
|
491
|
-
geometry:
|
|
503
|
+
geometry: c,
|
|
492
504
|
properties: {
|
|
493
|
-
highlightWidth:
|
|
505
|
+
highlightWidth: E
|
|
494
506
|
}
|
|
495
507
|
}
|
|
496
508
|
]
|
|
497
509
|
};
|
|
498
510
|
}
|
|
499
511
|
if (s === "Polygon") {
|
|
500
|
-
const
|
|
512
|
+
const $ = c.coordinates, E = Q($), ee = (b.width || 2) + 3;
|
|
501
513
|
return {
|
|
502
514
|
type: "FeatureCollection",
|
|
503
515
|
features: [
|
|
@@ -505,24 +517,24 @@ const io = { class: "map-panel" }, lo = /* @__PURE__ */ ye({
|
|
|
505
517
|
type: "Feature",
|
|
506
518
|
geometry: {
|
|
507
519
|
type: "LineString",
|
|
508
|
-
coordinates:
|
|
520
|
+
coordinates: E
|
|
509
521
|
},
|
|
510
522
|
properties: {
|
|
511
|
-
highlightWidth:
|
|
523
|
+
highlightWidth: ee
|
|
512
524
|
}
|
|
513
525
|
}
|
|
514
526
|
]
|
|
515
527
|
};
|
|
516
528
|
}
|
|
517
529
|
if (s === "MultiPolygon") {
|
|
518
|
-
const
|
|
530
|
+
const $ = c.coordinates, B = (b.width || 2) + 3;
|
|
519
531
|
return {
|
|
520
532
|
type: "FeatureCollection",
|
|
521
|
-
features:
|
|
533
|
+
features: $.map((Y) => ({
|
|
522
534
|
type: "Feature",
|
|
523
535
|
geometry: {
|
|
524
536
|
type: "LineString",
|
|
525
|
-
coordinates:
|
|
537
|
+
coordinates: Q(Y)
|
|
526
538
|
},
|
|
527
539
|
properties: {
|
|
528
540
|
highlightWidth: B
|
|
@@ -535,57 +547,57 @@ const io = { class: "map-panel" }, lo = /* @__PURE__ */ ye({
|
|
|
535
547
|
features: []
|
|
536
548
|
};
|
|
537
549
|
}
|
|
538
|
-
function
|
|
539
|
-
const { geometry:
|
|
550
|
+
function Ve(t) {
|
|
551
|
+
const { geometry: c, geometryType: s } = t;
|
|
540
552
|
return s === "Polygon" || s === "MultiPolygon" ? {
|
|
541
553
|
type: "FeatureCollection",
|
|
542
|
-
features: [{ type: "Feature", geometry:
|
|
554
|
+
features: [{ type: "Feature", geometry: c, properties: {} }]
|
|
543
555
|
} : { type: "FeatureCollection", features: [] };
|
|
544
556
|
}
|
|
545
|
-
function
|
|
557
|
+
function jt(t) {
|
|
546
558
|
if (!t) {
|
|
547
|
-
|
|
559
|
+
qt();
|
|
548
560
|
return;
|
|
549
561
|
}
|
|
550
|
-
const
|
|
551
|
-
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (
|
|
562
|
+
const c = Se(t);
|
|
563
|
+
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (re.value = c, Ae.value = { type: "FeatureCollection", features: [] }, Be.value = { type: "FeatureCollection", features: [] }) : (Ae.value = c, re.value = { type: "FeatureCollection", features: [] }, Be.value = Ve(t));
|
|
552
564
|
}
|
|
553
|
-
function
|
|
554
|
-
|
|
565
|
+
function qt() {
|
|
566
|
+
re.value = { type: "FeatureCollection", features: [] }, Ae.value = { type: "FeatureCollection", features: [] }, Be.value = { type: "FeatureCollection", features: [] };
|
|
555
567
|
}
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}),
|
|
568
|
+
Ee(x, (t) => {
|
|
569
|
+
jt(t);
|
|
570
|
+
}), Ee(
|
|
559
571
|
() => l.visibleLayers,
|
|
560
572
|
(t) => {
|
|
561
|
-
|
|
573
|
+
x.value && !t.has(x.value.layerId) && (x.value = null, Te());
|
|
562
574
|
},
|
|
563
575
|
{ deep: !0 }
|
|
564
|
-
),
|
|
565
|
-
const t =
|
|
576
|
+
), Ee(ae, () => {
|
|
577
|
+
const t = ne.value;
|
|
566
578
|
if (!t) {
|
|
567
|
-
|
|
579
|
+
x.value = null;
|
|
568
580
|
return;
|
|
569
581
|
}
|
|
570
|
-
const
|
|
571
|
-
if (
|
|
572
|
-
const s =
|
|
573
|
-
|
|
582
|
+
const c = De(t.layerId);
|
|
583
|
+
if (c) {
|
|
584
|
+
const s = K(t.geometry), b = W(c.id, c.type);
|
|
585
|
+
x.value = {
|
|
574
586
|
geometry: t.geometry,
|
|
575
587
|
geometryType: s,
|
|
576
|
-
layerId:
|
|
588
|
+
layerId: c.id,
|
|
577
589
|
properties: t.properties,
|
|
578
590
|
originalStyle: b
|
|
579
591
|
};
|
|
580
592
|
}
|
|
581
593
|
});
|
|
582
|
-
const
|
|
583
|
-
function
|
|
584
|
-
const [
|
|
585
|
-
|
|
594
|
+
const kt = k(null);
|
|
595
|
+
function Gt(t) {
|
|
596
|
+
const [c, s] = t.geometry.coordinates;
|
|
597
|
+
kt.value = [c, s];
|
|
586
598
|
}
|
|
587
|
-
return (t,
|
|
588
|
-
|
|
599
|
+
return (t, c) => (m(), M("div", no, [
|
|
600
|
+
J(f(to), {
|
|
589
601
|
ref_key: "mapRef",
|
|
590
602
|
ref: r,
|
|
591
603
|
zoom: l.initialZoom,
|
|
@@ -603,124 +615,124 @@ const io = { class: "map-panel" }, lo = /* @__PURE__ */ ye({
|
|
|
603
615
|
"tool-panel-layout": "vertical",
|
|
604
616
|
"tool-panel-split-ratio": 50,
|
|
605
617
|
onZoom: w,
|
|
606
|
-
onClick:
|
|
607
|
-
onMoveend:
|
|
608
|
-
onLoad:
|
|
609
|
-
onSearchResult:
|
|
618
|
+
onClick: Te,
|
|
619
|
+
onMoveend: S,
|
|
620
|
+
onLoad: I,
|
|
621
|
+
onSearchResult: Gt
|
|
610
622
|
}, {
|
|
611
623
|
default: Ge(() => [
|
|
612
|
-
l.drawControlPosition !== null ? (m(),
|
|
624
|
+
l.drawControlPosition !== null ? (m(), G(f(oo), {
|
|
613
625
|
key: 0,
|
|
614
626
|
position: l.drawControlPosition
|
|
615
627
|
}, null, 8, ["position"])) : R("", !0),
|
|
616
|
-
(m(!0),
|
|
628
|
+
(m(!0), M(de, null, we(ct.value, (s) => (m(), G(f(Ft), {
|
|
617
629
|
id: "tiled-" + s.id,
|
|
618
630
|
key: "tiled-" + s.id,
|
|
619
|
-
source:
|
|
620
|
-
paint: { "raster-opacity":
|
|
631
|
+
source: st(s),
|
|
632
|
+
paint: { "raster-opacity": fe(s.id) },
|
|
621
633
|
minzoom: s.minZoom,
|
|
622
634
|
maxzoom: s.maxZoom
|
|
623
635
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
624
|
-
(m(!0),
|
|
636
|
+
(m(!0), M(de, null, we(ze.value, (s) => (m(), G(f(Ft), {
|
|
625
637
|
id: "dynamic-" + s.id,
|
|
626
638
|
key: "dynamic-" + s.id,
|
|
627
|
-
source:
|
|
628
|
-
paint: { "raster-opacity":
|
|
639
|
+
source: We(s),
|
|
640
|
+
paint: { "raster-opacity": fe(s.id) },
|
|
629
641
|
minzoom: s.minZoom,
|
|
630
642
|
maxzoom: s.maxZoom
|
|
631
643
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
632
|
-
(m(!0),
|
|
644
|
+
(m(!0), M(de, null, we(T.value, (s) => (m(), G(f(Tt), {
|
|
633
645
|
id: s.id,
|
|
634
646
|
key: s.id,
|
|
635
|
-
source:
|
|
636
|
-
paint:
|
|
647
|
+
source: $e(s),
|
|
648
|
+
paint: je(s),
|
|
637
649
|
minzoom: s.minZoom,
|
|
638
650
|
maxzoom: s.maxZoom,
|
|
639
651
|
"before-id": "highlight-circles",
|
|
640
|
-
onClick:
|
|
652
|
+
onClick: le
|
|
641
653
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
642
|
-
(m(!0),
|
|
654
|
+
(m(!0), M(de, null, we(O.value, (s) => (m(), G(f(It), {
|
|
643
655
|
id: s.id,
|
|
644
656
|
key: s.id,
|
|
645
|
-
source:
|
|
646
|
-
paint:
|
|
657
|
+
source: $e(s),
|
|
658
|
+
paint: je(s),
|
|
647
659
|
minzoom: s.minZoom,
|
|
648
660
|
maxzoom: s.maxZoom,
|
|
649
661
|
"before-id": "highlight-circles",
|
|
650
|
-
onClick:
|
|
662
|
+
onClick: le
|
|
651
663
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
652
|
-
(m(!0),
|
|
664
|
+
(m(!0), M(de, null, we(D.value, (s) => (m(), G(f(mt), {
|
|
653
665
|
id: s.id + "-outline",
|
|
654
666
|
key: s.id + "-outline",
|
|
655
|
-
source:
|
|
656
|
-
paint:
|
|
667
|
+
source: $e(s),
|
|
668
|
+
paint: ut(s),
|
|
657
669
|
minzoom: s.minZoom,
|
|
658
670
|
maxzoom: s.maxZoom,
|
|
659
671
|
"before-id": "highlight-lines",
|
|
660
|
-
onClick:
|
|
672
|
+
onClick: le
|
|
661
673
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
662
|
-
(m(!0),
|
|
674
|
+
(m(!0), M(de, null, we(te.value, (s) => (m(), G(f(mt), {
|
|
663
675
|
id: s.id,
|
|
664
676
|
key: s.id,
|
|
665
|
-
source:
|
|
666
|
-
paint:
|
|
677
|
+
source: $e(s),
|
|
678
|
+
paint: je(s),
|
|
667
679
|
minzoom: s.minZoom,
|
|
668
680
|
maxzoom: s.maxZoom,
|
|
669
681
|
"before-id": "highlight-lines",
|
|
670
|
-
onClick:
|
|
682
|
+
onClick: le
|
|
671
683
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
672
|
-
|
|
684
|
+
J(f(Tt), {
|
|
673
685
|
id: "highlight-circles",
|
|
674
686
|
key: "highlight-circles-layer",
|
|
675
|
-
source: { type: "geojson", data:
|
|
676
|
-
paint:
|
|
687
|
+
source: { type: "geojson", data: re.value },
|
|
688
|
+
paint: ft
|
|
677
689
|
}, null, 8, ["source"]),
|
|
678
|
-
|
|
690
|
+
J(f(It), {
|
|
679
691
|
id: "highlight-fill",
|
|
680
692
|
key: "highlight-fill-layer",
|
|
681
|
-
source: { type: "geojson", data:
|
|
682
|
-
paint:
|
|
693
|
+
source: { type: "geojson", data: Be.value },
|
|
694
|
+
paint: v
|
|
683
695
|
}, null, 8, ["source"]),
|
|
684
|
-
|
|
696
|
+
J(f(mt), {
|
|
685
697
|
id: "highlight-lines",
|
|
686
698
|
key: "highlight-lines-layer",
|
|
687
|
-
source: { type: "geojson", data:
|
|
688
|
-
paint:
|
|
699
|
+
source: { type: "geojson", data: Ae.value },
|
|
700
|
+
paint: tt
|
|
689
701
|
}, null, 8, ["source"]),
|
|
690
|
-
|
|
691
|
-
"lng-lat":
|
|
702
|
+
J(f(ao), {
|
|
703
|
+
"lng-lat": kt.value,
|
|
692
704
|
color: "#2176d2"
|
|
693
705
|
}, null, 8, ["lng-lat"]),
|
|
694
|
-
|
|
706
|
+
ne.value && Fe.value ? (m(), G(f(io), {
|
|
695
707
|
key: 1,
|
|
696
|
-
"lng-lat":
|
|
697
|
-
html:
|
|
708
|
+
"lng-lat": Fe.value,
|
|
709
|
+
html: Re.value,
|
|
698
710
|
"close-on-click": !1,
|
|
699
711
|
offset: [0, -15],
|
|
700
|
-
"show-navigation":
|
|
712
|
+
"show-navigation": ce.value.length > 1,
|
|
701
713
|
"current-feature-index": ae.value,
|
|
702
|
-
"total-features":
|
|
703
|
-
"layer-name":
|
|
704
|
-
onClose:
|
|
705
|
-
onNext:
|
|
706
|
-
onPrevious:
|
|
714
|
+
"total-features": ce.value.length,
|
|
715
|
+
"layer-name": ne.value.layerTitle,
|
|
716
|
+
onClose: Te,
|
|
717
|
+
onNext: pe,
|
|
718
|
+
onPrevious: et
|
|
707
719
|
}, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) : R("", !0)
|
|
708
720
|
]),
|
|
709
721
|
_: 1
|
|
710
722
|
}, 8, ["zoom", "center", "navigation-controls", "geolocation-control", "basemap-change-controls", "map-search-control", "cyclomedia-config", "cyclomedia-button-position", "pictometry-credentials", "pictometry-button-position"])
|
|
711
723
|
]));
|
|
712
724
|
}
|
|
713
|
-
}),
|
|
725
|
+
}), xe = (e, i) => {
|
|
714
726
|
const l = e.__vccOpts || e;
|
|
715
727
|
for (const [o, r] of i)
|
|
716
728
|
l[o] = r;
|
|
717
729
|
return l;
|
|
718
|
-
},
|
|
719
|
-
function
|
|
730
|
+
}, so = /* @__PURE__ */ xe(ro, [["__scopeId", "data-v-7b0b7505"]]);
|
|
731
|
+
function Vt(e) {
|
|
720
732
|
let i = e.split("?")[0] || e;
|
|
721
733
|
return i = i.replace(/\/query$/, ""), i = i.replace(/\/$/, ""), i.toLowerCase();
|
|
722
734
|
}
|
|
723
|
-
const
|
|
735
|
+
const co = ["disabled"], uo = /* @__PURE__ */ ge({
|
|
724
736
|
inheritAttrs: !1,
|
|
725
737
|
__name: "PhlButton",
|
|
726
738
|
props: {
|
|
@@ -742,14 +754,14 @@ const ro = ["disabled"], so = /* @__PURE__ */ ye({
|
|
|
742
754
|
svgRaw: {}
|
|
743
755
|
},
|
|
744
756
|
setup(e) {
|
|
745
|
-
const i = e, l = (
|
|
757
|
+
const i = e, l = (u) => "href" in u && u.href !== void 0 || "to" in u && u.to !== void 0, o = _(() => gt(
|
|
746
758
|
"phila-button",
|
|
747
759
|
`phila-button--${i.variant}`,
|
|
748
760
|
i.size && `is-${i.size}`,
|
|
749
761
|
i.iconOnly && "icon-button",
|
|
750
762
|
i.iconOnly && i.variant === "standard" && "icon-button--standard",
|
|
751
763
|
i.className
|
|
752
|
-
)), r =
|
|
764
|
+
)), r = _(() => l(i) ? "to" in i && i.to !== void 0 ? {
|
|
753
765
|
to: i.to,
|
|
754
766
|
disabled: i.disabled,
|
|
755
767
|
className: o.value
|
|
@@ -759,7 +771,7 @@ const ro = ["disabled"], so = /* @__PURE__ */ ye({
|
|
|
759
771
|
rel: i.rel,
|
|
760
772
|
disabled: i.disabled,
|
|
761
773
|
className: o.value
|
|
762
|
-
} : {}), n =
|
|
774
|
+
} : {}), n = _(
|
|
763
775
|
() => ({
|
|
764
776
|
iconDefinition: i.iconDefinition,
|
|
765
777
|
iconClass: i.iconClass,
|
|
@@ -770,51 +782,51 @@ const ro = ["disabled"], so = /* @__PURE__ */ ye({
|
|
|
770
782
|
size: i.size
|
|
771
783
|
})
|
|
772
784
|
);
|
|
773
|
-
return (
|
|
785
|
+
return (u, w) => l(i) ? (m(), G(f(lo), ht({ key: 0 }, { ...r.value, ...u.$attrs }, { role: "button" }), {
|
|
774
786
|
default: Ge(() => [
|
|
775
|
-
|
|
787
|
+
J(f(Et), $t(Mt(n.value)), {
|
|
776
788
|
default: Ge(() => [
|
|
777
|
-
|
|
778
|
-
|
|
789
|
+
me(u.$slots, "default", {}, () => [
|
|
790
|
+
ke(H(i.text), 1)
|
|
779
791
|
])
|
|
780
792
|
]),
|
|
781
793
|
_: 3
|
|
782
794
|
}, 16)
|
|
783
795
|
]),
|
|
784
796
|
_: 3
|
|
785
|
-
}, 16)) : (m(),
|
|
797
|
+
}, 16)) : (m(), M("button", ht({
|
|
786
798
|
key: 1,
|
|
787
799
|
type: "button",
|
|
788
800
|
disabled: i.disabled,
|
|
789
801
|
class: o.value
|
|
790
|
-
},
|
|
791
|
-
|
|
802
|
+
}, u.$attrs), [
|
|
803
|
+
J(f(Et), $t(Mt(n.value)), {
|
|
792
804
|
default: Ge(() => [
|
|
793
|
-
|
|
794
|
-
|
|
805
|
+
me(u.$slots, "default", {}, () => [
|
|
806
|
+
ke(H(i.text), 1)
|
|
795
807
|
])
|
|
796
808
|
]),
|
|
797
809
|
_: 3
|
|
798
810
|
}, 16)
|
|
799
|
-
], 16,
|
|
811
|
+
], 16, co));
|
|
800
812
|
}
|
|
801
813
|
});
|
|
802
|
-
var
|
|
814
|
+
var fo = {
|
|
803
815
|
prefix: "fas",
|
|
804
816
|
iconName: "circle-exclamation",
|
|
805
817
|
icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]
|
|
806
|
-
},
|
|
818
|
+
}, po = fo, yo = {
|
|
807
819
|
prefix: "fas",
|
|
808
820
|
iconName: "xmark",
|
|
809
821
|
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
|
|
810
|
-
},
|
|
811
|
-
const
|
|
822
|
+
}, mo = yo;
|
|
823
|
+
const ho = ["for"], go = { class: "state-layer" }, vo = { class: "content" }, bo = { class: "input-text-container" }, wo = ["id", "placeholder", "aria-label"], Lo = {
|
|
812
824
|
key: 1,
|
|
813
825
|
class: "has-text-body-small phila-supporting-text"
|
|
814
|
-
},
|
|
826
|
+
}, So = {
|
|
815
827
|
key: 2,
|
|
816
828
|
class: "has-text-body-small phila-error-text"
|
|
817
|
-
},
|
|
829
|
+
}, Co = /* @__PURE__ */ ge({
|
|
818
830
|
inheritAttrs: !1,
|
|
819
831
|
__name: "TextField",
|
|
820
832
|
props: {
|
|
@@ -832,97 +844,97 @@ const yo = ["for"], mo = { class: "state-layer" }, ho = { class: "content" }, go
|
|
|
832
844
|
},
|
|
833
845
|
emits: ["update:modelValue"],
|
|
834
846
|
setup(e, { emit: i }) {
|
|
835
|
-
const l =
|
|
847
|
+
const l = Ht(), o = e, r = _(() => typeof o.error == "string" ? o.error : o.error[0]), n = Jt(o, "id"), u = i, w = k(""), p = _({
|
|
836
848
|
get: () => o.modelValue !== void 0 ? o.modelValue : w.value,
|
|
837
|
-
set: (
|
|
838
|
-
|
|
849
|
+
set: (d) => {
|
|
850
|
+
u("update:modelValue", d), w.value = d;
|
|
839
851
|
}
|
|
840
|
-
}),
|
|
841
|
-
const
|
|
842
|
-
return l.disabled != null &&
|
|
843
|
-
}),
|
|
844
|
-
const
|
|
845
|
-
return p.value !== "" &&
|
|
846
|
-
}),
|
|
852
|
+
}), C = _(() => {
|
|
853
|
+
const d = ["default-class"];
|
|
854
|
+
return l.disabled != null && d.push("phila-input--disabled"), r.value && d.push("phila-input--error"), l.required != null && d.push("phila-input--required"), gt(...d);
|
|
855
|
+
}), y = _(() => {
|
|
856
|
+
const d = [];
|
|
857
|
+
return p.value !== "" && d.push("phila-text-field--filled"), o.className && d.push(o.className), gt(...d);
|
|
858
|
+
}), h = _(() => {
|
|
847
859
|
if (!(o.label || l["aria-label"]))
|
|
848
860
|
return o.placeholder || void 0;
|
|
849
|
-
}), a = k(null),
|
|
850
|
-
|
|
861
|
+
}), a = k(null), g = (d) => {
|
|
862
|
+
d.target.closest("button") || a.value?.focus();
|
|
851
863
|
};
|
|
852
|
-
return (
|
|
853
|
-
class:
|
|
864
|
+
return (d, L) => (m(), M("div", {
|
|
865
|
+
class: se(["phila-input", C.value])
|
|
854
866
|
}, [
|
|
855
|
-
o.label ? (m(),
|
|
867
|
+
o.label ? (m(), M("label", {
|
|
856
868
|
key: 0,
|
|
857
869
|
for: n.value,
|
|
858
870
|
class: "has-text-label-small phila-label"
|
|
859
|
-
},
|
|
871
|
+
}, H(o.label), 9, ho)) : R("", !0),
|
|
860
872
|
P("div", {
|
|
861
|
-
class:
|
|
862
|
-
onClick:
|
|
873
|
+
class: se(["phila-text-field", y.value]),
|
|
874
|
+
onClick: g
|
|
863
875
|
}, [
|
|
864
|
-
P("div",
|
|
865
|
-
o.leadingIcon ? (m(),
|
|
876
|
+
P("div", go, [
|
|
877
|
+
o.leadingIcon ? (m(), G(f(Ce), {
|
|
866
878
|
key: 0,
|
|
867
879
|
"icon-class": o.leadingIcon,
|
|
868
880
|
inline: "",
|
|
869
881
|
decorative: ""
|
|
870
882
|
}, null, 8, ["icon-class"])) : R("", !0),
|
|
871
|
-
P("div",
|
|
872
|
-
P("div",
|
|
873
|
-
|
|
883
|
+
P("div", vo, [
|
|
884
|
+
P("div", bo, [
|
|
885
|
+
Bt(P("input", ht({
|
|
874
886
|
id: n.value,
|
|
875
887
|
ref_key: "inputRef",
|
|
876
888
|
ref: a,
|
|
877
889
|
"onUpdate:modelValue": L[0] || (L[0] = (S) => p.value = S),
|
|
878
890
|
class: "phila-text-field-input has-text-body-default",
|
|
879
891
|
placeholder: o.placeholder,
|
|
880
|
-
"aria-label":
|
|
881
|
-
},
|
|
882
|
-
[
|
|
892
|
+
"aria-label": h.value
|
|
893
|
+
}, f(l)), null, 16, wo), [
|
|
894
|
+
[Kt, p.value]
|
|
883
895
|
])
|
|
884
896
|
])
|
|
885
897
|
]),
|
|
886
|
-
p.value != "" ? (m(),
|
|
898
|
+
p.value != "" ? (m(), G(f(uo), {
|
|
887
899
|
key: 1,
|
|
888
900
|
variant: "standard",
|
|
889
901
|
size: "small",
|
|
890
902
|
"icon-only": "",
|
|
891
|
-
"icon-definition":
|
|
903
|
+
"icon-definition": f(mo),
|
|
892
904
|
onClick: L[1] || (L[1] = (S) => p.value = "")
|
|
893
905
|
}, null, 8, ["icon-definition"])) : R("", !0),
|
|
894
|
-
o.trailingIcon ? (m(),
|
|
906
|
+
o.trailingIcon ? (m(), G(f(Ce), {
|
|
895
907
|
key: 2,
|
|
896
908
|
size: "small",
|
|
897
909
|
"icon-class": o.trailingIcon,
|
|
898
910
|
inline: "",
|
|
899
911
|
decorative: ""
|
|
900
912
|
}, null, 8, ["icon-class"])) : R("", !0),
|
|
901
|
-
|
|
913
|
+
me(d.$slots, "trailing-action")
|
|
902
914
|
])
|
|
903
915
|
], 2),
|
|
904
|
-
o.supportingText ? (m(),
|
|
905
|
-
r.value ? (m(),
|
|
906
|
-
|
|
907
|
-
"icon-definition":
|
|
916
|
+
o.supportingText ? (m(), M("div", Lo, H(o.supportingText), 1)) : R("", !0),
|
|
917
|
+
r.value ? (m(), M("div", So, [
|
|
918
|
+
J(f(Ce), {
|
|
919
|
+
"icon-definition": f(po),
|
|
908
920
|
size: "small",
|
|
909
921
|
inline: "",
|
|
910
922
|
decorative: ""
|
|
911
923
|
}, null, 8, ["icon-definition"]),
|
|
912
|
-
|
|
924
|
+
ke(" " + H(r.value), 1)
|
|
913
925
|
])) : R("", !0)
|
|
914
926
|
], 2));
|
|
915
927
|
}
|
|
916
928
|
});
|
|
917
|
-
var
|
|
929
|
+
var ko = {
|
|
918
930
|
prefix: "fas",
|
|
919
931
|
iconName: "filter",
|
|
920
932
|
icon: [512, 512, [], "f0b0", "M32 64C19.1 64 7.4 71.8 2.4 83.8S.2 109.5 9.4 118.6L192 301.3 192 416c0 8.5 3.4 16.6 9.4 22.6l64 64c9.2 9.2 22.9 11.9 34.9 6.9S320 492.9 320 480l0-178.7 182.6-182.6c9.2-9.2 11.9-22.9 6.9-34.9S492.9 64 480 64L32 64z"]
|
|
921
|
-
},
|
|
933
|
+
}, xo = {
|
|
922
934
|
prefix: "fas",
|
|
923
935
|
iconName: "caret-right",
|
|
924
936
|
icon: [256, 512, [], "f0da", "M249.3 235.8c10.2 12.6 9.5 31.1-2.2 42.8l-128 128c-9.2 9.2-22.9 11.9-34.9 6.9S64.5 396.9 64.5 384l0-256c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l128 128 2.2 2.4z"]
|
|
925
|
-
},
|
|
937
|
+
}, $o = {
|
|
926
938
|
prefix: "fas",
|
|
927
939
|
iconName: "caret-left",
|
|
928
940
|
icon: [256, 512, [], "f0d9", "M7.7 235.8c-10.3 12.6-9.5 31.1 2.2 42.8l128 128c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-256c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-128 128-2.2 2.4z"]
|
|
@@ -930,23 +942,23 @@ var So = {
|
|
|
930
942
|
prefix: "fas",
|
|
931
943
|
iconName: "xmark",
|
|
932
944
|
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
|
|
933
|
-
},
|
|
945
|
+
}, Mo = {
|
|
934
946
|
prefix: "fas",
|
|
935
947
|
iconName: "bars",
|
|
936
948
|
icon: [448, 512, ["navicon"], "f0c9", "M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]
|
|
937
|
-
},
|
|
949
|
+
}, Po = {
|
|
938
950
|
prefix: "fas",
|
|
939
951
|
iconName: "circle-info",
|
|
940
952
|
icon: [512, 512, ["info-circle"], "f05a", "M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]
|
|
941
953
|
};
|
|
942
|
-
const
|
|
954
|
+
const Fo = {
|
|
943
955
|
key: 0,
|
|
944
956
|
class: "loading-indicator",
|
|
945
957
|
role: "status"
|
|
946
|
-
},
|
|
958
|
+
}, To = ["aria-label"], Io = {
|
|
947
959
|
key: 2,
|
|
948
960
|
class: "zoom-indicator"
|
|
949
|
-
},
|
|
961
|
+
}, Eo = /* @__PURE__ */ ge({
|
|
950
962
|
__name: "LayerStatusIndicators",
|
|
951
963
|
props: {
|
|
952
964
|
loading: { type: Boolean },
|
|
@@ -954,18 +966,18 @@ const Mo = {
|
|
|
954
966
|
unavailable: { type: Boolean }
|
|
955
967
|
},
|
|
956
968
|
setup(e) {
|
|
957
|
-
return (i, l) => (m(),
|
|
958
|
-
e.loading && !e.unavailable ? (m(),
|
|
959
|
-
e.error ? (m(),
|
|
969
|
+
return (i, l) => (m(), M(de, null, [
|
|
970
|
+
e.loading && !e.unavailable ? (m(), M("span", Fo, " Loading... ")) : R("", !0),
|
|
971
|
+
e.error ? (m(), M("span", {
|
|
960
972
|
key: 1,
|
|
961
973
|
class: "error-indicator",
|
|
962
974
|
"aria-label": e.error,
|
|
963
975
|
role: "status"
|
|
964
|
-
}, " Error ", 8,
|
|
965
|
-
e.unavailable ? (m(),
|
|
976
|
+
}, " Error ", 8, To)) : R("", !0),
|
|
977
|
+
e.unavailable ? (m(), M("span", Io, " (zoom in) ")) : R("", !0)
|
|
966
978
|
], 64));
|
|
967
979
|
}
|
|
968
|
-
}),
|
|
980
|
+
}), lt = /* @__PURE__ */ xe(Eo, [["__scopeId", "data-v-19b1b402"]]), Oo = { class: "opacity-control" }, zo = ["for"], Do = ["id", "value", "aria-label"], _o = /* @__PURE__ */ ge({
|
|
969
981
|
__name: "LayerOpacitySlider",
|
|
970
982
|
props: {
|
|
971
983
|
layerId: {},
|
|
@@ -979,11 +991,11 @@ const Mo = {
|
|
|
979
991
|
const n = r.target;
|
|
980
992
|
l("update:opacity", parseFloat(n.value));
|
|
981
993
|
}
|
|
982
|
-
return (r, n) => (m(),
|
|
994
|
+
return (r, n) => (m(), M("div", Oo, [
|
|
983
995
|
P("label", {
|
|
984
996
|
class: "opacity-label",
|
|
985
997
|
for: "opacity-" + e.layerId
|
|
986
|
-
}, " Opacity: " +
|
|
998
|
+
}, " Opacity: " + H(Math.round(e.opacity * 100)) + "% ", 9, zo),
|
|
987
999
|
P("input", {
|
|
988
1000
|
id: "opacity-" + e.layerId,
|
|
989
1001
|
type: "range",
|
|
@@ -994,80 +1006,80 @@ const Mo = {
|
|
|
994
1006
|
"aria-label": "Opacity for " + e.layerName,
|
|
995
1007
|
class: "opacity-slider",
|
|
996
1008
|
onInput: o
|
|
997
|
-
}, null, 40,
|
|
1009
|
+
}, null, 40, Do)
|
|
998
1010
|
]));
|
|
999
1011
|
}
|
|
1000
|
-
}),
|
|
1012
|
+
}), bt = /* @__PURE__ */ xe(_o, [["__scopeId", "data-v-1a025f6a"]]), Ro = ["aria-label"], Ao = { class: "legend-label" }, Bo = /* @__PURE__ */ ge({
|
|
1001
1013
|
__name: "LayerLegend",
|
|
1002
1014
|
props: {
|
|
1003
1015
|
items: {},
|
|
1004
1016
|
label: {}
|
|
1005
1017
|
},
|
|
1006
1018
|
setup(e) {
|
|
1007
|
-
return (i, l) => (m(),
|
|
1019
|
+
return (i, l) => (m(), M("ul", {
|
|
1008
1020
|
class: "layer-legend",
|
|
1009
1021
|
"aria-label": e.label
|
|
1010
1022
|
}, [
|
|
1011
|
-
(m(!0),
|
|
1023
|
+
(m(!0), M(de, null, we(e.items, (o, r) => (m(), M("li", {
|
|
1012
1024
|
key: r,
|
|
1013
1025
|
class: "legend-item"
|
|
1014
1026
|
}, [
|
|
1015
|
-
o.type === "circle" ? (m(),
|
|
1027
|
+
o.type === "circle" ? (m(), M("span", {
|
|
1016
1028
|
key: 0,
|
|
1017
1029
|
class: "legend-symbol legend-circle",
|
|
1018
|
-
style:
|
|
1030
|
+
style: ye({ backgroundColor: o.color }),
|
|
1019
1031
|
"aria-hidden": "true"
|
|
1020
|
-
}, null, 4)) : o.type === "line" ? (m(),
|
|
1032
|
+
}, null, 4)) : o.type === "line" ? (m(), M("span", {
|
|
1021
1033
|
key: 1,
|
|
1022
1034
|
class: "legend-symbol legend-line",
|
|
1023
|
-
style:
|
|
1035
|
+
style: ye({
|
|
1024
1036
|
backgroundColor: o.color,
|
|
1025
1037
|
height: `${o.width || 2}px`
|
|
1026
1038
|
}),
|
|
1027
1039
|
"aria-hidden": "true"
|
|
1028
|
-
}, null, 4)) : o.type === "fill" ? (m(),
|
|
1040
|
+
}, null, 4)) : o.type === "fill" ? (m(), M("span", {
|
|
1029
1041
|
key: 2,
|
|
1030
1042
|
class: "legend-symbol legend-fill",
|
|
1031
|
-
style:
|
|
1043
|
+
style: ye({ backgroundColor: o.color }),
|
|
1032
1044
|
"aria-hidden": "true"
|
|
1033
1045
|
}, null, 4)) : R("", !0),
|
|
1034
|
-
P("span",
|
|
1046
|
+
P("span", Ao, H(o.label), 1)
|
|
1035
1047
|
]))), 128))
|
|
1036
|
-
], 8,
|
|
1048
|
+
], 8, Ro));
|
|
1037
1049
|
}
|
|
1038
|
-
}),
|
|
1039
|
-
function
|
|
1040
|
-
function i(
|
|
1041
|
-
return e().visibleLayerIds.has(
|
|
1050
|
+
}), wt = /* @__PURE__ */ xe(Bo, [["__scopeId", "data-v-62e210e3"]]);
|
|
1051
|
+
function Lt(e) {
|
|
1052
|
+
function i(u) {
|
|
1053
|
+
return e().visibleLayerIds.has(u);
|
|
1042
1054
|
}
|
|
1043
|
-
function l(
|
|
1044
|
-
return e().layerOpacities[
|
|
1055
|
+
function l(u) {
|
|
1056
|
+
return e().layerOpacities[u] ?? 1;
|
|
1045
1057
|
}
|
|
1046
|
-
function o(
|
|
1047
|
-
return e().loadingLayerIds.has(
|
|
1058
|
+
function o(u) {
|
|
1059
|
+
return e().loadingLayerIds.has(u);
|
|
1048
1060
|
}
|
|
1049
|
-
function r(
|
|
1050
|
-
return e().layerErrors[
|
|
1061
|
+
function r(u) {
|
|
1062
|
+
return e().layerErrors[u] || null;
|
|
1051
1063
|
}
|
|
1052
|
-
function n(
|
|
1053
|
-
const w = e().currentZoom, p =
|
|
1054
|
-
return !(p !== void 0 && w < p ||
|
|
1064
|
+
function n(u) {
|
|
1065
|
+
const w = e().currentZoom, p = u.minZoom, C = u.maxZoom;
|
|
1066
|
+
return !(p !== void 0 && w < p || C !== void 0 && w > C);
|
|
1055
1067
|
}
|
|
1056
1068
|
return { isVisible: i, getLayerOpacity: l, isLayerLoading: o, getLayerError: r, isLayerAvailableAtZoom: n };
|
|
1057
1069
|
}
|
|
1058
|
-
const
|
|
1070
|
+
const Vo = { class: "layer-panel" }, Zo = {
|
|
1059
1071
|
key: 0,
|
|
1060
1072
|
class: "search-box"
|
|
1061
|
-
},
|
|
1073
|
+
}, No = {
|
|
1062
1074
|
key: 1,
|
|
1063
1075
|
class: "topics-container"
|
|
1064
|
-
},
|
|
1076
|
+
}, Uo = { class: "layer-row" }, Wo = ["href", "aria-label"], jo = {
|
|
1065
1077
|
key: 1,
|
|
1066
1078
|
class: "metadata-placeholder"
|
|
1067
|
-
},
|
|
1079
|
+
}, qo = ["checked", "disabled", "onChange"], Go = { class: "layer-title" }, Ho = {
|
|
1068
1080
|
key: 0,
|
|
1069
1081
|
class: "no-results"
|
|
1070
|
-
},
|
|
1082
|
+
}, Jo = /* @__PURE__ */ ge({
|
|
1071
1083
|
__name: "LayerPanel",
|
|
1072
1084
|
props: {
|
|
1073
1085
|
layerList: {},
|
|
@@ -1086,40 +1098,40 @@ const Ao = { class: "layer-panel" }, Bo = {
|
|
|
1086
1098
|
},
|
|
1087
1099
|
emits: ["toggleLayer", "setOpacity", "updateSearch"],
|
|
1088
1100
|
setup(e, { emit: i }) {
|
|
1089
|
-
const l = e, o = i, r =
|
|
1101
|
+
const l = e, o = i, r = _(() => {
|
|
1090
1102
|
if (!l.searchQuery.trim())
|
|
1091
1103
|
return l.layerList;
|
|
1092
|
-
const
|
|
1093
|
-
return l.layerList.filter((L) => L.config.title.toLowerCase().includes(
|
|
1104
|
+
const d = l.searchQuery.toLowerCase();
|
|
1105
|
+
return l.layerList.filter((L) => L.config.title.toLowerCase().includes(d));
|
|
1094
1106
|
});
|
|
1095
|
-
function n(
|
|
1096
|
-
const L =
|
|
1107
|
+
function n(d) {
|
|
1108
|
+
const L = Vt(d);
|
|
1097
1109
|
return l.layerMetadata[L] || null;
|
|
1098
1110
|
}
|
|
1099
|
-
const
|
|
1111
|
+
const u = _(() => l.layerList.some((d) => n(d.config.url))), { isVisible: w, getLayerOpacity: p, isLayerLoading: C, getLayerError: y, isLayerAvailableAtZoom: h } = Lt(() => ({
|
|
1100
1112
|
visibleLayerIds: l.visibleLayers,
|
|
1101
1113
|
layerOpacities: l.layerOpacities,
|
|
1102
1114
|
loadingLayerIds: l.loadingLayers,
|
|
1103
1115
|
layerErrors: l.layerErrors,
|
|
1104
1116
|
currentZoom: l.currentZoom
|
|
1105
|
-
})), a =
|
|
1117
|
+
})), a = _({
|
|
1106
1118
|
get: () => l.searchQuery,
|
|
1107
|
-
set: (
|
|
1119
|
+
set: (d) => o("updateSearch", d)
|
|
1108
1120
|
});
|
|
1109
|
-
function
|
|
1110
|
-
o("toggleLayer",
|
|
1121
|
+
function g(d) {
|
|
1122
|
+
o("toggleLayer", d);
|
|
1111
1123
|
}
|
|
1112
|
-
return (
|
|
1113
|
-
e.showSearch ? (m(),
|
|
1114
|
-
|
|
1124
|
+
return (d, L) => (m(), M("div", Vo, [
|
|
1125
|
+
e.showSearch ? (m(), M("div", Zo, [
|
|
1126
|
+
J(f(Co), {
|
|
1115
1127
|
modelValue: a.value,
|
|
1116
1128
|
"onUpdate:modelValue": L[0] || (L[0] = (S) => a.value = S),
|
|
1117
1129
|
placeholder: e.searchPlaceholder,
|
|
1118
1130
|
"class-name": "layer-search-field"
|
|
1119
1131
|
}, {
|
|
1120
1132
|
"trailing-action": Ge(() => [
|
|
1121
|
-
|
|
1122
|
-
"icon-definition":
|
|
1133
|
+
J(f(Ce), {
|
|
1134
|
+
"icon-definition": f(ko),
|
|
1123
1135
|
size: "small",
|
|
1124
1136
|
inline: "",
|
|
1125
1137
|
decorative: ""
|
|
@@ -1128,154 +1140,190 @@ const Ao = { class: "layer-panel" }, Bo = {
|
|
|
1128
1140
|
_: 1
|
|
1129
1141
|
}, 8, ["modelValue", "placeholder"])
|
|
1130
1142
|
])) : R("", !0),
|
|
1131
|
-
e.mode === "topics" ? (m(),
|
|
1132
|
-
|
|
1143
|
+
e.mode === "topics" ? (m(), M("div", No, [
|
|
1144
|
+
me(d.$slots, "topics", {}, () => [
|
|
1133
1145
|
L[2] || (L[2] = P("div", { class: "no-topics" }, ' No topic components provided. Use the "topics" slot to add TopicAccordion components. ', -1))
|
|
1134
1146
|
], !0)
|
|
1135
|
-
])) : (m(),
|
|
1147
|
+
])) : (m(), M("div", {
|
|
1136
1148
|
key: 2,
|
|
1137
|
-
class:
|
|
1149
|
+
class: se(["layer-list", { "has-metadata": u.value }])
|
|
1138
1150
|
}, [
|
|
1139
|
-
(m(!0),
|
|
1151
|
+
(m(!0), M(de, null, we(r.value, (S) => (m(), M("div", {
|
|
1140
1152
|
key: S.config.id,
|
|
1141
1153
|
class: "layer-item"
|
|
1142
1154
|
}, [
|
|
1143
|
-
P("div",
|
|
1144
|
-
n(S.config.url) ? (m(),
|
|
1155
|
+
P("div", Uo, [
|
|
1156
|
+
n(S.config.url) ? (m(), M("a", {
|
|
1145
1157
|
key: 0,
|
|
1146
1158
|
href: n(S.config.url) || "",
|
|
1147
1159
|
target: "_blank",
|
|
1148
1160
|
rel: "noopener noreferrer",
|
|
1149
1161
|
class: "metadata-link",
|
|
1150
1162
|
"aria-label": "View metadata for " + S.config.title,
|
|
1151
|
-
onClick: L[1] || (L[1] =
|
|
1163
|
+
onClick: L[1] || (L[1] = Qt(() => {
|
|
1152
1164
|
}, ["stop"]))
|
|
1153
1165
|
}, [
|
|
1154
|
-
|
|
1155
|
-
"icon-definition":
|
|
1166
|
+
J(f(Ce), {
|
|
1167
|
+
"icon-definition": f(Po),
|
|
1156
1168
|
size: "small",
|
|
1157
1169
|
inline: "",
|
|
1158
1170
|
decorative: ""
|
|
1159
1171
|
}, null, 8, ["icon-definition"])
|
|
1160
|
-
], 8,
|
|
1172
|
+
], 8, Wo)) : u.value ? (m(), M("span", jo)) : R("", !0),
|
|
1161
1173
|
P("label", {
|
|
1162
|
-
class:
|
|
1163
|
-
"layer-unavailable": !
|
|
1164
|
-
"layer-error":
|
|
1174
|
+
class: se(["layer-checkbox", {
|
|
1175
|
+
"layer-unavailable": !f(h)(S.config),
|
|
1176
|
+
"layer-error": f(y)(S.config.id)
|
|
1165
1177
|
}])
|
|
1166
1178
|
}, [
|
|
1167
1179
|
P("input", {
|
|
1168
1180
|
type: "checkbox",
|
|
1169
|
-
checked:
|
|
1170
|
-
disabled: !
|
|
1171
|
-
onChange: (
|
|
1172
|
-
}, null, 40,
|
|
1173
|
-
P("span",
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
loading:
|
|
1177
|
-
error:
|
|
1178
|
-
unavailable: !
|
|
1181
|
+
checked: f(w)(S.config.id),
|
|
1182
|
+
disabled: !f(h)(S.config),
|
|
1183
|
+
onChange: (I) => g(S.config.id)
|
|
1184
|
+
}, null, 40, qo),
|
|
1185
|
+
P("span", Go, [
|
|
1186
|
+
ke(H(S.config.title) + " ", 1),
|
|
1187
|
+
J(lt, {
|
|
1188
|
+
loading: f(C)(S.config.id),
|
|
1189
|
+
error: f(y)(S.config.id),
|
|
1190
|
+
unavailable: !f(h)(S.config)
|
|
1179
1191
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
1180
1192
|
])
|
|
1181
1193
|
], 2)
|
|
1182
1194
|
]),
|
|
1183
|
-
e.showOpacity &&
|
|
1195
|
+
e.showOpacity && f(w)(S.config.id) && f(h)(S.config) ? (m(), G(bt, {
|
|
1184
1196
|
key: 0,
|
|
1185
1197
|
"layer-id": S.config.id,
|
|
1186
1198
|
"layer-name": S.config.title,
|
|
1187
|
-
opacity:
|
|
1188
|
-
"onUpdate:opacity": (
|
|
1199
|
+
opacity: f(p)(S.config.id),
|
|
1200
|
+
"onUpdate:opacity": (I) => o("setOpacity", S.config.id, I)
|
|
1189
1201
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : R("", !0),
|
|
1190
|
-
e.showLegend &&
|
|
1202
|
+
e.showLegend && f(w)(S.config.id) && f(h)(S.config) && S.config.legend?.length ? (m(), G(wt, {
|
|
1191
1203
|
key: 1,
|
|
1192
1204
|
items: S.config.legend,
|
|
1193
1205
|
label: "Legend for " + S.config.title
|
|
1194
1206
|
}, null, 8, ["items", "label"])) : R("", !0)
|
|
1195
1207
|
]))), 128)),
|
|
1196
|
-
r.value.length === 0 ? (m(),
|
|
1208
|
+
r.value.length === 0 ? (m(), M("div", Ho, 'No layers match "' + H(e.searchQuery) + '"', 1)) : R("", !0)
|
|
1197
1209
|
], 2))
|
|
1198
1210
|
]));
|
|
1199
1211
|
}
|
|
1200
|
-
}),
|
|
1212
|
+
}), Ko = /* @__PURE__ */ xe(Jo, [["__scopeId", "data-v-e48bb978"]]), Qo = {
|
|
1201
1213
|
esriSLSSolid: null,
|
|
1202
|
-
esriSLSDash: [
|
|
1203
|
-
esriSLSDot: [1,
|
|
1204
|
-
esriSLSDashDot: [
|
|
1205
|
-
esriSLSDashDotDot: [
|
|
1214
|
+
esriSLSDash: [6, 1.5],
|
|
1215
|
+
esriSLSDot: [1, 1.5],
|
|
1216
|
+
esriSLSDashDot: [6, 1.5, 1, 1.5],
|
|
1217
|
+
esriSLSDashDotDot: [6, 1.5, 1, 1.5, 1, 1.5],
|
|
1206
1218
|
esriSLSNull: null
|
|
1207
1219
|
};
|
|
1208
|
-
function
|
|
1220
|
+
function Je(e) {
|
|
1209
1221
|
if (e)
|
|
1210
|
-
return
|
|
1222
|
+
return Qo[e] ?? void 0;
|
|
1211
1223
|
}
|
|
1212
|
-
function
|
|
1224
|
+
function Xo(e, i, l, o, r) {
|
|
1213
1225
|
const n = [];
|
|
1214
|
-
let
|
|
1226
|
+
let u = i[0], w = [e[0]], p = 0;
|
|
1215
1227
|
for (let a = 1; a < e.length; a++)
|
|
1216
|
-
i[a] ===
|
|
1217
|
-
n.push({ style:
|
|
1218
|
-
const
|
|
1219
|
-
let
|
|
1228
|
+
i[a] === u ? w.push(e[a]) : (n.push({ style: u, breaks: w, startIndex: p }), u = i[a], w = [e[a]], p = a);
|
|
1229
|
+
n.push({ style: u, breaks: w, startIndex: p });
|
|
1230
|
+
const C = [], y = /* @__PURE__ */ new Set();
|
|
1231
|
+
let h = o.minValue ?? 0;
|
|
1220
1232
|
for (let a = 0; a < n.length; a++) {
|
|
1221
|
-
const
|
|
1222
|
-
let
|
|
1223
|
-
const
|
|
1224
|
-
S === null ?
|
|
1233
|
+
const g = n[a], d = g.breaks, L = Je(g.style), S = a === 0 ? null : n[a - 1].breaks[n[a - 1].breaks.length - 1].classMaxValue, I = d[d.length - 1].classMaxValue;
|
|
1234
|
+
let F;
|
|
1235
|
+
const V = !!o.defaultSymbol;
|
|
1236
|
+
S === null ? F = `${!V && o.minValue != null ? `${l} >= ${o.minValue} AND ` : ""}${l} <= ${I}` : a === n.length - 1 && V ? F = `${l} > ${S}` : F = `${l} > ${S} AND ${l} <= ${I}`;
|
|
1225
1237
|
const T = {
|
|
1226
|
-
"line-opacity":
|
|
1238
|
+
"line-opacity": he(r)
|
|
1227
1239
|
};
|
|
1228
|
-
if (L && (T["line-dasharray"] = L),
|
|
1229
|
-
T["line-color"] =
|
|
1240
|
+
if (L && (T["line-dasharray"] = L), d.length === 1)
|
|
1241
|
+
T["line-color"] = z(d[0].symbol?.color), T["line-width"] = X(d[0].symbol?.width || 2);
|
|
1230
1242
|
else {
|
|
1231
|
-
const U = ["step", ["get", l]],
|
|
1232
|
-
U.push(
|
|
1233
|
-
for (let
|
|
1234
|
-
U.push(
|
|
1235
|
-
T["line-color"] = U, T["line-width"] =
|
|
1243
|
+
const U = ["step", ["get", l]], fe = ["step", ["get", l]];
|
|
1244
|
+
U.push(z(d[0].symbol?.color)), fe.push(X(d[0].symbol?.width || 2));
|
|
1245
|
+
for (let ve = 1; ve < d.length; ve++)
|
|
1246
|
+
U.push(d[ve - 1].classMaxValue), U.push(z(d[ve].symbol?.color)), fe.push(d[ve - 1].classMaxValue), fe.push(X(d[ve].symbol?.width || 2));
|
|
1247
|
+
T["line-color"] = U, T["line-width"] = fe;
|
|
1236
1248
|
}
|
|
1237
1249
|
const O = [];
|
|
1238
|
-
for (const U of
|
|
1250
|
+
for (const U of d)
|
|
1239
1251
|
O.push({
|
|
1240
1252
|
type: "line",
|
|
1241
|
-
color:
|
|
1242
|
-
width:
|
|
1243
|
-
label: U.label || `${
|
|
1244
|
-
}),
|
|
1245
|
-
const
|
|
1253
|
+
color: z(U.symbol?.color),
|
|
1254
|
+
width: X(U.symbol?.width || 2),
|
|
1255
|
+
label: U.label || `${h} - ${U.classMaxValue}`
|
|
1256
|
+
}), h = U.classMaxValue + 1;
|
|
1257
|
+
const D = g.style.replace("esriSLS", "").toLowerCase();
|
|
1246
1258
|
let te;
|
|
1247
|
-
a === 0 ? te = "" :
|
|
1259
|
+
a === 0 ? te = "" : y.has(D) ? te = `-${D}-${a}` : te = `-${D}`, y.add(D), C.push({ suffix: te, where: F, paint: T, legend: O });
|
|
1248
1260
|
}
|
|
1249
|
-
return
|
|
1261
|
+
return C;
|
|
1250
1262
|
}
|
|
1251
|
-
function
|
|
1263
|
+
function Yo(e, i, l, o, r) {
|
|
1264
|
+
const n = /* @__PURE__ */ new Map();
|
|
1265
|
+
for (const C of e) {
|
|
1266
|
+
const y = C.symbol?.style || "esriSLSSolid";
|
|
1267
|
+
n.has(y) || n.set(y, []), n.get(y).push(C);
|
|
1268
|
+
}
|
|
1269
|
+
const u = [], w = /* @__PURE__ */ new Set();
|
|
1270
|
+
let p = !0;
|
|
1271
|
+
for (const [C, y] of n) {
|
|
1272
|
+
const h = Je(C), g = y.map((F) => `${i} = '${String(F.value).replace(/'/g, "''")}'`).join(" OR "), d = {
|
|
1273
|
+
"line-opacity": he(o)
|
|
1274
|
+
};
|
|
1275
|
+
if (h && (d["line-dasharray"] = h), y.length === 1)
|
|
1276
|
+
d["line-color"] = z(y[0].symbol?.color), d["line-width"] = X(y[0].symbol?.width || 2);
|
|
1277
|
+
else {
|
|
1278
|
+
const F = ["match", ["to-string", ["get", i]]];
|
|
1279
|
+
for (const V of y)
|
|
1280
|
+
F.push(at(V.value)), F.push(z(V.symbol?.color));
|
|
1281
|
+
F.push(l ? z(l.color) : "rgba(0, 0, 0, 0)"), d["line-color"] = F, d["line-width"] = X(y[0].symbol?.width || 2);
|
|
1282
|
+
}
|
|
1283
|
+
const L = [];
|
|
1284
|
+
for (const F of y) {
|
|
1285
|
+
const V = String(F.value), O = r?.get(V) || F.label || V;
|
|
1286
|
+
L.push({
|
|
1287
|
+
type: "line",
|
|
1288
|
+
color: z(F.symbol?.color),
|
|
1289
|
+
width: X(F.symbol?.width || 1),
|
|
1290
|
+
label: O
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
const S = C.replace("esriSLS", "").toLowerCase();
|
|
1294
|
+
let I;
|
|
1295
|
+
p ? I = "" : w.has(S) ? I = `-${S}-${u.length}` : I = `-${S}`, w.add(S), p = !1, u.push({ suffix: I, where: g, paint: d, legend: L });
|
|
1296
|
+
}
|
|
1297
|
+
return u;
|
|
1298
|
+
}
|
|
1299
|
+
function z(e) {
|
|
1252
1300
|
if (!e || !Array.isArray(e) || e.length < 3) return "#888888";
|
|
1253
1301
|
const i = e[0], l = e[1], o = e[2], n = (e[3] ?? 255) / 255;
|
|
1254
1302
|
return n === 1 ? `#${i.toString(16).padStart(2, "0")}${l.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}` : `rgba(${i}, ${l}, ${o}, ${n.toFixed(2)})`;
|
|
1255
1303
|
}
|
|
1256
|
-
function
|
|
1304
|
+
function he(e) {
|
|
1257
1305
|
return e !== void 0 ? e : 1;
|
|
1258
1306
|
}
|
|
1259
|
-
function
|
|
1307
|
+
function X(e) {
|
|
1260
1308
|
return Math.round(e * (96 / 72) * 10) / 10;
|
|
1261
1309
|
}
|
|
1262
|
-
const
|
|
1263
|
-
function
|
|
1264
|
-
return !e || e <= 0 ? null : Math.round(Math.log2(
|
|
1310
|
+
const ea = 559082264;
|
|
1311
|
+
function zt(e) {
|
|
1312
|
+
return !e || e <= 0 ? null : Math.round(Math.log2(ea / e) * 100) / 100;
|
|
1265
1313
|
}
|
|
1266
|
-
function
|
|
1314
|
+
function ta(e, i) {
|
|
1267
1315
|
const l = {};
|
|
1268
1316
|
if (e && e > 0) {
|
|
1269
|
-
const o =
|
|
1317
|
+
const o = zt(e);
|
|
1270
1318
|
o !== null && (l.minZoom = o);
|
|
1271
1319
|
}
|
|
1272
1320
|
if (i && i > 0) {
|
|
1273
|
-
const o =
|
|
1321
|
+
const o = zt(i);
|
|
1274
1322
|
o !== null && (l.maxZoom = o);
|
|
1275
1323
|
}
|
|
1276
1324
|
return l;
|
|
1277
1325
|
}
|
|
1278
|
-
function
|
|
1326
|
+
function rt(e) {
|
|
1279
1327
|
if (!e) return "fill";
|
|
1280
1328
|
switch (e.type) {
|
|
1281
1329
|
case "esriSFS":
|
|
@@ -1292,211 +1340,215 @@ function it(e) {
|
|
|
1292
1340
|
return "fill";
|
|
1293
1341
|
}
|
|
1294
1342
|
}
|
|
1295
|
-
function
|
|
1343
|
+
function Me(e) {
|
|
1296
1344
|
return !(!e || e.style === "esriSLSNull" || e.color === null || e.width === 0 || e.color && e.color[3] === 0);
|
|
1297
1345
|
}
|
|
1298
|
-
function
|
|
1346
|
+
function at(e) {
|
|
1299
1347
|
return String(e);
|
|
1300
1348
|
}
|
|
1301
1349
|
function Zt(e, i, l) {
|
|
1302
|
-
const o = e.symbol, r =
|
|
1303
|
-
let n = {},
|
|
1350
|
+
const o = e.symbol, r = rt(o);
|
|
1351
|
+
let n = {}, u = [], w = null;
|
|
1304
1352
|
if (r === "fill" && o) {
|
|
1305
|
-
const p = o.color === null ? 0 : o.color?.[3] ?? 255,
|
|
1353
|
+
const p = o.color === null ? 0 : o.color?.[3] ?? 255, C = p === 0 ? "rgba(0, 0, 0, 0)" : z(o.color), y = p === 0 ? 0 : p < 255 ? 1 : he(i);
|
|
1306
1354
|
if (n = {
|
|
1307
|
-
"fill-color":
|
|
1308
|
-
"fill-opacity":
|
|
1309
|
-
},
|
|
1310
|
-
const
|
|
1355
|
+
"fill-color": C,
|
|
1356
|
+
"fill-opacity": y
|
|
1357
|
+
}, Me(o.outline)) {
|
|
1358
|
+
const h = X(o.outline.width || 1);
|
|
1311
1359
|
w = {
|
|
1312
|
-
"line-color":
|
|
1313
|
-
"line-width":
|
|
1360
|
+
"line-color": z(o.outline.color),
|
|
1361
|
+
"line-width": h
|
|
1314
1362
|
};
|
|
1315
1363
|
}
|
|
1316
|
-
|
|
1364
|
+
u = [
|
|
1317
1365
|
{
|
|
1318
1366
|
type: "fill",
|
|
1319
|
-
color:
|
|
1367
|
+
color: z(o.color),
|
|
1320
1368
|
label: e.label || "Feature"
|
|
1321
1369
|
}
|
|
1322
1370
|
];
|
|
1323
1371
|
} else if (r === "line" && o) {
|
|
1324
1372
|
n = {
|
|
1325
|
-
"line-color":
|
|
1326
|
-
"line-width":
|
|
1327
|
-
"line-opacity":
|
|
1373
|
+
"line-color": z(o.color),
|
|
1374
|
+
"line-width": X(o.width || 1),
|
|
1375
|
+
"line-opacity": he(i)
|
|
1328
1376
|
};
|
|
1329
|
-
const p =
|
|
1330
|
-
p && (n["line-dasharray"] = p),
|
|
1377
|
+
const p = Je(o.style);
|
|
1378
|
+
p && (n["line-dasharray"] = p), u = [
|
|
1331
1379
|
{
|
|
1332
1380
|
type: "line",
|
|
1333
|
-
color:
|
|
1334
|
-
width:
|
|
1381
|
+
color: z(o.color),
|
|
1382
|
+
width: X(o.width || 1),
|
|
1335
1383
|
label: e.label || "Feature"
|
|
1336
1384
|
}
|
|
1337
1385
|
];
|
|
1338
1386
|
} else if (r === "circle" && o) {
|
|
1339
1387
|
const p = Math.round((o.size || 6) * 0.71 * 100) / 100;
|
|
1340
1388
|
n = {
|
|
1341
|
-
"circle-color":
|
|
1389
|
+
"circle-color": z(o.color),
|
|
1342
1390
|
"circle-radius": p,
|
|
1343
|
-
"circle-opacity":
|
|
1344
|
-
},
|
|
1391
|
+
"circle-opacity": he(i)
|
|
1392
|
+
}, Me(o.outline) && (n["circle-stroke-color"] = z(o.outline.color), n["circle-stroke-width"] = X(o.outline.width || 1)), u = [
|
|
1345
1393
|
{
|
|
1346
1394
|
type: "circle",
|
|
1347
|
-
color:
|
|
1395
|
+
color: z(o.color),
|
|
1348
1396
|
label: e.label || "Feature"
|
|
1349
1397
|
}
|
|
1350
1398
|
];
|
|
1351
1399
|
}
|
|
1352
|
-
return { paint: n, legend:
|
|
1400
|
+
return { paint: n, legend: u, geomType: r, outlinePaint: w };
|
|
1353
1401
|
}
|
|
1354
|
-
function
|
|
1402
|
+
function oa(e, i, l) {
|
|
1355
1403
|
const o = e.field1.toLowerCase(), r = e.uniqueValueInfos || [], n = e.defaultSymbol;
|
|
1356
1404
|
if (r.length === 0)
|
|
1357
1405
|
return Zt({ ...e, symbol: n }, i);
|
|
1358
|
-
const
|
|
1406
|
+
const u = r[0]?.symbol || n, w = rt(u);
|
|
1359
1407
|
let p = {};
|
|
1360
|
-
const
|
|
1361
|
-
let
|
|
1408
|
+
const C = [];
|
|
1409
|
+
let y = null;
|
|
1362
1410
|
if (w === "fill") {
|
|
1363
|
-
const
|
|
1411
|
+
const h = ["match", ["to-string", ["get", o]]];
|
|
1364
1412
|
for (const a of r) {
|
|
1365
|
-
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1413
|
+
h.push(at(a.value)), h.push(z(a.symbol?.color));
|
|
1414
|
+
const g = String(a.value), L = l?.get(g) || a.label || g;
|
|
1415
|
+
C.push({
|
|
1368
1416
|
type: "fill",
|
|
1369
|
-
color:
|
|
1417
|
+
color: z(a.symbol?.color),
|
|
1370
1418
|
label: L
|
|
1371
1419
|
});
|
|
1372
1420
|
}
|
|
1373
|
-
if (
|
|
1374
|
-
"fill-color":
|
|
1375
|
-
"fill-opacity":
|
|
1376
|
-
},
|
|
1377
|
-
const a =
|
|
1378
|
-
|
|
1379
|
-
"line-color":
|
|
1421
|
+
if (h.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), p = {
|
|
1422
|
+
"fill-color": h,
|
|
1423
|
+
"fill-opacity": he(i)
|
|
1424
|
+
}, Me(u?.outline)) {
|
|
1425
|
+
const a = X(Math.max(u.outline.width || 1, 1));
|
|
1426
|
+
y = {
|
|
1427
|
+
"line-color": z(u.outline.color),
|
|
1380
1428
|
"line-width": a
|
|
1381
1429
|
};
|
|
1382
1430
|
}
|
|
1383
1431
|
} else if (w === "line") {
|
|
1384
|
-
const
|
|
1385
|
-
for (const
|
|
1386
|
-
|
|
1387
|
-
const L = String(
|
|
1388
|
-
|
|
1432
|
+
const h = ["match", ["to-string", ["get", o]]];
|
|
1433
|
+
for (const d of r) {
|
|
1434
|
+
h.push(at(d.value)), h.push(z(d.symbol?.color));
|
|
1435
|
+
const L = String(d.value), I = l?.get(L) || d.label || L;
|
|
1436
|
+
C.push({
|
|
1389
1437
|
type: "line",
|
|
1390
|
-
color:
|
|
1391
|
-
width:
|
|
1392
|
-
label:
|
|
1438
|
+
color: z(d.symbol?.color),
|
|
1439
|
+
width: X(d.symbol?.width || 1),
|
|
1440
|
+
label: I
|
|
1393
1441
|
});
|
|
1394
1442
|
}
|
|
1395
|
-
|
|
1396
|
-
"line-color":
|
|
1397
|
-
"line-width":
|
|
1398
|
-
"line-opacity":
|
|
1443
|
+
h.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), p = {
|
|
1444
|
+
"line-color": h,
|
|
1445
|
+
"line-width": X(u?.width || 2),
|
|
1446
|
+
"line-opacity": he(i)
|
|
1399
1447
|
};
|
|
1400
|
-
const a = r.map((
|
|
1401
|
-
if (
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1448
|
+
const a = r.map((d) => d.symbol?.style || "esriSLSSolid"), g = [...new Set(a)];
|
|
1449
|
+
if (g.length > 1) {
|
|
1450
|
+
const d = Yo(r, o, n, i, l);
|
|
1451
|
+
return { paint: {}, legend: [], geomType: w, outlinePaint: y, splitLayers: d };
|
|
1452
|
+
}
|
|
1453
|
+
if (g.length === 1) {
|
|
1454
|
+
const d = Je(g[0]);
|
|
1455
|
+
d && (p["line-dasharray"] = d);
|
|
1404
1456
|
}
|
|
1405
1457
|
} else if (w === "circle") {
|
|
1406
|
-
const
|
|
1407
|
-
for (const
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1458
|
+
const h = ["match", ["to-string", ["get", o]]];
|
|
1459
|
+
for (const g of r) {
|
|
1460
|
+
h.push(at(g.value)), h.push(z(g.symbol?.color));
|
|
1461
|
+
const d = String(g.value), S = l?.get(d) || g.label || d;
|
|
1462
|
+
C.push({
|
|
1411
1463
|
type: "circle",
|
|
1412
|
-
color:
|
|
1464
|
+
color: z(g.symbol?.color),
|
|
1413
1465
|
label: S
|
|
1414
1466
|
});
|
|
1415
1467
|
}
|
|
1416
|
-
|
|
1417
|
-
const a = Math.round((
|
|
1468
|
+
h.push(n ? z(n.color) : "rgba(0, 0, 0, 0)");
|
|
1469
|
+
const a = Math.round((u?.size || 6) * 0.71 * 100) / 100;
|
|
1418
1470
|
p = {
|
|
1419
|
-
"circle-color":
|
|
1471
|
+
"circle-color": h,
|
|
1420
1472
|
"circle-radius": a,
|
|
1421
|
-
"circle-opacity":
|
|
1422
|
-
},
|
|
1473
|
+
"circle-opacity": he(i)
|
|
1474
|
+
}, Me(u?.outline) && (p["circle-stroke-color"] = z(u.outline.color), p["circle-stroke-width"] = X(u.outline.width || 1));
|
|
1423
1475
|
}
|
|
1424
|
-
return { paint: p, legend:
|
|
1476
|
+
return { paint: p, legend: C, geomType: w, outlinePaint: y };
|
|
1425
1477
|
}
|
|
1426
|
-
function
|
|
1427
|
-
const l = e.field.toLowerCase(), o = e.classBreakInfos || [], r = e.visualVariables?.find((
|
|
1478
|
+
function aa(e, i) {
|
|
1479
|
+
const l = e.field.toLowerCase(), o = e.classBreakInfos || [], r = e.visualVariables?.find((y) => y.type === "colorInfo");
|
|
1428
1480
|
if (r?.stops && r.stops.length > 0)
|
|
1429
|
-
return
|
|
1481
|
+
return ia(r, l, e, i);
|
|
1430
1482
|
if (o.length === 0)
|
|
1431
1483
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1432
|
-
const n = o[0]?.symbol,
|
|
1484
|
+
const n = o[0]?.symbol, u = rt(n);
|
|
1433
1485
|
let w = {};
|
|
1434
1486
|
const p = [];
|
|
1435
|
-
let
|
|
1436
|
-
if (
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1439
|
-
for (let
|
|
1440
|
-
const a = o[
|
|
1441
|
-
|
|
1487
|
+
let C = null;
|
|
1488
|
+
if (u === "fill") {
|
|
1489
|
+
const y = ["step", ["get", l]];
|
|
1490
|
+
y.push(z(o[0]?.symbol?.color));
|
|
1491
|
+
for (let h = 0; h < o.length; h++) {
|
|
1492
|
+
const a = o[h];
|
|
1493
|
+
h > 0 && (y.push(o[h - 1].classMaxValue), y.push(z(a.symbol?.color))), p.push({
|
|
1442
1494
|
type: "fill",
|
|
1443
|
-
color:
|
|
1495
|
+
color: z(a.symbol?.color),
|
|
1444
1496
|
label: a.label || `${a.classMaxValue}`
|
|
1445
1497
|
});
|
|
1446
1498
|
}
|
|
1447
1499
|
if (w = {
|
|
1448
|
-
"fill-color":
|
|
1449
|
-
"fill-opacity":
|
|
1450
|
-
},
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1453
|
-
"line-color":
|
|
1454
|
-
"line-width":
|
|
1500
|
+
"fill-color": y,
|
|
1501
|
+
"fill-opacity": he(i)
|
|
1502
|
+
}, Me(n?.outline)) {
|
|
1503
|
+
const h = X(n.outline.width || 1);
|
|
1504
|
+
C = {
|
|
1505
|
+
"line-color": z(n.outline.color),
|
|
1506
|
+
"line-width": h
|
|
1455
1507
|
};
|
|
1456
1508
|
}
|
|
1457
|
-
} else if (
|
|
1458
|
-
const
|
|
1459
|
-
if (
|
|
1460
|
-
const
|
|
1461
|
-
return { paint: {}, legend: [], geomType:
|
|
1462
|
-
}
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
let
|
|
1466
|
-
for (let
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1509
|
+
} else if (u === "line") {
|
|
1510
|
+
const y = o.map((I) => I.symbol?.style || "esriSLSSolid"), h = [...new Set(y)];
|
|
1511
|
+
if (h.length > 1) {
|
|
1512
|
+
const I = Xo(o, y, l, e, i);
|
|
1513
|
+
return { paint: {}, legend: [], geomType: u, outlinePaint: C, splitLayers: I };
|
|
1514
|
+
}
|
|
1515
|
+
const g = ["step", ["get", l]];
|
|
1516
|
+
g.push(z(o[0]?.symbol?.color));
|
|
1517
|
+
let d = e.minValue ?? 0;
|
|
1518
|
+
for (let I = 0; I < o.length; I++) {
|
|
1519
|
+
const F = o[I];
|
|
1520
|
+
I > 0 && (g.push(o[I - 1].classMaxValue), g.push(z(F.symbol?.color))), p.push({
|
|
1469
1521
|
type: "line",
|
|
1470
|
-
color:
|
|
1471
|
-
width:
|
|
1472
|
-
label:
|
|
1473
|
-
}),
|
|
1522
|
+
color: z(F.symbol?.color),
|
|
1523
|
+
width: X(F.symbol?.width || n?.width || 2),
|
|
1524
|
+
label: F.label || `${d} - ${F.classMaxValue}`
|
|
1525
|
+
}), d = F.classMaxValue + 1;
|
|
1474
1526
|
}
|
|
1475
|
-
const L =
|
|
1527
|
+
const L = X(n?.width || 2);
|
|
1476
1528
|
w = {
|
|
1477
|
-
"line-color":
|
|
1529
|
+
"line-color": g,
|
|
1478
1530
|
"line-width": L,
|
|
1479
|
-
"line-opacity":
|
|
1531
|
+
"line-opacity": he(i)
|
|
1480
1532
|
};
|
|
1481
|
-
const S =
|
|
1533
|
+
const S = Je(h[0]);
|
|
1482
1534
|
S && (w["line-dasharray"] = S);
|
|
1483
1535
|
}
|
|
1484
|
-
return { paint: w, legend: p, geomType:
|
|
1536
|
+
return { paint: w, legend: p, geomType: u, outlinePaint: C };
|
|
1485
1537
|
}
|
|
1486
|
-
function
|
|
1538
|
+
function ia(e, i, l, o) {
|
|
1487
1539
|
const r = e.stops || [];
|
|
1488
1540
|
if (r.length === 0)
|
|
1489
1541
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1490
|
-
const n = l.classBreakInfos?.[0]?.symbol || l.defaultSymbol,
|
|
1542
|
+
const n = l.classBreakInfos?.[0]?.symbol || l.defaultSymbol, u = rt(n);
|
|
1491
1543
|
let w = {};
|
|
1492
1544
|
const p = [];
|
|
1493
|
-
let
|
|
1494
|
-
if (
|
|
1495
|
-
const
|
|
1545
|
+
let C = null;
|
|
1546
|
+
if (u === "fill") {
|
|
1547
|
+
const y = ["interpolate", ["linear"], ["get", i]];
|
|
1496
1548
|
for (const a of r)
|
|
1497
|
-
|
|
1549
|
+
y.push(a.value), y.push(z(a.color)), p.push({
|
|
1498
1550
|
type: "fill",
|
|
1499
|
-
color:
|
|
1551
|
+
color: z(a.color),
|
|
1500
1552
|
label: a.label || `${a.value}`
|
|
1501
1553
|
});
|
|
1502
1554
|
if (w = {
|
|
@@ -1505,21 +1557,21 @@ function ta(e, i, l, o) {
|
|
|
1505
1557
|
["==", ["get", i], null],
|
|
1506
1558
|
"rgba(0, 0, 0, 0)",
|
|
1507
1559
|
// Transparent for null/no-data values
|
|
1508
|
-
|
|
1560
|
+
y
|
|
1509
1561
|
// Otherwise use the interpolated color
|
|
1510
1562
|
],
|
|
1511
|
-
"fill-opacity":
|
|
1512
|
-
},
|
|
1513
|
-
const a =
|
|
1514
|
-
|
|
1515
|
-
"line-color":
|
|
1563
|
+
"fill-opacity": he(o)
|
|
1564
|
+
}, Me(n?.outline)) {
|
|
1565
|
+
const a = X(n.outline.width || 1);
|
|
1566
|
+
C = {
|
|
1567
|
+
"line-color": z(n.outline.color),
|
|
1516
1568
|
"line-width": a
|
|
1517
1569
|
};
|
|
1518
1570
|
}
|
|
1519
1571
|
}
|
|
1520
|
-
return { paint: w, legend: p, geomType:
|
|
1572
|
+
return { paint: w, legend: p, geomType: u, outlinePaint: C };
|
|
1521
1573
|
}
|
|
1522
|
-
function
|
|
1574
|
+
function la(e, i, l, o) {
|
|
1523
1575
|
if (!e?.renderer)
|
|
1524
1576
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1525
1577
|
const r = e.renderer;
|
|
@@ -1527,37 +1579,37 @@ function oa(e, i, l, o) {
|
|
|
1527
1579
|
case "simple":
|
|
1528
1580
|
return Zt(r, i);
|
|
1529
1581
|
case "uniqueValue":
|
|
1530
|
-
return
|
|
1582
|
+
return oa(r, i, l);
|
|
1531
1583
|
case "classBreaks":
|
|
1532
|
-
return
|
|
1584
|
+
return aa(r, i);
|
|
1533
1585
|
default:
|
|
1534
1586
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1535
1587
|
}
|
|
1536
1588
|
}
|
|
1537
|
-
function
|
|
1589
|
+
function na(e) {
|
|
1538
1590
|
if (!e) return null;
|
|
1539
|
-
const i = (e.title || "").replace(/\{([^}]+)\}/g, (n,
|
|
1540
|
-
const
|
|
1591
|
+
const i = (e.title || "").replace(/\{([^}]+)\}/g, (n, u) => `{${u.toLowerCase()}}`), o = (e.fieldInfos || []).filter((n) => n.visible === !0).map((n) => {
|
|
1592
|
+
const u = {
|
|
1541
1593
|
field: n.fieldName.toLowerCase(),
|
|
1542
1594
|
label: n.label || n.fieldName
|
|
1543
1595
|
};
|
|
1544
|
-
return n.format && (
|
|
1596
|
+
return n.format && (u.format = {}, n.format.dateFormat && (u.format.dateFormat = n.format.dateFormat), n.format.digitSeparator !== void 0 && (u.format.digitSeparator = n.format.digitSeparator), n.format.places !== void 0 && (u.format.places = n.format.places), Object.keys(u.format).length === 0 && delete u.format), u;
|
|
1545
1597
|
}), r = {
|
|
1546
1598
|
title: i,
|
|
1547
1599
|
fields: o
|
|
1548
1600
|
};
|
|
1549
1601
|
return e.showTime && (r.showTime = !0), r;
|
|
1550
1602
|
}
|
|
1551
|
-
function
|
|
1603
|
+
function ra(e) {
|
|
1552
1604
|
return e?.definitionExpression;
|
|
1553
1605
|
}
|
|
1554
|
-
function
|
|
1606
|
+
function sa(e) {
|
|
1555
1607
|
return (e.includes("_") ? e.split("_").slice(1).join(" ") : e).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
1556
1608
|
}
|
|
1557
|
-
function
|
|
1609
|
+
function ca(e) {
|
|
1558
1610
|
return e.includes("_") ? e.split("_").slice(1).join(" ") : e;
|
|
1559
1611
|
}
|
|
1560
|
-
function
|
|
1612
|
+
function ua(e) {
|
|
1561
1613
|
const i = /* @__PURE__ */ new Map();
|
|
1562
1614
|
if (!e)
|
|
1563
1615
|
return i;
|
|
@@ -1566,13 +1618,13 @@ function ra(e) {
|
|
|
1566
1618
|
for (const r of l) {
|
|
1567
1619
|
const n = r.trim().match(o);
|
|
1568
1620
|
if (n) {
|
|
1569
|
-
const [,
|
|
1570
|
-
|
|
1621
|
+
const [, u, w] = n;
|
|
1622
|
+
u && w && i.set(u, w.trim());
|
|
1571
1623
|
}
|
|
1572
1624
|
}
|
|
1573
1625
|
return i;
|
|
1574
1626
|
}
|
|
1575
|
-
async function
|
|
1627
|
+
async function da(e) {
|
|
1576
1628
|
try {
|
|
1577
1629
|
const i = await fetch(`${e}?f=json`);
|
|
1578
1630
|
if (!i.ok)
|
|
@@ -1586,7 +1638,7 @@ async function sa(e) {
|
|
|
1586
1638
|
return null;
|
|
1587
1639
|
}
|
|
1588
1640
|
}
|
|
1589
|
-
function
|
|
1641
|
+
function Dt(e) {
|
|
1590
1642
|
const i = {
|
|
1591
1643
|
id: e.id,
|
|
1592
1644
|
title: e.title,
|
|
@@ -1597,40 +1649,41 @@ function zt(e) {
|
|
|
1597
1649
|
legend: e.legend,
|
|
1598
1650
|
popup: e.popup
|
|
1599
1651
|
};
|
|
1600
|
-
return e.where && (i.where = e.where), e.minZoom !== void 0 && (i.minZoom = e.minZoom), e.maxZoom !== void 0 && (i.maxZoom = e.maxZoom), e.outlinePaint && (i.outlinePaint = e.outlinePaint), i;
|
|
1652
|
+
return e.where && (i.where = e.where), e.minZoom !== void 0 && (i.minZoom = e.minZoom), e.maxZoom !== void 0 && (i.maxZoom = e.maxZoom), e.outlinePaint && (i.outlinePaint = e.outlinePaint), e.parentId && (i.parentId = e.parentId), i;
|
|
1601
1653
|
}
|
|
1602
|
-
async function
|
|
1654
|
+
async function Nt(e) {
|
|
1603
1655
|
const i = e.operationalLayers || [], l = [], o = ["Zoning and Planning_Land Use"];
|
|
1604
1656
|
for (const r of i)
|
|
1605
1657
|
if (r.url && !r.title?.toLowerCase().includes("(under construction)") && !(r.url && /\/MapServer(\/\d+)?$/i.test(r.url)))
|
|
1606
1658
|
try {
|
|
1607
|
-
let n = r.layerDefinition?.drawingInfo,
|
|
1608
|
-
const w = !n || !n.renderer, p = o.includes(r.title),
|
|
1659
|
+
let n = r.layerDefinition?.drawingInfo, u;
|
|
1660
|
+
const w = !n || !n.renderer, p = o.includes(r.title), C = n?.renderer?.uniqueValueInfos?.[0]?.symbol?.outline || n?.renderer?.defaultSymbol?.outline;
|
|
1609
1661
|
if ((w || p) && r.url) {
|
|
1610
|
-
const O = await
|
|
1662
|
+
const O = await da(r.url);
|
|
1611
1663
|
if (O) {
|
|
1612
|
-
if (n = O.drawingInfo,
|
|
1613
|
-
const
|
|
1614
|
-
if (!
|
|
1615
|
-
for (const U of
|
|
1616
|
-
U.symbol && (U.symbol.outline =
|
|
1617
|
-
|
|
1664
|
+
if (n = O.drawingInfo, C && Me(C) && n?.renderer) {
|
|
1665
|
+
const D = n.renderer, te = D.uniqueValueInfos?.[0]?.symbol?.outline || D.defaultSymbol?.outline;
|
|
1666
|
+
if (!Me(te)) {
|
|
1667
|
+
for (const U of D.uniqueValueInfos || [])
|
|
1668
|
+
U.symbol && (U.symbol.outline = C);
|
|
1669
|
+
D.defaultSymbol && (D.defaultSymbol.outline = C);
|
|
1618
1670
|
}
|
|
1619
1671
|
}
|
|
1620
|
-
O.description && (
|
|
1672
|
+
O.description && (u = ua(O.description), u.size > 0);
|
|
1621
1673
|
}
|
|
1622
1674
|
}
|
|
1623
|
-
const { paint:
|
|
1675
|
+
const { paint: y, legend: h, geomType: a, outlinePaint: g, splitLayers: d } = la(
|
|
1624
1676
|
n,
|
|
1625
1677
|
r.opacity,
|
|
1626
|
-
|
|
1678
|
+
u,
|
|
1627
1679
|
r.title
|
|
1628
|
-
), L =
|
|
1629
|
-
if (
|
|
1630
|
-
for (const O of
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1680
|
+
), L = na(r.popupInfo), S = ra(r.layerDefinition), I = ta(r.layerDefinition?.minScale, r.layerDefinition?.maxScale), F = sa(r.title), V = ca(r.title), T = r.opacity ?? 1;
|
|
1681
|
+
if (d && d.length > 0)
|
|
1682
|
+
for (const O of d) {
|
|
1683
|
+
const D = `${F}${O.suffix}`;
|
|
1684
|
+
l.push(Dt({
|
|
1685
|
+
id: D,
|
|
1686
|
+
title: V,
|
|
1634
1687
|
type: a,
|
|
1635
1688
|
url: r.url,
|
|
1636
1689
|
opacity: T,
|
|
@@ -1638,46 +1691,48 @@ async function Vt(e) {
|
|
|
1638
1691
|
legend: O.legend,
|
|
1639
1692
|
popup: L,
|
|
1640
1693
|
where: S ? `(${S}) AND (${O.where})` : O.where,
|
|
1641
|
-
minZoom:
|
|
1642
|
-
maxZoom:
|
|
1694
|
+
minZoom: I.minZoom,
|
|
1695
|
+
maxZoom: I.maxZoom,
|
|
1696
|
+
parentId: O.suffix ? F : void 0
|
|
1643
1697
|
}));
|
|
1698
|
+
}
|
|
1644
1699
|
else
|
|
1645
|
-
l.push(
|
|
1646
|
-
id:
|
|
1647
|
-
title:
|
|
1700
|
+
l.push(Dt({
|
|
1701
|
+
id: F,
|
|
1702
|
+
title: V,
|
|
1648
1703
|
type: a,
|
|
1649
1704
|
url: r.url,
|
|
1650
1705
|
opacity: T,
|
|
1651
|
-
paint:
|
|
1652
|
-
legend:
|
|
1706
|
+
paint: y,
|
|
1707
|
+
legend: h,
|
|
1653
1708
|
popup: L,
|
|
1654
1709
|
where: S,
|
|
1655
|
-
minZoom:
|
|
1656
|
-
maxZoom:
|
|
1657
|
-
outlinePaint:
|
|
1710
|
+
minZoom: I.minZoom,
|
|
1711
|
+
maxZoom: I.maxZoom,
|
|
1712
|
+
outlinePaint: g
|
|
1658
1713
|
}));
|
|
1659
1714
|
} catch {
|
|
1660
1715
|
}
|
|
1661
1716
|
return l.sort((r, n) => r.title.localeCompare(n.title)), l;
|
|
1662
1717
|
}
|
|
1663
|
-
const
|
|
1664
|
-
function
|
|
1718
|
+
const _t = {}, St = "376af635c84643cd816a8c5d017a53aa", Ja = St;
|
|
1719
|
+
function Ct(e, i) {
|
|
1665
1720
|
let l = `https://www.arcgis.com/sharing/rest/content/items/${e}/data?f=json`;
|
|
1666
1721
|
return i && (l += `&token=${i}`), l;
|
|
1667
1722
|
}
|
|
1668
|
-
function
|
|
1669
|
-
return St
|
|
1723
|
+
function Ka() {
|
|
1724
|
+
return Ct(St);
|
|
1670
1725
|
}
|
|
1671
|
-
const
|
|
1672
|
-
function
|
|
1673
|
-
e ? (
|
|
1726
|
+
const nt = /* @__PURE__ */ new Map(), He = /* @__PURE__ */ new Map();
|
|
1727
|
+
function fa(e) {
|
|
1728
|
+
e ? (nt.delete(e), He.delete(e)) : (nt.clear(), He.clear());
|
|
1674
1729
|
}
|
|
1675
|
-
let
|
|
1676
|
-
async function
|
|
1677
|
-
const e = typeof import.meta < "u" &&
|
|
1730
|
+
let ot, Rt = 0;
|
|
1731
|
+
async function pa() {
|
|
1732
|
+
const e = typeof import.meta < "u" && _t?.VITE_AGO_USERNAME, i = typeof import.meta < "u" && _t?.VITE_AGO_PASSWORD;
|
|
1678
1733
|
if (!(!e || !i)) {
|
|
1679
|
-
if (
|
|
1680
|
-
return
|
|
1734
|
+
if (ot && Date.now() < Rt - 3e5)
|
|
1735
|
+
return ot;
|
|
1681
1736
|
try {
|
|
1682
1737
|
const o = await (await fetch("https://www.arcgis.com/sharing/rest/generateToken", {
|
|
1683
1738
|
method: "POST",
|
|
@@ -1693,14 +1748,14 @@ async function ua() {
|
|
|
1693
1748
|
// 2 hours
|
|
1694
1749
|
})
|
|
1695
1750
|
})).json();
|
|
1696
|
-
return o.error ? void 0 : (
|
|
1751
|
+
return o.error ? void 0 : (ot = o.token, Rt = o.expires, ot);
|
|
1697
1752
|
} catch {
|
|
1698
1753
|
return;
|
|
1699
1754
|
}
|
|
1700
1755
|
}
|
|
1701
1756
|
}
|
|
1702
|
-
async function
|
|
1703
|
-
const l =
|
|
1757
|
+
async function ya(e, i) {
|
|
1758
|
+
const l = Ct(e, i), o = await fetch(l, { cache: "no-store" });
|
|
1704
1759
|
if (!o.ok)
|
|
1705
1760
|
throw new Error(`Failed to fetch WebMap: ${o.status} ${o.statusText}`);
|
|
1706
1761
|
const r = await o.json();
|
|
@@ -1708,18 +1763,18 @@ async function da(e, i) {
|
|
|
1708
1763
|
throw new Error(`ArcGIS error: ${r.error.message || r.error.code || "Unknown error"}`);
|
|
1709
1764
|
return r;
|
|
1710
1765
|
}
|
|
1711
|
-
async function
|
|
1766
|
+
async function ma(e) {
|
|
1712
1767
|
try {
|
|
1713
|
-
const i = await
|
|
1714
|
-
return await
|
|
1768
|
+
const i = await pa(), l = await ya(e, i);
|
|
1769
|
+
return await Nt(l);
|
|
1715
1770
|
} catch (i) {
|
|
1716
1771
|
throw new Error(
|
|
1717
1772
|
`Failed to load dynamic layer configs: ${i instanceof Error ? i.message : "Unknown error"}`
|
|
1718
1773
|
);
|
|
1719
1774
|
}
|
|
1720
1775
|
}
|
|
1721
|
-
async function
|
|
1722
|
-
const i =
|
|
1776
|
+
async function vt(e = St) {
|
|
1777
|
+
const i = nt.get(e);
|
|
1723
1778
|
if (i)
|
|
1724
1779
|
return i;
|
|
1725
1780
|
const l = He.get(e);
|
|
@@ -1727,15 +1782,15 @@ async function gt(e = Lt) {
|
|
|
1727
1782
|
return l;
|
|
1728
1783
|
const o = (async () => {
|
|
1729
1784
|
try {
|
|
1730
|
-
const r = await
|
|
1731
|
-
return
|
|
1785
|
+
const r = await ma(e);
|
|
1786
|
+
return nt.set(e, r), r;
|
|
1732
1787
|
} finally {
|
|
1733
1788
|
He.delete(e);
|
|
1734
1789
|
}
|
|
1735
1790
|
})();
|
|
1736
1791
|
return He.set(e, o), o;
|
|
1737
1792
|
}
|
|
1738
|
-
function
|
|
1793
|
+
function ha(e) {
|
|
1739
1794
|
const i = k({}), l = /* @__PURE__ */ new Map();
|
|
1740
1795
|
for (const a of e)
|
|
1741
1796
|
i.value[a.id] = {
|
|
@@ -1745,18 +1800,18 @@ function pa(e) {
|
|
|
1745
1800
|
lastFetched: null
|
|
1746
1801
|
};
|
|
1747
1802
|
async function o(a) {
|
|
1748
|
-
const
|
|
1803
|
+
const g = a.id;
|
|
1749
1804
|
i.value = {
|
|
1750
1805
|
...i.value,
|
|
1751
|
-
[
|
|
1752
|
-
data: i.value[
|
|
1753
|
-
lastFetched: i.value[
|
|
1806
|
+
[g]: {
|
|
1807
|
+
data: i.value[g]?.data ?? null,
|
|
1808
|
+
lastFetched: i.value[g]?.lastFetched ?? null,
|
|
1754
1809
|
loading: !0,
|
|
1755
1810
|
error: null
|
|
1756
1811
|
}
|
|
1757
1812
|
};
|
|
1758
1813
|
try {
|
|
1759
|
-
let
|
|
1814
|
+
let d;
|
|
1760
1815
|
if (a.type === "http-get") {
|
|
1761
1816
|
const L = await fetch(a.url, {
|
|
1762
1817
|
method: "GET",
|
|
@@ -1764,7 +1819,7 @@ function pa(e) {
|
|
|
1764
1819
|
});
|
|
1765
1820
|
if (!L.ok)
|
|
1766
1821
|
throw new Error(`HTTP ${L.status}: ${L.statusText}`);
|
|
1767
|
-
|
|
1822
|
+
d = await L.json();
|
|
1768
1823
|
} else if (a.type === "http-post") {
|
|
1769
1824
|
const L = await fetch(a.url, {
|
|
1770
1825
|
method: "POST",
|
|
@@ -1772,30 +1827,30 @@ function pa(e) {
|
|
|
1772
1827
|
});
|
|
1773
1828
|
if (!L.ok)
|
|
1774
1829
|
throw new Error(`HTTP ${L.status}: ${L.statusText}`);
|
|
1775
|
-
|
|
1830
|
+
d = await L.json();
|
|
1776
1831
|
} else if (a.type === "esri") {
|
|
1777
|
-
const S = `${a.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`,
|
|
1778
|
-
if (!
|
|
1779
|
-
throw new Error(`HTTP ${
|
|
1780
|
-
|
|
1832
|
+
const S = `${a.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, I = await fetch(S, a.options);
|
|
1833
|
+
if (!I.ok)
|
|
1834
|
+
throw new Error(`HTTP ${I.status}: ${I.statusText}`);
|
|
1835
|
+
d = (await I.json()).features?.map((V) => V.attributes) || [];
|
|
1781
1836
|
} else
|
|
1782
1837
|
throw new Error(`Unknown data source type: ${a.type}`);
|
|
1783
|
-
a.transform && (
|
|
1838
|
+
a.transform && (d = a.transform(d)), i.value = {
|
|
1784
1839
|
...i.value,
|
|
1785
|
-
[
|
|
1786
|
-
data:
|
|
1840
|
+
[g]: {
|
|
1841
|
+
data: d,
|
|
1787
1842
|
loading: !1,
|
|
1788
1843
|
error: null,
|
|
1789
1844
|
lastFetched: Date.now()
|
|
1790
1845
|
}
|
|
1791
1846
|
};
|
|
1792
|
-
} catch (
|
|
1793
|
-
const L =
|
|
1847
|
+
} catch (d) {
|
|
1848
|
+
const L = d instanceof Error ? d.message : "Unknown error";
|
|
1794
1849
|
i.value = {
|
|
1795
1850
|
...i.value,
|
|
1796
|
-
[
|
|
1797
|
-
data: i.value[
|
|
1798
|
-
lastFetched: i.value[
|
|
1851
|
+
[g]: {
|
|
1852
|
+
data: i.value[g]?.data ?? null,
|
|
1853
|
+
lastFetched: i.value[g]?.lastFetched ?? null,
|
|
1799
1854
|
loading: !1,
|
|
1800
1855
|
error: L
|
|
1801
1856
|
}
|
|
@@ -1806,40 +1861,40 @@ function pa(e) {
|
|
|
1806
1861
|
await Promise.all(e.map((a) => o(a)));
|
|
1807
1862
|
}
|
|
1808
1863
|
async function n(a) {
|
|
1809
|
-
const
|
|
1810
|
-
|
|
1864
|
+
const g = e.find((d) => d.id === a);
|
|
1865
|
+
g && await o(g);
|
|
1811
1866
|
}
|
|
1812
|
-
function
|
|
1867
|
+
function u(a) {
|
|
1813
1868
|
return i.value[a]?.data ?? null;
|
|
1814
1869
|
}
|
|
1815
|
-
const w =
|
|
1870
|
+
const w = _(() => Object.values(i.value).some((a) => a.loading));
|
|
1816
1871
|
function p(a) {
|
|
1817
1872
|
return i.value[a]?.loading ?? !1;
|
|
1818
1873
|
}
|
|
1819
|
-
function
|
|
1874
|
+
function C(a) {
|
|
1820
1875
|
return i.value[a]?.error ?? null;
|
|
1821
1876
|
}
|
|
1822
|
-
function
|
|
1877
|
+
function y() {
|
|
1823
1878
|
for (const a of e)
|
|
1824
1879
|
if (a.pollInterval && a.pollInterval > 0) {
|
|
1825
|
-
const
|
|
1880
|
+
const g = window.setInterval(() => {
|
|
1826
1881
|
o(a);
|
|
1827
1882
|
}, a.pollInterval);
|
|
1828
|
-
l.set(a.id,
|
|
1883
|
+
l.set(a.id, g);
|
|
1829
1884
|
}
|
|
1830
1885
|
}
|
|
1831
|
-
function
|
|
1886
|
+
function h() {
|
|
1832
1887
|
for (const [, a] of l)
|
|
1833
1888
|
window.clearInterval(a);
|
|
1834
1889
|
l.clear();
|
|
1835
1890
|
}
|
|
1836
|
-
return
|
|
1837
|
-
r(),
|
|
1838
|
-
}),
|
|
1839
|
-
|
|
1891
|
+
return it(() => {
|
|
1892
|
+
r(), y();
|
|
1893
|
+
}), At(() => {
|
|
1894
|
+
h();
|
|
1840
1895
|
}), {
|
|
1841
1896
|
/** Reactive state for all data sources */
|
|
1842
|
-
state:
|
|
1897
|
+
state: q(i),
|
|
1843
1898
|
/** Whether any data source is currently loading */
|
|
1844
1899
|
isLoading: w,
|
|
1845
1900
|
/** Fetch all data sources */
|
|
@@ -1847,31 +1902,31 @@ function pa(e) {
|
|
|
1847
1902
|
/** Refetch a specific data source by id */
|
|
1848
1903
|
refetch: n,
|
|
1849
1904
|
/** Get data for a specific source */
|
|
1850
|
-
getData:
|
|
1905
|
+
getData: u,
|
|
1851
1906
|
/** Check if a specific source is loading */
|
|
1852
1907
|
isSourceLoading: p,
|
|
1853
1908
|
/** Get error for a specific source */
|
|
1854
|
-
getError:
|
|
1909
|
+
getError: C,
|
|
1855
1910
|
/** Stop all polling (useful for cleanup) */
|
|
1856
|
-
stopPolling:
|
|
1911
|
+
stopPolling: h
|
|
1857
1912
|
};
|
|
1858
1913
|
}
|
|
1859
|
-
const
|
|
1914
|
+
const ga = { class: "layerboard-layout" }, va = ["aria-expanded"], ba = {
|
|
1860
1915
|
key: 0,
|
|
1861
1916
|
class: "layerboard-subtitle"
|
|
1862
|
-
},
|
|
1917
|
+
}, wa = { class: "layerboard-mobile-menu-content" }, La = { class: "layerboard-main" }, Sa = {
|
|
1863
1918
|
key: 0,
|
|
1864
1919
|
class: "layerboard-loading",
|
|
1865
1920
|
role: "status",
|
|
1866
1921
|
"aria-live": "polite"
|
|
1867
|
-
},
|
|
1922
|
+
}, Ca = {
|
|
1868
1923
|
key: 1,
|
|
1869
1924
|
class: "layerboard-error",
|
|
1870
1925
|
role: "alert"
|
|
1871
|
-
},
|
|
1926
|
+
}, ka = ["aria-expanded", "aria-label"], xa = { key: 0 }, $a = { key: 1 }, Ma = {
|
|
1872
1927
|
class: "sr-only",
|
|
1873
1928
|
"aria-live": "polite"
|
|
1874
|
-
},
|
|
1929
|
+
}, Pa = /* @__PURE__ */ ge({
|
|
1875
1930
|
__name: "Layerboard",
|
|
1876
1931
|
props: {
|
|
1877
1932
|
title: {},
|
|
@@ -1901,51 +1956,51 @@ const ya = { class: "layerboard-layout" }, ma = ["aria-expanded"], ha = {
|
|
|
1901
1956
|
},
|
|
1902
1957
|
emits: ["configs-loaded", "load-error", "zoom"],
|
|
1903
1958
|
setup(e, { expose: i, emit: l }) {
|
|
1904
|
-
const o = e, r = l, n = k([]),
|
|
1905
|
-
function
|
|
1906
|
-
const
|
|
1907
|
-
for (const
|
|
1908
|
-
|
|
1909
|
-
S.value =
|
|
1959
|
+
const o = e, r = l, n = k([]), u = k(!0), w = k(null), p = k(12), C = k(""), y = k(/* @__PURE__ */ new Set()), h = k({}), a = k(/* @__PURE__ */ new Set()), g = k({}), d = k({}), L = k(/* @__PURE__ */ new Set()), S = k({});
|
|
1960
|
+
function I() {
|
|
1961
|
+
const v = {};
|
|
1962
|
+
for (const x of o.tiledLayers)
|
|
1963
|
+
v[x.id] = x.opacity ?? 1;
|
|
1964
|
+
S.value = v;
|
|
1910
1965
|
}
|
|
1911
|
-
function
|
|
1912
|
-
L.value.has(
|
|
1966
|
+
function F(v) {
|
|
1967
|
+
L.value.has(v) ? L.value.delete(v) : L.value.add(v), L.value = new Set(L.value);
|
|
1913
1968
|
}
|
|
1914
|
-
function
|
|
1915
|
-
|
|
1969
|
+
function V(v, x) {
|
|
1970
|
+
x ? L.value.add(v) : L.value.delete(v), L.value = new Set(L.value);
|
|
1916
1971
|
}
|
|
1917
|
-
function T(
|
|
1918
|
-
S.value = { ...S.value, [
|
|
1972
|
+
function T(v, x) {
|
|
1973
|
+
S.value = { ...S.value, [v]: x };
|
|
1919
1974
|
}
|
|
1920
|
-
const O = o.dataSources.length > 0 ?
|
|
1921
|
-
function U(
|
|
1922
|
-
return O?.getData(
|
|
1975
|
+
const O = o.dataSources.length > 0 ? ha(o.dataSources) : null, D = _(() => O?.state.value ?? {}), te = _(() => O?.isLoading.value ?? !1);
|
|
1976
|
+
function U(v) {
|
|
1977
|
+
return O?.getData(v) ?? null;
|
|
1923
1978
|
}
|
|
1924
|
-
function
|
|
1925
|
-
return O?.refetch(
|
|
1979
|
+
function fe(v) {
|
|
1980
|
+
return O?.refetch(v) ?? Promise.resolve();
|
|
1926
1981
|
}
|
|
1927
|
-
Z("layerboard-layers",
|
|
1928
|
-
const
|
|
1982
|
+
Z("layerboard-layers", q(n)), Z("layerboard-visible", y), Z("layerboard-opacities", h), Z("layerboard-loading", q(a)), Z("layerboard-errors", q(g)), Z("layerboard-zoom", q(p)), Z("layerboard-toggle-layer", ze), Z("layerboard-set-layer-visible", We), Z("layerboard-set-layers-visible", $e), Z("layerboard-set-opacity", Pe), Z("layerboard-tiled-layers", q(_(() => o.tiledLayers))), Z("layerboard-visible-tiled", L), Z("layerboard-tiled-opacities", S), Z("layerboard-toggle-tiled", F), Z("layerboard-set-tiled-opacity", T), Z("layerboard-set-tiled-visible", V), Z("layerboard-data-sources-state", D), Z("layerboard-data-sources-loading", te), Z("layerboard-get-data-source", U), Z("layerboard-refetch-data-source", fe);
|
|
1983
|
+
const ve = _(() => ({
|
|
1929
1984
|
backgroundColor: o.themeColor
|
|
1930
|
-
})),
|
|
1985
|
+
})), st = _(() => ({
|
|
1931
1986
|
backgroundColor: o.themeColor
|
|
1932
|
-
})),
|
|
1987
|
+
})), Ne = _(() => ({
|
|
1933
1988
|
backgroundColor: o.themeColor
|
|
1934
|
-
})),
|
|
1935
|
-
width:
|
|
1989
|
+
})), Ke = _(() => ({
|
|
1990
|
+
width: pe.value ? "0" : o.sidebarWidth
|
|
1936
1991
|
}));
|
|
1937
|
-
async function
|
|
1992
|
+
async function Ue() {
|
|
1938
1993
|
try {
|
|
1939
|
-
|
|
1940
|
-
const
|
|
1994
|
+
u.value = !0, w.value = null;
|
|
1995
|
+
const x = (await vt(o.webMapId)).map((W) => {
|
|
1941
1996
|
let Q = W;
|
|
1942
|
-
const
|
|
1943
|
-
|
|
1997
|
+
const Se = o.layerStyleOverrides[W.id];
|
|
1998
|
+
Se && (Q = {
|
|
1944
1999
|
...Q,
|
|
1945
|
-
paint:
|
|
1946
|
-
outlinePaint:
|
|
1947
|
-
legend:
|
|
1948
|
-
type:
|
|
2000
|
+
paint: Se.paint ?? Q.paint,
|
|
2001
|
+
outlinePaint: Se.outlinePaint ?? Q.outlinePaint,
|
|
2002
|
+
legend: Se.legend ?? Q.legend,
|
|
2003
|
+
type: Se.type ?? Q.type
|
|
1949
2004
|
});
|
|
1950
2005
|
const Ve = o.popupOverrides[W.id];
|
|
1951
2006
|
return Ve && Q.popup && (Q = {
|
|
@@ -1953,206 +2008,206 @@ const ya = { class: "layerboard-layout" }, ma = ["aria-expanded"], ha = {
|
|
|
1953
2008
|
popup: { ...Q.popup, ...Ve }
|
|
1954
2009
|
}), Q;
|
|
1955
2010
|
});
|
|
1956
|
-
n.value =
|
|
2011
|
+
n.value = x.map((W) => ({
|
|
1957
2012
|
config: W,
|
|
1958
2013
|
component: W.type
|
|
1959
2014
|
}));
|
|
1960
|
-
const
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
}),
|
|
1964
|
-
} catch (
|
|
1965
|
-
const
|
|
1966
|
-
w.value =
|
|
2015
|
+
const K = {};
|
|
2016
|
+
x.forEach((W) => {
|
|
2017
|
+
K[W.id] = W.opacity ?? 1;
|
|
2018
|
+
}), h.value = K, r("configs-loaded", x);
|
|
2019
|
+
} catch (v) {
|
|
2020
|
+
const x = v instanceof Error ? v.message : "Failed to load layer configurations";
|
|
2021
|
+
w.value = x, r("load-error", x);
|
|
1967
2022
|
} finally {
|
|
1968
|
-
|
|
2023
|
+
u.value = !1;
|
|
1969
2024
|
}
|
|
1970
2025
|
}
|
|
1971
|
-
async function
|
|
2026
|
+
async function Qe() {
|
|
1972
2027
|
if (o.fetchMetadata)
|
|
1973
2028
|
try {
|
|
1974
|
-
const
|
|
2029
|
+
const v = "https://phl.carto.com/api/v2/sql?q=" + encodeURIComponent(
|
|
1975
2030
|
"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"
|
|
1976
|
-
),
|
|
1977
|
-
if (!
|
|
1978
|
-
const
|
|
1979
|
-
for (const Q of
|
|
2031
|
+
), x = await fetch(v);
|
|
2032
|
+
if (!x.ok) return;
|
|
2033
|
+
const K = await x.json(), W = {};
|
|
2034
|
+
for (const Q of K.rows || [])
|
|
1980
2035
|
if (Q.url_text && Q.representation) {
|
|
1981
|
-
const
|
|
1982
|
-
W[
|
|
2036
|
+
const Se = Vt(Q.url_text), Ve = `https://metadata.phila.gov/#home/representationdetails/${Q.representation}/`;
|
|
2037
|
+
W[Se] = Ve;
|
|
1983
2038
|
}
|
|
1984
|
-
|
|
2039
|
+
d.value = W;
|
|
1985
2040
|
} catch {
|
|
1986
2041
|
}
|
|
1987
2042
|
}
|
|
1988
|
-
function
|
|
1989
|
-
p.value =
|
|
2043
|
+
function ct(v) {
|
|
2044
|
+
p.value = v, r("zoom", v);
|
|
1990
2045
|
}
|
|
1991
|
-
function
|
|
1992
|
-
|
|
2046
|
+
function ze(v) {
|
|
2047
|
+
y.value.has(v) ? y.value.delete(v) : y.value.add(v), y.value = new Set(y.value);
|
|
1993
2048
|
}
|
|
1994
|
-
function
|
|
1995
|
-
|
|
2049
|
+
function We(v, x) {
|
|
2050
|
+
x ? y.value.add(v) : y.value.delete(v), y.value = new Set(y.value);
|
|
1996
2051
|
}
|
|
1997
|
-
function
|
|
1998
|
-
for (const
|
|
1999
|
-
|
|
2000
|
-
|
|
2052
|
+
function $e(v, x) {
|
|
2053
|
+
for (const K of v)
|
|
2054
|
+
x ? y.value.add(K) : y.value.delete(K);
|
|
2055
|
+
y.value = new Set(y.value);
|
|
2001
2056
|
}
|
|
2002
|
-
function Pe(
|
|
2003
|
-
|
|
2057
|
+
function Pe(v, x) {
|
|
2058
|
+
h.value = { ...h.value, [v]: x };
|
|
2004
2059
|
}
|
|
2005
|
-
function
|
|
2006
|
-
|
|
2060
|
+
function je(v, x) {
|
|
2061
|
+
x ? a.value.add(v) : a.value.delete(v), a.value = new Set(a.value);
|
|
2007
2062
|
}
|
|
2008
|
-
function
|
|
2009
|
-
if (
|
|
2010
|
-
|
|
2063
|
+
function ut(v, x) {
|
|
2064
|
+
if (x)
|
|
2065
|
+
g.value = { ...g.value, [v]: x };
|
|
2011
2066
|
else {
|
|
2012
|
-
const
|
|
2013
|
-
delete
|
|
2067
|
+
const K = { ...g.value };
|
|
2068
|
+
delete K[v], g.value = K;
|
|
2014
2069
|
}
|
|
2015
2070
|
}
|
|
2016
|
-
function
|
|
2017
|
-
|
|
2071
|
+
function ce(v) {
|
|
2072
|
+
C.value = v;
|
|
2018
2073
|
}
|
|
2019
|
-
const
|
|
2020
|
-
function
|
|
2021
|
-
Le.value = Le.value === "sidebar" ? "map" : "sidebar",
|
|
2022
|
-
Le.value === "sidebar" &&
|
|
2074
|
+
const Fe = k(null), ae = k(null), De = k(null), Xe = k(null), be = k(null), qe = k(null), Ye = k(null), Le = k("sidebar");
|
|
2075
|
+
function dt() {
|
|
2076
|
+
Le.value = Le.value === "sidebar" ? "map" : "sidebar", Ze(() => {
|
|
2077
|
+
Le.value === "sidebar" && Fe.value?.focus();
|
|
2023
2078
|
});
|
|
2024
2079
|
}
|
|
2025
|
-
const
|
|
2026
|
-
function
|
|
2027
|
-
|
|
2028
|
-
|
|
2080
|
+
const le = k(!1);
|
|
2081
|
+
function Te() {
|
|
2082
|
+
le.value = !le.value, le.value && Ze(() => {
|
|
2083
|
+
Xe.value?.focus();
|
|
2029
2084
|
});
|
|
2030
2085
|
}
|
|
2031
|
-
function
|
|
2032
|
-
|
|
2033
|
-
|
|
2086
|
+
function Ie() {
|
|
2087
|
+
le.value = !1, Ze(() => {
|
|
2088
|
+
ae.value?.focus();
|
|
2034
2089
|
});
|
|
2035
2090
|
}
|
|
2036
|
-
const
|
|
2037
|
-
function
|
|
2038
|
-
|
|
2091
|
+
const pe = k(!1);
|
|
2092
|
+
function et() {
|
|
2093
|
+
pe.value = !pe.value;
|
|
2039
2094
|
}
|
|
2040
|
-
const
|
|
2041
|
-
function
|
|
2042
|
-
|
|
2043
|
-
|
|
2095
|
+
const ne = k(!1), _e = k(null);
|
|
2096
|
+
function Re() {
|
|
2097
|
+
_e.value = document.activeElement, ne.value = !0, Ze(() => {
|
|
2098
|
+
Ye.value?.focus();
|
|
2044
2099
|
});
|
|
2045
2100
|
}
|
|
2046
|
-
function
|
|
2047
|
-
|
|
2048
|
-
|
|
2101
|
+
function re() {
|
|
2102
|
+
ne.value = !1, Ze(() => {
|
|
2103
|
+
_e.value?.focus(), _e.value = null;
|
|
2049
2104
|
});
|
|
2050
2105
|
}
|
|
2051
|
-
function
|
|
2052
|
-
|
|
2106
|
+
function Ae(v) {
|
|
2107
|
+
v.target.classList.contains("layerboard-modal-backdrop") && re();
|
|
2053
2108
|
}
|
|
2054
|
-
function
|
|
2055
|
-
if (
|
|
2056
|
-
|
|
2109
|
+
function Be(v) {
|
|
2110
|
+
if (v.key === "Escape") {
|
|
2111
|
+
Ie();
|
|
2057
2112
|
return;
|
|
2058
2113
|
}
|
|
2059
|
-
if (
|
|
2060
|
-
const
|
|
2061
|
-
|
|
2114
|
+
if (v.key === "Tab" && be.value) {
|
|
2115
|
+
const x = Array.from(
|
|
2116
|
+
be.value.querySelectorAll(
|
|
2062
2117
|
'a[href], button:not([disabled]), textarea, input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
2063
2118
|
)
|
|
2064
2119
|
);
|
|
2065
|
-
if (
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2120
|
+
if (x.length === 0) return;
|
|
2121
|
+
const K = x[0], W = x[x.length - 1];
|
|
2122
|
+
v.shiftKey ? document.activeElement === K && (v.preventDefault(), W.focus()) : document.activeElement === W && (v.preventDefault(), K.focus());
|
|
2068
2123
|
}
|
|
2069
2124
|
}
|
|
2070
|
-
function
|
|
2071
|
-
if (
|
|
2072
|
-
|
|
2125
|
+
function ft(v) {
|
|
2126
|
+
if (v.key === "Escape") {
|
|
2127
|
+
re();
|
|
2073
2128
|
return;
|
|
2074
2129
|
}
|
|
2075
|
-
if (
|
|
2076
|
-
const
|
|
2077
|
-
|
|
2130
|
+
if (v.key === "Tab" && qe.value) {
|
|
2131
|
+
const x = Array.from(
|
|
2132
|
+
qe.value.querySelectorAll(
|
|
2078
2133
|
'a[href], button:not([disabled]), textarea, input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
2079
2134
|
)
|
|
2080
2135
|
);
|
|
2081
|
-
if (
|
|
2082
|
-
const
|
|
2083
|
-
|
|
2136
|
+
if (x.length === 0) return;
|
|
2137
|
+
const K = x[0], W = x[x.length - 1];
|
|
2138
|
+
v.shiftKey ? document.activeElement === K && (v.preventDefault(), W.focus()) : document.activeElement === W && (v.preventDefault(), K.focus());
|
|
2084
2139
|
}
|
|
2085
2140
|
}
|
|
2086
|
-
Z("layerboard-open-modal",
|
|
2141
|
+
Z("layerboard-open-modal", Re), Z("layerboard-close-modal", re), Z("layerboard-is-modal-open", q(ne)), i({
|
|
2087
2142
|
/** Layer configurations */
|
|
2088
2143
|
layerList: n,
|
|
2089
2144
|
/** Set of visible layer IDs */
|
|
2090
|
-
visibleLayers:
|
|
2145
|
+
visibleLayers: y,
|
|
2091
2146
|
/** Layer opacity values */
|
|
2092
|
-
layerOpacities:
|
|
2147
|
+
layerOpacities: h,
|
|
2093
2148
|
/** Set of currently loading layer IDs */
|
|
2094
2149
|
loadingLayers: a,
|
|
2095
2150
|
/** Map of layer errors by ID */
|
|
2096
|
-
layerErrors:
|
|
2151
|
+
layerErrors: g,
|
|
2097
2152
|
/** Current map zoom level */
|
|
2098
2153
|
currentZoom: p,
|
|
2099
2154
|
/** Toggle a layer's visibility */
|
|
2100
|
-
toggleLayer:
|
|
2155
|
+
toggleLayer: ze,
|
|
2101
2156
|
/** Set a layer's visibility explicitly */
|
|
2102
|
-
setLayerVisible:
|
|
2157
|
+
setLayerVisible: We,
|
|
2103
2158
|
/** Set multiple layers' visibility at once */
|
|
2104
|
-
setLayersVisible:
|
|
2159
|
+
setLayersVisible: $e,
|
|
2105
2160
|
/** Set a layer's opacity */
|
|
2106
2161
|
setLayerOpacity: Pe,
|
|
2107
2162
|
/** Reload layer configurations */
|
|
2108
|
-
reloadConfigs:
|
|
2163
|
+
reloadConfigs: Ue,
|
|
2109
2164
|
/** Clear configuration cache */
|
|
2110
|
-
clearCache: () =>
|
|
2165
|
+
clearCache: () => fa(o.webMapId),
|
|
2111
2166
|
// Tiled layer APIs
|
|
2112
2167
|
/** Set of visible tiled layer IDs */
|
|
2113
2168
|
visibleTiledLayers: L,
|
|
2114
2169
|
/** Tiled layer opacity values */
|
|
2115
2170
|
tiledLayerOpacities: S,
|
|
2116
2171
|
/** Toggle a tiled layer's visibility */
|
|
2117
|
-
toggleTiledLayer:
|
|
2172
|
+
toggleTiledLayer: F,
|
|
2118
2173
|
/** Set a tiled layer's visibility explicitly */
|
|
2119
|
-
setTiledLayerVisible:
|
|
2174
|
+
setTiledLayerVisible: V,
|
|
2120
2175
|
/** Set a tiled layer's opacity */
|
|
2121
2176
|
setTiledLayerOpacity: T,
|
|
2122
2177
|
// Data source APIs
|
|
2123
2178
|
/** State of all data sources */
|
|
2124
|
-
dataSourcesState:
|
|
2179
|
+
dataSourcesState: D,
|
|
2125
2180
|
/** Whether any data source is loading */
|
|
2126
2181
|
dataSourcesLoading: te,
|
|
2127
2182
|
/** Get data from a specific data source */
|
|
2128
2183
|
getDataSourceData: U,
|
|
2129
2184
|
/** Refetch a specific data source */
|
|
2130
|
-
refetchDataSource:
|
|
2185
|
+
refetchDataSource: fe,
|
|
2131
2186
|
// Modal APIs
|
|
2132
2187
|
/** Whether the modal is currently open */
|
|
2133
|
-
isModalOpen:
|
|
2188
|
+
isModalOpen: ne,
|
|
2134
2189
|
/** Open the modal */
|
|
2135
|
-
openModal:
|
|
2190
|
+
openModal: Re,
|
|
2136
2191
|
/** Close the modal */
|
|
2137
|
-
closeModal:
|
|
2192
|
+
closeModal: re
|
|
2138
2193
|
});
|
|
2139
|
-
function
|
|
2140
|
-
|
|
2141
|
-
}
|
|
2142
|
-
return
|
|
2143
|
-
|
|
2144
|
-
}),
|
|
2145
|
-
document.removeEventListener("keydown",
|
|
2146
|
-
}), (
|
|
2147
|
-
|
|
2194
|
+
function tt(v) {
|
|
2195
|
+
v.key === "Escape" && le.value && Ie();
|
|
2196
|
+
}
|
|
2197
|
+
return it(() => {
|
|
2198
|
+
Ue(), Qe(), I(), document.addEventListener("keydown", tt);
|
|
2199
|
+
}), Xt(() => {
|
|
2200
|
+
document.removeEventListener("keydown", tt);
|
|
2201
|
+
}), (v, x) => (m(), M("div", ga, [
|
|
2202
|
+
x[5] || (x[5] = P("a", {
|
|
2148
2203
|
href: "#main-content",
|
|
2149
2204
|
class: "skip-to-main-content-link"
|
|
2150
2205
|
}, "Skip to main content", -1)),
|
|
2151
2206
|
P("header", {
|
|
2152
2207
|
class: "layerboard-header",
|
|
2153
|
-
style:
|
|
2208
|
+
style: ye(ve.value)
|
|
2154
2209
|
}, [
|
|
2155
|
-
|
|
2210
|
+
x[1] || (x[1] = P("a", {
|
|
2156
2211
|
href: "https://www.phila.gov/",
|
|
2157
2212
|
class: "layerboard-logo layerboard-desktop-only"
|
|
2158
2213
|
}, [
|
|
@@ -2161,140 +2216,140 @@ const ya = { class: "layerboard-layout" }, ma = ["aria-expanded"], ha = {
|
|
|
2161
2216
|
alt: "City of Philadelphia"
|
|
2162
2217
|
})
|
|
2163
2218
|
], -1)),
|
|
2164
|
-
|
|
2219
|
+
x[2] || (x[2] = P("span", {
|
|
2165
2220
|
class: "layerboard-header-divider layerboard-desktop-only",
|
|
2166
2221
|
"aria-hidden": "true"
|
|
2167
2222
|
}, null, -1)),
|
|
2168
2223
|
P("button", {
|
|
2169
2224
|
ref_key: "hamburgerRef",
|
|
2170
|
-
ref:
|
|
2225
|
+
ref: ae,
|
|
2171
2226
|
class: "layerboard-hamburger layerboard-mobile-only",
|
|
2172
|
-
"aria-expanded":
|
|
2227
|
+
"aria-expanded": le.value,
|
|
2173
2228
|
"aria-label": "Toggle menu",
|
|
2174
|
-
onClick:
|
|
2229
|
+
onClick: Te
|
|
2175
2230
|
}, [
|
|
2176
|
-
|
|
2177
|
-
"icon-definition":
|
|
2231
|
+
J(f(Ce), {
|
|
2232
|
+
"icon-definition": f(Mo),
|
|
2178
2233
|
size: "medium",
|
|
2179
2234
|
inline: "",
|
|
2180
2235
|
decorative: ""
|
|
2181
2236
|
}, null, 8, ["icon-definition"])
|
|
2182
|
-
], 8,
|
|
2183
|
-
|
|
2184
|
-
P("h1", null,
|
|
2185
|
-
e.subtitle ? (m(),
|
|
2237
|
+
], 8, va),
|
|
2238
|
+
me(v.$slots, "header", {}, () => [
|
|
2239
|
+
P("h1", null, H(e.title), 1),
|
|
2240
|
+
e.subtitle ? (m(), M("span", ba, H(e.subtitle), 1)) : R("", !0)
|
|
2186
2241
|
], !0),
|
|
2187
|
-
|
|
2242
|
+
le.value ? (m(), M("div", {
|
|
2188
2243
|
key: 0,
|
|
2189
2244
|
ref_key: "mobileMenuRef",
|
|
2190
|
-
ref:
|
|
2245
|
+
ref: be,
|
|
2191
2246
|
class: "layerboard-mobile-menu",
|
|
2192
2247
|
role: "dialog",
|
|
2193
2248
|
"aria-modal": "true",
|
|
2194
2249
|
"aria-label": "Site menu",
|
|
2195
|
-
style:
|
|
2196
|
-
onKeydown:
|
|
2250
|
+
style: ye({ backgroundColor: e.themeColor }),
|
|
2251
|
+
onKeydown: Be
|
|
2197
2252
|
}, [
|
|
2198
|
-
P("div",
|
|
2199
|
-
|
|
2200
|
-
openModal:
|
|
2201
|
-
closeModal:
|
|
2202
|
-
isModalOpen:
|
|
2253
|
+
P("div", wa, [
|
|
2254
|
+
me(v.$slots, "footer", {
|
|
2255
|
+
openModal: Re,
|
|
2256
|
+
closeModal: re,
|
|
2257
|
+
isModalOpen: ne.value
|
|
2203
2258
|
}, () => [
|
|
2204
|
-
|
|
2259
|
+
x[0] || (x[0] = ke(" City of Philadelphia ", -1))
|
|
2205
2260
|
], !0)
|
|
2206
2261
|
]),
|
|
2207
2262
|
P("button", {
|
|
2208
2263
|
ref_key: "mobileMenuCloseRef",
|
|
2209
|
-
ref:
|
|
2264
|
+
ref: Xe,
|
|
2210
2265
|
class: "layerboard-mobile-menu-close",
|
|
2211
2266
|
"aria-label": "Close menu",
|
|
2212
|
-
onClick:
|
|
2267
|
+
onClick: Ie
|
|
2213
2268
|
}, [
|
|
2214
|
-
|
|
2215
|
-
"icon-definition":
|
|
2269
|
+
J(f(Ce), {
|
|
2270
|
+
"icon-definition": f(Ot),
|
|
2216
2271
|
size: "medium",
|
|
2217
2272
|
decorative: ""
|
|
2218
2273
|
}, null, 8, ["icon-definition"])
|
|
2219
2274
|
], 512)
|
|
2220
2275
|
], 36)) : R("", !0),
|
|
2221
|
-
|
|
2276
|
+
le.value ? (m(), M("div", {
|
|
2222
2277
|
key: 1,
|
|
2223
2278
|
class: "layerboard-mobile-menu-backdrop",
|
|
2224
|
-
onClick:
|
|
2279
|
+
onClick: Ie
|
|
2225
2280
|
})) : R("", !0)
|
|
2226
2281
|
], 4),
|
|
2227
|
-
P("div",
|
|
2228
|
-
|
|
2282
|
+
P("div", La, [
|
|
2283
|
+
u.value ? (m(), M("div", Sa, [
|
|
2229
2284
|
P("div", {
|
|
2230
2285
|
class: "layerboard-spinner",
|
|
2231
|
-
style:
|
|
2286
|
+
style: ye({ borderTopColor: e.themeColor })
|
|
2232
2287
|
}, null, 4),
|
|
2233
|
-
P("p", null, "Loading " +
|
|
2234
|
-
])) : w.value ? (m(),
|
|
2235
|
-
|
|
2236
|
-
P("p", null,
|
|
2288
|
+
P("p", null, "Loading " + H(e.title) + "...", 1)
|
|
2289
|
+
])) : w.value ? (m(), M("div", Ca, [
|
|
2290
|
+
x[3] || (x[3] = P("h2", null, "Error Loading Layers", -1)),
|
|
2291
|
+
P("p", null, H(w.value), 1),
|
|
2237
2292
|
P("button", {
|
|
2238
2293
|
class: "layerboard-retry-button",
|
|
2239
|
-
style:
|
|
2240
|
-
onClick:
|
|
2294
|
+
style: ye({ backgroundColor: e.themeColor }),
|
|
2295
|
+
onClick: Ue
|
|
2241
2296
|
}, " Retry ", 4)
|
|
2242
|
-
])) : (m(),
|
|
2297
|
+
])) : (m(), M(de, { key: 2 }, [
|
|
2243
2298
|
P("aside", {
|
|
2244
2299
|
id: "main-content",
|
|
2245
2300
|
ref_key: "sidebarRef",
|
|
2246
|
-
ref:
|
|
2247
|
-
class:
|
|
2248
|
-
style:
|
|
2301
|
+
ref: Fe,
|
|
2302
|
+
class: se(["layerboard-sidebar", { "is-active": Le.value === "sidebar" }]),
|
|
2303
|
+
style: ye(Ke.value),
|
|
2249
2304
|
"aria-label": "Map layers",
|
|
2250
2305
|
tabindex: "-1"
|
|
2251
2306
|
}, [
|
|
2252
|
-
|
|
2307
|
+
me(v.$slots, "sidebar", {
|
|
2253
2308
|
layers: n.value,
|
|
2254
|
-
visibleLayers:
|
|
2255
|
-
layerOpacities:
|
|
2309
|
+
visibleLayers: y.value,
|
|
2310
|
+
layerOpacities: h.value,
|
|
2256
2311
|
loadingLayers: a.value,
|
|
2257
|
-
layerErrors:
|
|
2312
|
+
layerErrors: g.value,
|
|
2258
2313
|
currentZoom: p.value,
|
|
2259
|
-
toggleLayer:
|
|
2260
|
-
setLayerVisible:
|
|
2261
|
-
setLayersVisible:
|
|
2314
|
+
toggleLayer: ze,
|
|
2315
|
+
setLayerVisible: We,
|
|
2316
|
+
setLayersVisible: $e,
|
|
2262
2317
|
setOpacity: Pe,
|
|
2263
2318
|
tiledLayers: e.tiledLayers,
|
|
2264
2319
|
visibleTiledLayers: L.value,
|
|
2265
2320
|
tiledLayerOpacities: S.value,
|
|
2266
|
-
toggleTiledLayer:
|
|
2267
|
-
setTiledLayerVisible:
|
|
2321
|
+
toggleTiledLayer: F,
|
|
2322
|
+
setTiledLayerVisible: V,
|
|
2268
2323
|
setTiledLayerOpacity: T,
|
|
2269
|
-
dataSourcesState:
|
|
2324
|
+
dataSourcesState: D.value,
|
|
2270
2325
|
dataSourcesLoading: te.value,
|
|
2271
2326
|
getDataSource: U,
|
|
2272
|
-
refetchDataSource:
|
|
2327
|
+
refetchDataSource: fe
|
|
2273
2328
|
}, () => [
|
|
2274
|
-
e.showDefaultSidebar ? (m(),
|
|
2329
|
+
e.showDefaultSidebar ? (m(), G(Ko, {
|
|
2275
2330
|
key: 0,
|
|
2276
2331
|
"layer-list": n.value,
|
|
2277
|
-
"visible-layers":
|
|
2278
|
-
"layer-opacities":
|
|
2332
|
+
"visible-layers": y.value,
|
|
2333
|
+
"layer-opacities": h.value,
|
|
2279
2334
|
"loading-layers": a.value,
|
|
2280
|
-
"layer-errors":
|
|
2335
|
+
"layer-errors": g.value,
|
|
2281
2336
|
"current-zoom": p.value,
|
|
2282
|
-
"search-query":
|
|
2283
|
-
"layer-metadata":
|
|
2284
|
-
onToggleLayer:
|
|
2337
|
+
"search-query": C.value,
|
|
2338
|
+
"layer-metadata": d.value,
|
|
2339
|
+
onToggleLayer: ze,
|
|
2285
2340
|
onSetOpacity: Pe,
|
|
2286
|
-
onUpdateSearch:
|
|
2341
|
+
onUpdateSearch: ce
|
|
2287
2342
|
}, null, 8, ["layer-list", "visible-layers", "layer-opacities", "loading-layers", "layer-errors", "current-zoom", "search-query", "layer-metadata"])) : R("", !0)
|
|
2288
2343
|
], !0)
|
|
2289
2344
|
], 6),
|
|
2290
2345
|
P("div", {
|
|
2291
2346
|
role: "main",
|
|
2292
2347
|
"aria-label": "Map",
|
|
2293
|
-
class:
|
|
2348
|
+
class: se(["layerboard-map", { "is-active": Le.value === "map" }])
|
|
2294
2349
|
}, [
|
|
2295
|
-
|
|
2296
|
-
"visible-layers":
|
|
2297
|
-
"layer-opacities":
|
|
2350
|
+
J(so, {
|
|
2351
|
+
"visible-layers": y.value,
|
|
2352
|
+
"layer-opacities": h.value,
|
|
2298
2353
|
"layer-list": n.value,
|
|
2299
2354
|
"tiled-layers": e.tiledLayers,
|
|
2300
2355
|
"visible-tiled-layers": L.value,
|
|
@@ -2310,56 +2365,56 @@ const ya = { class: "layerboard-layout" }, ma = ["aria-expanded"], ha = {
|
|
|
2310
2365
|
"pictometry-button-position": e.pictometryButtonPosition,
|
|
2311
2366
|
"initial-zoom": e.initialZoom,
|
|
2312
2367
|
"initial-center": e.initialCenter,
|
|
2313
|
-
onZoom:
|
|
2314
|
-
onLayerLoading:
|
|
2315
|
-
onLayerError:
|
|
2368
|
+
onZoom: ct,
|
|
2369
|
+
onLayerLoading: je,
|
|
2370
|
+
onLayerError: ut
|
|
2316
2371
|
}, 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"])
|
|
2317
2372
|
], 2),
|
|
2318
2373
|
P("button", {
|
|
2319
|
-
class:
|
|
2320
|
-
style:
|
|
2321
|
-
"aria-expanded": !
|
|
2322
|
-
"aria-label":
|
|
2323
|
-
onClick:
|
|
2374
|
+
class: se(["layerboard-sidebar-toggle", { "is-collapsed": pe.value }]),
|
|
2375
|
+
style: ye({ left: pe.value ? "0" : o.sidebarWidth }),
|
|
2376
|
+
"aria-expanded": !pe.value,
|
|
2377
|
+
"aria-label": pe.value ? "Expand sidebar" : "Collapse sidebar",
|
|
2378
|
+
onClick: et
|
|
2324
2379
|
}, [
|
|
2325
|
-
|
|
2326
|
-
"icon-definition":
|
|
2380
|
+
J(f(Ce), {
|
|
2381
|
+
"icon-definition": pe.value ? f(xo) : f($o),
|
|
2327
2382
|
size: "medium",
|
|
2328
2383
|
decorative: ""
|
|
2329
2384
|
}, null, 8, ["icon-definition"])
|
|
2330
|
-
], 14,
|
|
2385
|
+
], 14, ka)
|
|
2331
2386
|
], 64))
|
|
2332
2387
|
]),
|
|
2333
2388
|
P("button", {
|
|
2334
2389
|
ref_key: "mobileToggleRef",
|
|
2335
|
-
ref:
|
|
2390
|
+
ref: De,
|
|
2336
2391
|
class: "layerboard-mobile-toggle",
|
|
2337
|
-
style:
|
|
2338
|
-
onClick:
|
|
2392
|
+
style: ye(Ne.value),
|
|
2393
|
+
onClick: dt
|
|
2339
2394
|
}, [
|
|
2340
|
-
Le.value === "map" ? (m(),
|
|
2395
|
+
Le.value === "map" ? (m(), M("span", xa, H(e.sidebarLabel), 1)) : (m(), M("span", $a, H(e.mapLabel), 1))
|
|
2341
2396
|
], 4),
|
|
2342
2397
|
P("footer", {
|
|
2343
2398
|
class: "layerboard-footer",
|
|
2344
|
-
style:
|
|
2399
|
+
style: ye(st.value)
|
|
2345
2400
|
}, [
|
|
2346
|
-
|
|
2347
|
-
openModal:
|
|
2348
|
-
closeModal:
|
|
2349
|
-
isModalOpen:
|
|
2401
|
+
me(v.$slots, "footer", {
|
|
2402
|
+
openModal: Re,
|
|
2403
|
+
closeModal: re,
|
|
2404
|
+
isModalOpen: ne.value
|
|
2350
2405
|
}, () => [
|
|
2351
|
-
|
|
2406
|
+
x[4] || (x[4] = ke(" City of Philadelphia ", -1))
|
|
2352
2407
|
], !0)
|
|
2353
2408
|
], 4),
|
|
2354
|
-
|
|
2409
|
+
ne.value ? (m(), M("div", {
|
|
2355
2410
|
key: 0,
|
|
2356
2411
|
class: "layerboard-modal-backdrop",
|
|
2357
|
-
onClick:
|
|
2358
|
-
onKeydown:
|
|
2412
|
+
onClick: Ae,
|
|
2413
|
+
onKeydown: ft
|
|
2359
2414
|
}, [
|
|
2360
2415
|
P("div", {
|
|
2361
2416
|
ref_key: "modalRef",
|
|
2362
|
-
ref:
|
|
2417
|
+
ref: qe,
|
|
2363
2418
|
class: "layerboard-modal",
|
|
2364
2419
|
role: "dialog",
|
|
2365
2420
|
"aria-modal": "true",
|
|
@@ -2367,27 +2422,27 @@ const ya = { class: "layerboard-layout" }, ma = ["aria-expanded"], ha = {
|
|
|
2367
2422
|
}, [
|
|
2368
2423
|
P("button", {
|
|
2369
2424
|
ref_key: "modalCloseRef",
|
|
2370
|
-
ref:
|
|
2425
|
+
ref: Ye,
|
|
2371
2426
|
class: "layerboard-modal-close",
|
|
2372
2427
|
"aria-label": "Close modal",
|
|
2373
|
-
onClick:
|
|
2428
|
+
onClick: re
|
|
2374
2429
|
}, [
|
|
2375
|
-
|
|
2376
|
-
"icon-definition":
|
|
2430
|
+
J(f(Ce), {
|
|
2431
|
+
"icon-definition": f(Ot),
|
|
2377
2432
|
size: "medium",
|
|
2378
2433
|
decorative: ""
|
|
2379
2434
|
}, null, 8, ["icon-definition"])
|
|
2380
2435
|
], 512),
|
|
2381
|
-
|
|
2436
|
+
me(v.$slots, "modal", { closeModal: re }, void 0, !0)
|
|
2382
2437
|
], 512)
|
|
2383
2438
|
], 32)) : R("", !0),
|
|
2384
|
-
P("span",
|
|
2439
|
+
P("span", Ma, H(Le.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
|
|
2385
2440
|
]));
|
|
2386
2441
|
}
|
|
2387
|
-
}),
|
|
2442
|
+
}), Qa = /* @__PURE__ */ xe(Pa, [["__scopeId", "data-v-0a7b6d44"]]), Fa = ["aria-expanded"], Ta = {
|
|
2388
2443
|
key: 0,
|
|
2389
2444
|
class: "topic-icon"
|
|
2390
|
-
},
|
|
2445
|
+
}, Ia = { class: "topic-title" }, Ea = /* @__PURE__ */ ge({
|
|
2391
2446
|
__name: "TopicAccordion",
|
|
2392
2447
|
props: {
|
|
2393
2448
|
title: {},
|
|
@@ -2398,8 +2453,8 @@ const ya = { class: "layerboard-layout" }, ma = ["aria-expanded"], ha = {
|
|
|
2398
2453
|
},
|
|
2399
2454
|
emits: ["toggle", "layerChange"],
|
|
2400
2455
|
setup(e, { emit: i }) {
|
|
2401
|
-
const l = e, o = i, r = k(l.expanded), n = `topic-panel-${
|
|
2402
|
-
|
|
2456
|
+
const l = e, o = i, r = k(l.expanded), n = `topic-panel-${Pt()}`, u = `topic-header-${Pt()}`;
|
|
2457
|
+
Ee(
|
|
2403
2458
|
() => l.expanded,
|
|
2404
2459
|
(p) => {
|
|
2405
2460
|
r.value = p;
|
|
@@ -2408,32 +2463,32 @@ const ya = { class: "layerboard-layout" }, ma = ["aria-expanded"], ha = {
|
|
|
2408
2463
|
function w() {
|
|
2409
2464
|
r.value = !r.value, o("toggle", r.value);
|
|
2410
2465
|
}
|
|
2411
|
-
return (p,
|
|
2412
|
-
const
|
|
2413
|
-
return m(),
|
|
2414
|
-
class:
|
|
2466
|
+
return (p, C) => {
|
|
2467
|
+
const y = Yt("font-awesome-icon");
|
|
2468
|
+
return m(), M("div", {
|
|
2469
|
+
class: se(["topic-accordion", { "is-expanded": r.value }])
|
|
2415
2470
|
}, [
|
|
2416
2471
|
P("button", {
|
|
2417
|
-
id:
|
|
2418
|
-
class:
|
|
2472
|
+
id: u,
|
|
2473
|
+
class: se(["topic-header", e.headerClass]),
|
|
2419
2474
|
type: "button",
|
|
2420
2475
|
"aria-expanded": r.value,
|
|
2421
2476
|
"aria-controls": n,
|
|
2422
2477
|
onClick: w
|
|
2423
2478
|
}, [
|
|
2424
|
-
e.icon || p.$slots.icon ? (m(),
|
|
2425
|
-
|
|
2426
|
-
e.icon ? (m(),
|
|
2479
|
+
e.icon || p.$slots.icon ? (m(), M("span", Ta, [
|
|
2480
|
+
me(p.$slots, "icon", {}, () => [
|
|
2481
|
+
e.icon ? (m(), G(y, {
|
|
2427
2482
|
key: 0,
|
|
2428
2483
|
icon: ["fas", e.icon],
|
|
2429
2484
|
"aria-hidden": "true"
|
|
2430
2485
|
}, null, 8, ["icon"])) : R("", !0)
|
|
2431
2486
|
], !0)
|
|
2432
2487
|
])) : R("", !0),
|
|
2433
|
-
P("span",
|
|
2488
|
+
P("span", Ia, H(e.title), 1),
|
|
2434
2489
|
P("span", {
|
|
2435
|
-
class:
|
|
2436
|
-
}, [...
|
|
2490
|
+
class: se(["topic-chevron", { "is-rotated": r.value }])
|
|
2491
|
+
}, [...C[0] || (C[0] = [
|
|
2437
2492
|
P("svg", {
|
|
2438
2493
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2439
2494
|
width: "20",
|
|
@@ -2449,39 +2504,39 @@ const ya = { class: "layerboard-layout" }, ma = ["aria-expanded"], ha = {
|
|
|
2449
2504
|
P("polyline", { points: "6 9 12 15 18 9" })
|
|
2450
2505
|
], -1)
|
|
2451
2506
|
])], 2)
|
|
2452
|
-
], 10,
|
|
2453
|
-
|
|
2507
|
+
], 10, Fa),
|
|
2508
|
+
Bt(P("div", {
|
|
2454
2509
|
id: n,
|
|
2455
2510
|
role: "region",
|
|
2456
|
-
"aria-labelledby":
|
|
2511
|
+
"aria-labelledby": u,
|
|
2457
2512
|
class: "topic-content"
|
|
2458
2513
|
}, [
|
|
2459
|
-
|
|
2460
|
-
|
|
2514
|
+
me(p.$slots, "default", {}, () => [
|
|
2515
|
+
C[1] || (C[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
|
|
2461
2516
|
], !0)
|
|
2462
2517
|
], 512), [
|
|
2463
|
-
[
|
|
2518
|
+
[eo, r.value]
|
|
2464
2519
|
])
|
|
2465
2520
|
], 2);
|
|
2466
2521
|
};
|
|
2467
2522
|
}
|
|
2468
|
-
}),
|
|
2469
|
-
function
|
|
2523
|
+
}), Xa = /* @__PURE__ */ xe(Ea, [["__scopeId", "data-v-a2023afa"]]);
|
|
2524
|
+
function Oa(e) {
|
|
2470
2525
|
return e.displayOptions?.shouldShowCheckbox !== !1;
|
|
2471
2526
|
}
|
|
2472
|
-
function
|
|
2527
|
+
function Ut(e, i) {
|
|
2473
2528
|
return i ? e.displayOptions?.shouldShowSlider !== !1 : !1;
|
|
2474
2529
|
}
|
|
2475
|
-
function
|
|
2530
|
+
function Wt(e, i) {
|
|
2476
2531
|
return i ? e.displayOptions?.shouldShowLegendBox !== !1 : !1;
|
|
2477
2532
|
}
|
|
2478
|
-
function
|
|
2533
|
+
function Oe(e) {
|
|
2479
2534
|
return e.displayOptions?.layerNameChange || e.title;
|
|
2480
2535
|
}
|
|
2481
|
-
const
|
|
2536
|
+
const za = ["aria-label"], Da = ["checked", "disabled", "onChange"], _a = { class: "layer-title" }, Ra = { class: "layer-title" }, Aa = {
|
|
2482
2537
|
key: 0,
|
|
2483
2538
|
class: "empty-state"
|
|
2484
|
-
},
|
|
2539
|
+
}, Ba = /* @__PURE__ */ ge({
|
|
2485
2540
|
__name: "LayerCheckboxSet",
|
|
2486
2541
|
props: {
|
|
2487
2542
|
layers: {},
|
|
@@ -2496,78 +2551,78 @@ const Ea = ["aria-label"], Oa = ["checked", "disabled", "onChange"], Ia = { clas
|
|
|
2496
2551
|
},
|
|
2497
2552
|
emits: ["toggleLayer", "setOpacity"],
|
|
2498
2553
|
setup(e, { emit: i }) {
|
|
2499
|
-
const l = e, o = i, { isVisible: r, getLayerOpacity: n, isLayerLoading:
|
|
2554
|
+
const l = e, o = i, { isVisible: r, getLayerOpacity: n, isLayerLoading: u, getLayerError: w, isLayerAvailableAtZoom: p } = Lt(
|
|
2500
2555
|
() => l
|
|
2501
2556
|
);
|
|
2502
|
-
function
|
|
2503
|
-
o("toggleLayer",
|
|
2557
|
+
function C(y) {
|
|
2558
|
+
o("toggleLayer", y);
|
|
2504
2559
|
}
|
|
2505
|
-
return (
|
|
2560
|
+
return (y, h) => (m(), M("fieldset", {
|
|
2506
2561
|
class: "layer-checkbox-set",
|
|
2507
2562
|
role: "group",
|
|
2508
2563
|
"aria-label": e.groupLabel
|
|
2509
2564
|
}, [
|
|
2510
|
-
(m(!0),
|
|
2565
|
+
(m(!0), M(de, null, we(e.layers, (a) => (m(), M("div", {
|
|
2511
2566
|
key: a.id,
|
|
2512
2567
|
class: "layer-item"
|
|
2513
2568
|
}, [
|
|
2514
|
-
|
|
2569
|
+
f(Oa)(a) ? (m(), M("label", {
|
|
2515
2570
|
key: 0,
|
|
2516
|
-
class:
|
|
2517
|
-
"layer-unavailable": !
|
|
2518
|
-
"layer-error":
|
|
2571
|
+
class: se(["layer-checkbox", {
|
|
2572
|
+
"layer-unavailable": !f(p)(a),
|
|
2573
|
+
"layer-error": f(w)(a.id)
|
|
2519
2574
|
}])
|
|
2520
2575
|
}, [
|
|
2521
2576
|
P("input", {
|
|
2522
2577
|
type: "checkbox",
|
|
2523
|
-
checked:
|
|
2524
|
-
disabled: !
|
|
2525
|
-
onChange: (
|
|
2526
|
-
}, null, 40,
|
|
2527
|
-
P("span",
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
loading:
|
|
2531
|
-
error:
|
|
2532
|
-
unavailable: !
|
|
2578
|
+
checked: f(r)(a.id),
|
|
2579
|
+
disabled: !f(p)(a),
|
|
2580
|
+
onChange: (g) => C(a.id)
|
|
2581
|
+
}, null, 40, Da),
|
|
2582
|
+
P("span", _a, [
|
|
2583
|
+
ke(H(f(Oe)(a)) + " ", 1),
|
|
2584
|
+
J(lt, {
|
|
2585
|
+
loading: f(u)(a.id),
|
|
2586
|
+
error: f(w)(a.id),
|
|
2587
|
+
unavailable: !f(p)(a)
|
|
2533
2588
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2534
2589
|
])
|
|
2535
|
-
], 2)) : (m(),
|
|
2590
|
+
], 2)) : (m(), M("div", {
|
|
2536
2591
|
key: 1,
|
|
2537
|
-
class:
|
|
2538
|
-
"layer-unavailable": !
|
|
2539
|
-
"layer-error":
|
|
2592
|
+
class: se(["layer-label-only", {
|
|
2593
|
+
"layer-unavailable": !f(p)(a),
|
|
2594
|
+
"layer-error": f(w)(a.id)
|
|
2540
2595
|
}])
|
|
2541
2596
|
}, [
|
|
2542
|
-
P("span",
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
loading:
|
|
2546
|
-
error:
|
|
2547
|
-
unavailable: !
|
|
2597
|
+
P("span", Ra, [
|
|
2598
|
+
ke(H(f(Oe)(a)) + " ", 1),
|
|
2599
|
+
J(lt, {
|
|
2600
|
+
loading: f(u)(a.id),
|
|
2601
|
+
error: f(w)(a.id),
|
|
2602
|
+
unavailable: !f(p)(a)
|
|
2548
2603
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2549
2604
|
])
|
|
2550
2605
|
], 2)),
|
|
2551
|
-
|
|
2606
|
+
f(Ut)(a, e.showOpacity) && f(r)(a.id) && f(p)(a) ? (m(), G(bt, {
|
|
2552
2607
|
key: 2,
|
|
2553
2608
|
"layer-id": a.id,
|
|
2554
|
-
"layer-name":
|
|
2555
|
-
opacity:
|
|
2556
|
-
"onUpdate:opacity": (
|
|
2609
|
+
"layer-name": f(Oe)(a),
|
|
2610
|
+
opacity: f(n)(a.id),
|
|
2611
|
+
"onUpdate:opacity": (g) => o("setOpacity", a.id, g)
|
|
2557
2612
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : R("", !0),
|
|
2558
|
-
|
|
2613
|
+
f(Wt)(a, e.showLegend) && f(r)(a.id) && f(p)(a) && a.legend?.length ? (m(), G(wt, {
|
|
2559
2614
|
key: 3,
|
|
2560
2615
|
items: a.legend,
|
|
2561
|
-
label: "Legend for " +
|
|
2616
|
+
label: "Legend for " + f(Oe)(a)
|
|
2562
2617
|
}, null, 8, ["items", "label"])) : R("", !0)
|
|
2563
2618
|
]))), 128)),
|
|
2564
|
-
e.layers.length === 0 ? (m(),
|
|
2565
|
-
], 8,
|
|
2619
|
+
e.layers.length === 0 ? (m(), M("div", Aa, "No layers available")) : R("", !0)
|
|
2620
|
+
], 8, za));
|
|
2566
2621
|
}
|
|
2567
|
-
}),
|
|
2622
|
+
}), Ya = /* @__PURE__ */ xe(Ba, [["__scopeId", "data-v-bfcd7855"]]), Va = ["aria-label"], Za = ["name", "checked", "disabled", "onChange"], Na = { class: "layer-title" }, Ua = {
|
|
2568
2623
|
key: 0,
|
|
2569
2624
|
class: "empty-state"
|
|
2570
|
-
},
|
|
2625
|
+
}, Wa = /* @__PURE__ */ ge({
|
|
2571
2626
|
__name: "LayerRadioButtonSet",
|
|
2572
2627
|
props: {
|
|
2573
2628
|
layers: {},
|
|
@@ -2583,97 +2638,97 @@ const Ea = ["aria-label"], Oa = ["checked", "disabled", "onChange"], Ia = { clas
|
|
|
2583
2638
|
},
|
|
2584
2639
|
emits: ["selectLayer", "setOpacity"],
|
|
2585
2640
|
setup(e, { emit: i }) {
|
|
2586
|
-
const l = e, o = i, { isVisible: r, getLayerOpacity: n, isLayerLoading:
|
|
2641
|
+
const l = e, o = i, { isVisible: r, getLayerOpacity: n, isLayerLoading: u, getLayerError: w, isLayerAvailableAtZoom: p } = Lt(
|
|
2587
2642
|
() => l
|
|
2588
2643
|
);
|
|
2589
|
-
function
|
|
2590
|
-
const
|
|
2591
|
-
o("selectLayer",
|
|
2644
|
+
function C(y) {
|
|
2645
|
+
const h = l.layers.filter((a) => l.visibleLayerIds.has(a.id) && a.id !== y).map((a) => a.id);
|
|
2646
|
+
o("selectLayer", y, h);
|
|
2592
2647
|
}
|
|
2593
|
-
return (
|
|
2648
|
+
return (y, h) => (m(), M("div", {
|
|
2594
2649
|
class: "layer-radio-set",
|
|
2595
2650
|
role: "radiogroup",
|
|
2596
2651
|
"aria-label": e.groupLabel
|
|
2597
2652
|
}, [
|
|
2598
|
-
(m(!0),
|
|
2653
|
+
(m(!0), M(de, null, we(e.layers, (a) => (m(), M("div", {
|
|
2599
2654
|
key: a.id,
|
|
2600
2655
|
class: "layer-item"
|
|
2601
2656
|
}, [
|
|
2602
2657
|
P("label", {
|
|
2603
|
-
class:
|
|
2604
|
-
"layer-unavailable": !
|
|
2605
|
-
"layer-error":
|
|
2658
|
+
class: se(["layer-radio", {
|
|
2659
|
+
"layer-unavailable": !f(p)(a),
|
|
2660
|
+
"layer-error": f(w)(a.id)
|
|
2606
2661
|
}])
|
|
2607
2662
|
}, [
|
|
2608
2663
|
P("input", {
|
|
2609
2664
|
type: "radio",
|
|
2610
2665
|
name: e.groupName,
|
|
2611
|
-
checked:
|
|
2612
|
-
disabled: !
|
|
2613
|
-
onChange: (
|
|
2614
|
-
}, null, 40,
|
|
2615
|
-
P("span",
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
loading:
|
|
2619
|
-
error:
|
|
2620
|
-
unavailable: !
|
|
2666
|
+
checked: f(r)(a.id),
|
|
2667
|
+
disabled: !f(p)(a),
|
|
2668
|
+
onChange: (g) => C(a.id)
|
|
2669
|
+
}, null, 40, Za),
|
|
2670
|
+
P("span", Na, [
|
|
2671
|
+
ke(H(f(Oe)(a)) + " ", 1),
|
|
2672
|
+
J(lt, {
|
|
2673
|
+
loading: f(u)(a.id),
|
|
2674
|
+
error: f(w)(a.id),
|
|
2675
|
+
unavailable: !f(p)(a)
|
|
2621
2676
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2622
2677
|
])
|
|
2623
2678
|
], 2),
|
|
2624
|
-
|
|
2679
|
+
f(Ut)(a, e.showOpacity) && f(r)(a.id) && f(p)(a) ? (m(), G(bt, {
|
|
2625
2680
|
key: 0,
|
|
2626
2681
|
"layer-id": a.id,
|
|
2627
|
-
"layer-name":
|
|
2628
|
-
opacity:
|
|
2629
|
-
"onUpdate:opacity": (
|
|
2682
|
+
"layer-name": f(Oe)(a),
|
|
2683
|
+
opacity: f(n)(a.id),
|
|
2684
|
+
"onUpdate:opacity": (g) => o("setOpacity", a.id, g)
|
|
2630
2685
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : R("", !0),
|
|
2631
|
-
|
|
2686
|
+
f(Wt)(a, e.showLegend) && f(r)(a.id) && f(p)(a) && a.legend?.length ? (m(), G(wt, {
|
|
2632
2687
|
key: 1,
|
|
2633
2688
|
items: a.legend,
|
|
2634
|
-
label: "Legend for " +
|
|
2689
|
+
label: "Legend for " + f(Oe)(a)
|
|
2635
2690
|
}, null, 8, ["items", "label"])) : R("", !0)
|
|
2636
2691
|
]))), 128)),
|
|
2637
|
-
e.layers.length === 0 ? (m(),
|
|
2638
|
-
], 8,
|
|
2692
|
+
e.layers.length === 0 ? (m(), M("div", Ua, "No layers available")) : R("", !0)
|
|
2693
|
+
], 8, Va));
|
|
2639
2694
|
}
|
|
2640
|
-
}),
|
|
2641
|
-
function
|
|
2642
|
-
const i = k([]), l = k(/* @__PURE__ */ new Set()), o = k({}), r = k(/* @__PURE__ */ new Set()), n = k({}),
|
|
2643
|
-
if (!
|
|
2695
|
+
}), ei = /* @__PURE__ */ xe(Wa, [["__scopeId", "data-v-c368d815"]]);
|
|
2696
|
+
function ti(e) {
|
|
2697
|
+
const i = k([]), l = k(/* @__PURE__ */ new Set()), o = k({}), r = k(/* @__PURE__ */ new Set()), n = k({}), u = k(""), w = k(!1), p = k(!1), C = k(null), y = _(() => {
|
|
2698
|
+
if (!u.value.trim())
|
|
2644
2699
|
return i.value;
|
|
2645
|
-
const T =
|
|
2700
|
+
const T = u.value.toLowerCase();
|
|
2646
2701
|
return i.value.filter((O) => O.title.toLowerCase().includes(T));
|
|
2647
|
-
}),
|
|
2702
|
+
}), h = _(() => i.value.map((T) => ({
|
|
2648
2703
|
config: T,
|
|
2649
2704
|
component: T.type
|
|
2650
2705
|
// "circle", "fill", or "line"
|
|
2651
2706
|
})));
|
|
2652
2707
|
async function a() {
|
|
2653
2708
|
if (!p.value) {
|
|
2654
|
-
w.value = !0,
|
|
2709
|
+
w.value = !0, C.value = null;
|
|
2655
2710
|
try {
|
|
2656
2711
|
let T;
|
|
2657
|
-
e.mode === "dynamic" || !e.mode ? e.webMapId ? T = await
|
|
2712
|
+
e.mode === "dynamic" || !e.mode ? e.webMapId ? T = await g(e.webMapId) : T = await vt() : T = await vt(), i.value = T;
|
|
2658
2713
|
const O = {};
|
|
2659
|
-
T.forEach((
|
|
2660
|
-
O[
|
|
2714
|
+
T.forEach((D) => {
|
|
2715
|
+
O[D.id] = D.opacity ?? 1;
|
|
2661
2716
|
}), o.value = O, p.value = !0;
|
|
2662
2717
|
} catch (T) {
|
|
2663
|
-
|
|
2718
|
+
C.value = T instanceof Error ? T : new Error("Failed to initialize layerboard");
|
|
2664
2719
|
} finally {
|
|
2665
2720
|
w.value = !1;
|
|
2666
2721
|
}
|
|
2667
2722
|
}
|
|
2668
2723
|
}
|
|
2669
|
-
async function
|
|
2670
|
-
const O =
|
|
2671
|
-
if (!
|
|
2672
|
-
throw new Error(`Failed to fetch WebMap: ${
|
|
2673
|
-
const te = await
|
|
2674
|
-
return
|
|
2724
|
+
async function g(T) {
|
|
2725
|
+
const O = Ct(T), D = await fetch(O, { cache: "no-store" });
|
|
2726
|
+
if (!D.ok)
|
|
2727
|
+
throw new Error(`Failed to fetch WebMap: ${D.status} ${D.statusText}`);
|
|
2728
|
+
const te = await D.json();
|
|
2729
|
+
return Nt(te);
|
|
2675
2730
|
}
|
|
2676
|
-
function
|
|
2731
|
+
function d(T) {
|
|
2677
2732
|
const O = new Set(l.value);
|
|
2678
2733
|
O.has(T) ? O.delete(T) : O.add(T), l.value = O;
|
|
2679
2734
|
}
|
|
@@ -2684,50 +2739,50 @@ function Xa(e) {
|
|
|
2684
2739
|
};
|
|
2685
2740
|
}
|
|
2686
2741
|
function S(T) {
|
|
2687
|
-
|
|
2742
|
+
u.value = T;
|
|
2688
2743
|
}
|
|
2689
|
-
function
|
|
2690
|
-
const
|
|
2691
|
-
O ?
|
|
2744
|
+
function I(T, O) {
|
|
2745
|
+
const D = new Set(r.value);
|
|
2746
|
+
O ? D.add(T) : D.delete(T), r.value = D;
|
|
2692
2747
|
}
|
|
2693
|
-
function
|
|
2748
|
+
function F(T, O) {
|
|
2694
2749
|
if (O)
|
|
2695
2750
|
n.value = { ...n.value, [T]: O };
|
|
2696
2751
|
else {
|
|
2697
|
-
const
|
|
2698
|
-
delete
|
|
2752
|
+
const D = { ...n.value };
|
|
2753
|
+
delete D[T], n.value = D;
|
|
2699
2754
|
}
|
|
2700
2755
|
}
|
|
2701
|
-
function
|
|
2702
|
-
i.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {},
|
|
2756
|
+
function V() {
|
|
2757
|
+
i.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {}, u.value = "", w.value = !1, p.value = !1, C.value = null;
|
|
2703
2758
|
}
|
|
2704
2759
|
return {
|
|
2705
2760
|
// State (readonly)
|
|
2706
|
-
layerConfigs:
|
|
2707
|
-
visibleLayers:
|
|
2708
|
-
layerOpacities:
|
|
2709
|
-
loadingLayers:
|
|
2710
|
-
layerErrors:
|
|
2711
|
-
searchQuery:
|
|
2712
|
-
isLoading:
|
|
2713
|
-
isInitialized:
|
|
2714
|
-
error:
|
|
2761
|
+
layerConfigs: q(i),
|
|
2762
|
+
visibleLayers: q(l),
|
|
2763
|
+
layerOpacities: q(o),
|
|
2764
|
+
loadingLayers: q(r),
|
|
2765
|
+
layerErrors: q(n),
|
|
2766
|
+
searchQuery: q(u),
|
|
2767
|
+
isLoading: q(w),
|
|
2768
|
+
isInitialized: q(p),
|
|
2769
|
+
error: q(C),
|
|
2715
2770
|
// Computed
|
|
2716
|
-
filteredLayerConfigs:
|
|
2717
|
-
layerList:
|
|
2771
|
+
filteredLayerConfigs: y,
|
|
2772
|
+
layerList: h,
|
|
2718
2773
|
// Config
|
|
2719
2774
|
config: e,
|
|
2720
2775
|
// Methods
|
|
2721
2776
|
initialize: a,
|
|
2722
|
-
toggleLayer:
|
|
2777
|
+
toggleLayer: d,
|
|
2723
2778
|
setLayerOpacity: L,
|
|
2724
2779
|
filterLayers: S,
|
|
2725
|
-
setLayerLoading:
|
|
2726
|
-
setLayerError:
|
|
2727
|
-
reset:
|
|
2780
|
+
setLayerLoading: I,
|
|
2781
|
+
setLayerError: F,
|
|
2782
|
+
reset: V
|
|
2728
2783
|
};
|
|
2729
2784
|
}
|
|
2730
|
-
function
|
|
2785
|
+
function oi() {
|
|
2731
2786
|
const e = k([]), i = k(/* @__PURE__ */ new Set()), l = k(/* @__PURE__ */ new Set());
|
|
2732
2787
|
function o(n) {
|
|
2733
2788
|
i.value.has(n) ? i.value.delete(n) : i.value.add(n);
|
|
@@ -2736,52 +2791,52 @@ function Ya() {
|
|
|
2736
2791
|
e.value = n;
|
|
2737
2792
|
}
|
|
2738
2793
|
return {
|
|
2739
|
-
layers:
|
|
2740
|
-
visibleLayerIds:
|
|
2741
|
-
loadingLayerIds:
|
|
2794
|
+
layers: _(() => e.value),
|
|
2795
|
+
visibleLayerIds: _(() => i.value),
|
|
2796
|
+
loadingLayerIds: _(() => l.value),
|
|
2742
2797
|
toggleLayer: o,
|
|
2743
2798
|
setLayers: r
|
|
2744
2799
|
};
|
|
2745
2800
|
}
|
|
2746
|
-
function
|
|
2801
|
+
function ja(e) {
|
|
2747
2802
|
const i = k(null), l = k(!1), o = k(null), r = k(0);
|
|
2748
2803
|
async function n(p = {}) {
|
|
2749
2804
|
l.value = !0, o.value = null;
|
|
2750
|
-
const
|
|
2751
|
-
let
|
|
2805
|
+
const C = e.pageSize || 2e3;
|
|
2806
|
+
let y = 0, h = [], a = !0;
|
|
2752
2807
|
try {
|
|
2753
2808
|
for (; a; ) {
|
|
2754
|
-
const
|
|
2755
|
-
let S = `${
|
|
2809
|
+
const d = e.url.replace(/\/$/, ""), L = encodeURIComponent(p.where || e.where || "1=1");
|
|
2810
|
+
let S = `${d}/query?where=${L}&outFields=*&returnGeometry=true&resultRecordCount=${C}&resultOffset=${y}&f=geojson`;
|
|
2756
2811
|
if (p.bounds) {
|
|
2757
|
-
const
|
|
2812
|
+
const V = JSON.stringify({
|
|
2758
2813
|
xmin: p.bounds.west,
|
|
2759
2814
|
ymin: p.bounds.south,
|
|
2760
2815
|
xmax: p.bounds.east,
|
|
2761
2816
|
ymax: p.bounds.north,
|
|
2762
2817
|
spatialReference: { wkid: 4326 }
|
|
2763
2818
|
});
|
|
2764
|
-
S += `&geometry=${encodeURIComponent(
|
|
2819
|
+
S += `&geometry=${encodeURIComponent(V)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
|
|
2765
2820
|
}
|
|
2766
|
-
const
|
|
2767
|
-
if (!
|
|
2768
|
-
throw new Error(`HTTP ${
|
|
2769
|
-
const
|
|
2770
|
-
|
|
2821
|
+
const I = await fetch(S);
|
|
2822
|
+
if (!I.ok)
|
|
2823
|
+
throw new Error(`HTTP ${I.status}: ${I.statusText}`);
|
|
2824
|
+
const F = await I.json();
|
|
2825
|
+
F.features && F.features.length > 0 ? (h = h.concat(F.features), y += F.features.length, a = F.features.length === C) : a = !1;
|
|
2771
2826
|
}
|
|
2772
|
-
const
|
|
2827
|
+
const g = {
|
|
2773
2828
|
type: "FeatureCollection",
|
|
2774
|
-
features:
|
|
2829
|
+
features: h
|
|
2775
2830
|
};
|
|
2776
|
-
return i.value =
|
|
2777
|
-
} catch (
|
|
2778
|
-
const
|
|
2779
|
-
throw o.value =
|
|
2831
|
+
return i.value = g, r.value = h.length, g;
|
|
2832
|
+
} catch (g) {
|
|
2833
|
+
const d = g instanceof Error ? g : new Error("Failed to fetch features");
|
|
2834
|
+
throw o.value = d, d;
|
|
2780
2835
|
} finally {
|
|
2781
2836
|
l.value = !1;
|
|
2782
2837
|
}
|
|
2783
2838
|
}
|
|
2784
|
-
function
|
|
2839
|
+
function u() {
|
|
2785
2840
|
i.value = null, r.value = 0, o.value = null;
|
|
2786
2841
|
}
|
|
2787
2842
|
async function w(p = {}) {
|
|
@@ -2789,21 +2844,21 @@ function Na(e) {
|
|
|
2789
2844
|
}
|
|
2790
2845
|
return {
|
|
2791
2846
|
// State (readonly)
|
|
2792
|
-
data:
|
|
2793
|
-
isLoading:
|
|
2794
|
-
error:
|
|
2795
|
-
totalFeatures:
|
|
2847
|
+
data: q(i),
|
|
2848
|
+
isLoading: q(l),
|
|
2849
|
+
error: q(o),
|
|
2850
|
+
totalFeatures: q(r),
|
|
2796
2851
|
// Config
|
|
2797
2852
|
config: e,
|
|
2798
2853
|
// Methods
|
|
2799
2854
|
fetch: n,
|
|
2800
2855
|
refetch: w,
|
|
2801
|
-
clear:
|
|
2856
|
+
clear: u
|
|
2802
2857
|
};
|
|
2803
2858
|
}
|
|
2804
|
-
function
|
|
2805
|
-
const o =
|
|
2806
|
-
return
|
|
2859
|
+
function ai(e, i, l) {
|
|
2860
|
+
const o = ja(e);
|
|
2861
|
+
return Ee(
|
|
2807
2862
|
i,
|
|
2808
2863
|
async (r) => {
|
|
2809
2864
|
if (r) {
|
|
@@ -2815,26 +2870,26 @@ function ei(e, i, l) {
|
|
|
2815
2870
|
), o;
|
|
2816
2871
|
}
|
|
2817
2872
|
export {
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2873
|
+
Ya as LayerCheckboxSet,
|
|
2874
|
+
Ko as LayerPanel,
|
|
2875
|
+
ei as LayerRadioButtonSet,
|
|
2876
|
+
Qa as Layerboard,
|
|
2877
|
+
so as MapPanel,
|
|
2878
|
+
Xa as TopicAccordion,
|
|
2879
|
+
Ja as WEBMAP_ID,
|
|
2880
|
+
Ct as buildWebMapUrl,
|
|
2881
|
+
fa as clearCache,
|
|
2882
|
+
vt as getLayerConfigs,
|
|
2883
|
+
Oe as getLayerDisplayName,
|
|
2884
|
+
Ka as getWebMapUrl,
|
|
2885
|
+
Vt as normalizeUrl,
|
|
2886
|
+
Oa as shouldShowCheckbox,
|
|
2887
|
+
Wt as shouldShowLegendBox,
|
|
2888
|
+
Ut as shouldShowSlider,
|
|
2889
|
+
Nt as transformWebMapToLayerConfigs,
|
|
2890
|
+
ha as useApiDataSources,
|
|
2891
|
+
ja as useDataSource,
|
|
2892
|
+
oi as useLayerConfig,
|
|
2893
|
+
ti as useLayerboard,
|
|
2894
|
+
ai as useReactiveDataSource
|
|
2840
2895
|
};
|