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