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