@phila/layerboard 3.0.0-beta.36 → 3.0.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.mjs +194 -178
- package/dist/layerboard.css +1 -1
- package/dist/utils/webmap-transformer.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -32,7 +32,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
32
32
|
const c = t.getZoom(), b = t.getCenter().lat, k = 559082264028e-3, I = b * Math.PI / 180;
|
|
33
33
|
return k * Math.cos(I) / Math.pow(2, c);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const S = x({}), y = x(null), m = x(/* @__PURE__ */ new Set());
|
|
36
36
|
async function i(t, c, s, b, k) {
|
|
37
37
|
const I = encodeURIComponent(b || "1=1"), B = JSON.stringify({
|
|
38
38
|
xmin: c.west,
|
|
@@ -40,14 +40,14 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
40
40
|
xmax: c.east,
|
|
41
41
|
ymax: c.north,
|
|
42
42
|
spatialReference: { wkid: 4326 }
|
|
43
|
-
}), Y = k !== void 0 && k < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, k) * 512)}` : "",
|
|
43
|
+
}), Y = k !== void 0 && k < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, k) * 512)}` : "", X = 2e3;
|
|
44
44
|
let pe = 0, we = [], se = !0;
|
|
45
45
|
for (; se; ) {
|
|
46
|
-
const te = `${t}/query?where=${I}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${
|
|
46
|
+
const te = `${t}/query?where=${I}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${X}&resultOffset=${pe}${Y}&f=geojson`, R = await fetch(te);
|
|
47
47
|
if (!R.ok)
|
|
48
48
|
throw new Error(`HTTP ${R.status}: ${R.statusText}`);
|
|
49
49
|
const W = await R.json();
|
|
50
|
-
W.features && W.features.length > 0 ? (we = we.concat(W.features), pe += W.features.length, se = W.features.length ===
|
|
50
|
+
W.features && W.features.length > 0 ? (we = we.concat(W.features), pe += W.features.length, se = W.features.length === X) : se = !1;
|
|
51
51
|
}
|
|
52
52
|
return we = we.map((te) => {
|
|
53
53
|
if (te.properties) {
|
|
@@ -69,7 +69,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
69
69
|
o("layerLoading", k, !0);
|
|
70
70
|
try {
|
|
71
71
|
const B = await i(I.url, t, k, I.where, s);
|
|
72
|
-
|
|
72
|
+
S.value = { ...S.value, [k]: B }, o("layerError", k, null);
|
|
73
73
|
} catch (B) {
|
|
74
74
|
const Y = B instanceof Error ? B.message : "Failed to load";
|
|
75
75
|
o("layerError", k, Y);
|
|
@@ -90,7 +90,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
90
90
|
const s = d([...l.visibleLayers]);
|
|
91
91
|
await g(t, s, c);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function C(t) {
|
|
94
94
|
y.value = t.bounds, L(t.bounds, t.zoom);
|
|
95
95
|
}
|
|
96
96
|
function E(t) {
|
|
@@ -125,7 +125,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
125
125
|
return !!c?.parentId && l.visibleLayers.has(c.parentId);
|
|
126
126
|
}
|
|
127
127
|
function V(t) {
|
|
128
|
-
return !!
|
|
128
|
+
return !!S.value[t.id];
|
|
129
129
|
}
|
|
130
130
|
const T = _(
|
|
131
131
|
() => l.layerList.filter((t) => t.config.type === "circle" && F(t.config.id) && V(t.config)).map((t) => t.config)
|
|
@@ -213,7 +213,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
215
|
function Me(t) {
|
|
216
|
-
return { type: "geojson", data:
|
|
216
|
+
return { type: "geojson", data: S.value[t.id], tolerance: 0 };
|
|
217
217
|
}
|
|
218
218
|
function Fe(t) {
|
|
219
219
|
return l.layerOpacities[t] ?? 1;
|
|
@@ -227,18 +227,18 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
227
227
|
if (c === 1)
|
|
228
228
|
return k;
|
|
229
229
|
{
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
const [, pe, we, se, te] =
|
|
230
|
+
const X = I.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
231
|
+
if (X && X[4]) {
|
|
232
|
+
const [, pe, we, se, te] = X, R = parseFloat(te) * c;
|
|
233
233
|
k[b] = `rgba(${pe}, ${we}, ${se}, ${R})`, k[s] = 1;
|
|
234
234
|
}
|
|
235
235
|
return k;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
if (Y) {
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
241
|
-
const [, pe, we, se] =
|
|
239
|
+
const X = I.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
240
|
+
if (X) {
|
|
241
|
+
const [, pe, we, se] = X;
|
|
242
242
|
k[b] = `rgb(${pe}, ${we}, ${se})`;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
@@ -290,8 +290,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
290
290
|
return String(t);
|
|
291
291
|
const I = t.toFixed(b);
|
|
292
292
|
if (k) {
|
|
293
|
-
const B = I.split("."), Y = B[0] || "0",
|
|
294
|
-
return
|
|
293
|
+
const B = I.split("."), Y = B[0] || "0", X = B[1], pe = Y.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
294
|
+
return X ? `${pe}.${X}` : pe;
|
|
295
295
|
}
|
|
296
296
|
return I;
|
|
297
297
|
}
|
|
@@ -307,7 +307,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
309
|
function Se(t, c) {
|
|
310
|
-
const s =
|
|
310
|
+
const s = S.value[t];
|
|
311
311
|
if (!s?.features) return null;
|
|
312
312
|
const b = c.objectid ?? c.OBJECTID ?? c.FID;
|
|
313
313
|
if (b != null) {
|
|
@@ -344,7 +344,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
344
344
|
layers: b
|
|
345
345
|
});
|
|
346
346
|
if (Y.length === 0) return;
|
|
347
|
-
const
|
|
347
|
+
const X = et(Y), pe = l.layerList.map((R) => R.config), se = ft(X, pe).map((R) => {
|
|
348
348
|
const W = R.layer.id.replace(/-outline$/, ""), ce = _e(W);
|
|
349
349
|
if (!ce) return null;
|
|
350
350
|
const yt = Se(ce.id, R.properties || {});
|
|
@@ -369,7 +369,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
369
369
|
if (te) {
|
|
370
370
|
const R = _e(te.layerId);
|
|
371
371
|
if (R) {
|
|
372
|
-
const W =
|
|
372
|
+
const W = K(te.geometry), ce = Z(R.id, R.type);
|
|
373
373
|
$.value = {
|
|
374
374
|
geometry: te.geometry,
|
|
375
375
|
geometryType: W,
|
|
@@ -423,8 +423,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
423
423
|
if (c += `<h3 class="popup-title">${be(Re.value)}</h3>`, t.popupConfig?.fields?.length) {
|
|
424
424
|
c += `<table class="popup-table" aria-label="${be(Re.value)}">`;
|
|
425
425
|
for (const s of t.popupConfig.fields) {
|
|
426
|
-
const b = Ge(t.properties[s.field], s.format, t.popupConfig.showTime), k = s.label.toLowerCase(), I = k.includes("url") || k.includes("website"), B = b.startsWith("http://") || b.startsWith("https://") || b.startsWith("www.") || I && b.includes("."), Y = b.startsWith("http://") || b.startsWith("https://") ? b : `https://${b}`,
|
|
427
|
-
c += `<tr><th scope="row">${be(s.label)}</th><td>${
|
|
426
|
+
const b = Ge(t.properties[s.field], s.format, t.popupConfig.showTime), k = s.label.toLowerCase(), I = k.includes("url") || k.includes("website"), B = b.startsWith("http://") || b.startsWith("https://") || b.startsWith("www.") || I && b.includes("."), Y = b.startsWith("http://") || b.startsWith("https://") ? b : `https://${b}`, X = B ? `<a href="${be(Y)}" target="_blank" rel="noopener noreferrer">${be(b)}</a>` : be(b);
|
|
427
|
+
c += `<tr><th scope="row">${be(s.label)}</th><td>${X}</td></tr>`;
|
|
428
428
|
}
|
|
429
429
|
c += "</table>";
|
|
430
430
|
}
|
|
@@ -452,7 +452,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
452
452
|
"fill-color": "#808080",
|
|
453
453
|
"fill-opacity": 0.5
|
|
454
454
|
}, $ = x(null);
|
|
455
|
-
function
|
|
455
|
+
function K(t) {
|
|
456
456
|
return t.type;
|
|
457
457
|
}
|
|
458
458
|
function Z(t, c) {
|
|
@@ -476,7 +476,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
476
476
|
}
|
|
477
477
|
return { radius: 5, width: 2 };
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Q(t) {
|
|
480
480
|
return !t || t.length === 0 ? [] : t[0] ?? [];
|
|
481
481
|
}
|
|
482
482
|
function Ce(t) {
|
|
@@ -512,7 +512,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
514
|
if (s === "Polygon") {
|
|
515
|
-
const k = c.coordinates, I =
|
|
515
|
+
const k = c.coordinates, I = Q(k), Y = (b.width || 2) + 3;
|
|
516
516
|
return {
|
|
517
517
|
type: "FeatureCollection",
|
|
518
518
|
features: [
|
|
@@ -533,11 +533,11 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
533
533
|
const k = c.coordinates, B = (b.width || 2) + 3;
|
|
534
534
|
return {
|
|
535
535
|
type: "FeatureCollection",
|
|
536
|
-
features: k.map((
|
|
536
|
+
features: k.map((X) => ({
|
|
537
537
|
type: "Feature",
|
|
538
538
|
geometry: {
|
|
539
539
|
type: "LineString",
|
|
540
|
-
coordinates:
|
|
540
|
+
coordinates: Q(X)
|
|
541
541
|
},
|
|
542
542
|
properties: {
|
|
543
543
|
highlightWidth: B
|
|
@@ -584,7 +584,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
584
584
|
}
|
|
585
585
|
const c = _e(t.layerId);
|
|
586
586
|
if (c) {
|
|
587
|
-
const s =
|
|
587
|
+
const s = K(t.geometry), b = Z(c.id, c.type);
|
|
588
588
|
$.value = {
|
|
589
589
|
geometry: t.geometry,
|
|
590
590
|
geometryType: s,
|
|
@@ -619,7 +619,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
619
619
|
"tool-panel-split-ratio": 50,
|
|
620
620
|
onZoom: w,
|
|
621
621
|
onClick: Ie,
|
|
622
|
-
onMoveend:
|
|
622
|
+
onMoveend: C,
|
|
623
623
|
onLoad: E,
|
|
624
624
|
onSearchResult: Jt
|
|
625
625
|
}, {
|
|
@@ -854,7 +854,7 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
854
854
|
set: (d) => {
|
|
855
855
|
u("update:modelValue", d), w.value = d;
|
|
856
856
|
}
|
|
857
|
-
}),
|
|
857
|
+
}), S = _(() => {
|
|
858
858
|
const d = ["default-class"];
|
|
859
859
|
return l.disabled != null && d.push("phila-input--disabled"), r.value && d.push("phila-input--error"), l.required != null && d.push("phila-input--required"), bt(...d);
|
|
860
860
|
}), y = _(() => {
|
|
@@ -867,7 +867,7 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
867
867
|
d.target.closest("button") || i.value?.focus();
|
|
868
868
|
};
|
|
869
869
|
return (d, L) => (h(), M("div", {
|
|
870
|
-
class: ne(["phila-input",
|
|
870
|
+
class: ne(["phila-input", S.value])
|
|
871
871
|
}, [
|
|
872
872
|
o.label ? (h(), M("label", {
|
|
873
873
|
key: 0,
|
|
@@ -891,7 +891,7 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
891
891
|
id: n.value,
|
|
892
892
|
ref_key: "inputRef",
|
|
893
893
|
ref: i,
|
|
894
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
894
|
+
"onUpdate:modelValue": L[0] || (L[0] = (C) => p.value = C),
|
|
895
895
|
class: "phila-text-field-input has-text-body-default",
|
|
896
896
|
placeholder: o.placeholder,
|
|
897
897
|
"aria-label": m.value
|
|
@@ -906,7 +906,7 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
906
906
|
size: "small",
|
|
907
907
|
"icon-only": "",
|
|
908
908
|
"icon-definition": f(go),
|
|
909
|
-
onClick: L[1] || (L[1] = (
|
|
909
|
+
onClick: L[1] || (L[1] = (C) => p.value = "")
|
|
910
910
|
}, null, 8, ["icon-definition"])) : A("", !0),
|
|
911
911
|
o.trailingIcon ? (h(), q(f(ke), {
|
|
912
912
|
key: 2,
|
|
@@ -1014,7 +1014,10 @@ const Io = {
|
|
|
1014
1014
|
}, null, 40, Ro)
|
|
1015
1015
|
]));
|
|
1016
1016
|
}
|
|
1017
|
-
}), Lt = /* @__PURE__ */ $e(Ao, [["__scopeId", "data-v-1a025f6a"]]), Bo = ["aria-label"], Vo = {
|
|
1017
|
+
}), Lt = /* @__PURE__ */ $e(Ao, [["__scopeId", "data-v-1a025f6a"]]), Bo = ["aria-label"], Vo = {
|
|
1018
|
+
key: 3,
|
|
1019
|
+
class: "legend-label"
|
|
1020
|
+
}, Zo = /* @__PURE__ */ ge({
|
|
1018
1021
|
__name: "LayerLegend",
|
|
1019
1022
|
props: {
|
|
1020
1023
|
items: {},
|
|
@@ -1048,11 +1051,11 @@ const Io = {
|
|
|
1048
1051
|
style: ye({ backgroundColor: o.color }),
|
|
1049
1052
|
"aria-hidden": "true"
|
|
1050
1053
|
}, null, 4)) : A("", !0),
|
|
1051
|
-
|
|
1054
|
+
e.items.length > 1 ? (h(), M("span", Vo, G(o.label), 1)) : A("", !0)
|
|
1052
1055
|
]))), 128))
|
|
1053
1056
|
], 8, Bo));
|
|
1054
1057
|
}
|
|
1055
|
-
}), St = /* @__PURE__ */ $e(Zo, [["__scopeId", "data-v-
|
|
1058
|
+
}), St = /* @__PURE__ */ $e(Zo, [["__scopeId", "data-v-bbb1a784"]]);
|
|
1056
1059
|
function Ct(e) {
|
|
1057
1060
|
function a(u) {
|
|
1058
1061
|
return e().visibleLayerIds.has(u);
|
|
@@ -1067,8 +1070,8 @@ function Ct(e) {
|
|
|
1067
1070
|
return e().layerErrors[u] || null;
|
|
1068
1071
|
}
|
|
1069
1072
|
function n(u) {
|
|
1070
|
-
const w = e().currentZoom, p = u.minZoom,
|
|
1071
|
-
return !(p !== void 0 && w < p ||
|
|
1073
|
+
const w = e().currentZoom, p = u.minZoom, S = u.maxZoom;
|
|
1074
|
+
return !(p !== void 0 && w < p || S !== void 0 && w > S);
|
|
1072
1075
|
}
|
|
1073
1076
|
return { isVisible: a, getLayerOpacity: l, isLayerLoading: o, getLayerError: r, isLayerAvailableAtZoom: n };
|
|
1074
1077
|
}
|
|
@@ -1113,7 +1116,7 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1113
1116
|
const L = Nt(d);
|
|
1114
1117
|
return l.layerMetadata[L] || null;
|
|
1115
1118
|
}
|
|
1116
|
-
const u = _(() => l.layerList.some((d) => n(d.config.url))), { isVisible: w, getLayerOpacity: p, isLayerLoading:
|
|
1119
|
+
const u = _(() => l.layerList.some((d) => n(d.config.url))), { isVisible: w, getLayerOpacity: p, isLayerLoading: S, getLayerError: y, isLayerAvailableAtZoom: m } = Ct(() => ({
|
|
1117
1120
|
visibleLayerIds: l.visibleLayers,
|
|
1118
1121
|
layerOpacities: l.layerOpacities,
|
|
1119
1122
|
loadingLayerIds: l.loadingLayers,
|
|
@@ -1130,7 +1133,7 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1130
1133
|
e.showSearch ? (h(), M("div", Uo, [
|
|
1131
1134
|
H(f(xo), {
|
|
1132
1135
|
modelValue: i.value,
|
|
1133
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
1136
|
+
"onUpdate:modelValue": L[0] || (L[0] = (C) => i.value = C),
|
|
1134
1137
|
placeholder: e.searchPlaceholder,
|
|
1135
1138
|
"class-name": "layer-search-field"
|
|
1136
1139
|
}, {
|
|
@@ -1153,18 +1156,18 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1153
1156
|
key: 2,
|
|
1154
1157
|
class: ne(["layer-list", { "has-metadata": u.value }])
|
|
1155
1158
|
}, [
|
|
1156
|
-
(h(!0), M(ue, null, Le(r.value, (
|
|
1157
|
-
key:
|
|
1159
|
+
(h(!0), M(ue, null, Le(r.value, (C) => (h(), M("div", {
|
|
1160
|
+
key: C.config.id,
|
|
1158
1161
|
class: "layer-item"
|
|
1159
1162
|
}, [
|
|
1160
1163
|
P("div", jo, [
|
|
1161
|
-
n(
|
|
1164
|
+
n(C.config.url) ? (h(), M("a", {
|
|
1162
1165
|
key: 0,
|
|
1163
|
-
href: n(
|
|
1166
|
+
href: n(C.config.url) || "",
|
|
1164
1167
|
target: "_blank",
|
|
1165
1168
|
rel: "noopener noreferrer",
|
|
1166
1169
|
class: "metadata-link",
|
|
1167
|
-
"aria-label": "View metadata for " +
|
|
1170
|
+
"aria-label": "View metadata for " + C.config.title,
|
|
1168
1171
|
onClick: L[1] || (L[1] = Yt(() => {
|
|
1169
1172
|
}, ["stop"]))
|
|
1170
1173
|
}, [
|
|
@@ -1177,37 +1180,37 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1177
1180
|
], 8, qo)) : u.value ? (h(), M("span", Go)) : A("", !0),
|
|
1178
1181
|
P("label", {
|
|
1179
1182
|
class: ne(["layer-checkbox", {
|
|
1180
|
-
"layer-unavailable": !f(m)(
|
|
1181
|
-
"layer-error": f(y)(
|
|
1183
|
+
"layer-unavailable": !f(m)(C.config),
|
|
1184
|
+
"layer-error": f(y)(C.config.id)
|
|
1182
1185
|
}])
|
|
1183
1186
|
}, [
|
|
1184
1187
|
P("input", {
|
|
1185
1188
|
type: "checkbox",
|
|
1186
|
-
checked: f(w)(
|
|
1187
|
-
disabled: !f(m)(
|
|
1188
|
-
onChange: (E) => g(
|
|
1189
|
+
checked: f(w)(C.config.id),
|
|
1190
|
+
disabled: !f(m)(C.config),
|
|
1191
|
+
onChange: (E) => g(C.config.id)
|
|
1189
1192
|
}, null, 40, Ho),
|
|
1190
1193
|
P("span", Jo, [
|
|
1191
|
-
xe(G(
|
|
1194
|
+
xe(G(C.config.title) + " ", 1),
|
|
1192
1195
|
H(nt, {
|
|
1193
|
-
loading: f(
|
|
1194
|
-
error: f(y)(
|
|
1195
|
-
unavailable: !f(m)(
|
|
1196
|
+
loading: f(S)(C.config.id),
|
|
1197
|
+
error: f(y)(C.config.id),
|
|
1198
|
+
unavailable: !f(m)(C.config)
|
|
1196
1199
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
1197
1200
|
])
|
|
1198
1201
|
], 2)
|
|
1199
1202
|
]),
|
|
1200
|
-
e.showOpacity && f(w)(
|
|
1203
|
+
e.showOpacity && f(w)(C.config.id) && f(m)(C.config) ? (h(), q(Lt, {
|
|
1201
1204
|
key: 0,
|
|
1202
|
-
"layer-id":
|
|
1203
|
-
"layer-name":
|
|
1204
|
-
opacity: f(p)(
|
|
1205
|
-
"onUpdate:opacity": (E) => o("setOpacity",
|
|
1205
|
+
"layer-id": C.config.id,
|
|
1206
|
+
"layer-name": C.config.title,
|
|
1207
|
+
opacity: f(p)(C.config.id),
|
|
1208
|
+
"onUpdate:opacity": (E) => o("setOpacity", C.config.id, E)
|
|
1206
1209
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
1207
|
-
e.showLegend && f(w)(
|
|
1210
|
+
e.showLegend && f(w)(C.config.id) && f(m)(C.config) && C.config.legend?.length ? (h(), q(St, {
|
|
1208
1211
|
key: 1,
|
|
1209
|
-
items:
|
|
1210
|
-
label: "Legend for " +
|
|
1212
|
+
items: C.config.legend,
|
|
1213
|
+
label: "Legend for " + C.config.title
|
|
1211
1214
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
1212
1215
|
]))), 128)),
|
|
1213
1216
|
r.value.length === 0 ? (h(), M("div", Ko, 'No layers match "' + G(e.searchQuery) + '"', 1)) : A("", !0)
|
|
@@ -1232,23 +1235,23 @@ function ea(e, a, l, o, r) {
|
|
|
1232
1235
|
for (let i = 1; i < e.length; i++)
|
|
1233
1236
|
a[i] === u ? w.push(e[i]) : (n.push({ style: u, breaks: w, startIndex: p }), u = a[i], w = [e[i]], p = i);
|
|
1234
1237
|
n.push({ style: u, breaks: w, startIndex: p });
|
|
1235
|
-
const
|
|
1238
|
+
const S = [], y = /* @__PURE__ */ new Set();
|
|
1236
1239
|
let m = o.minValue ?? 0;
|
|
1237
1240
|
for (let i = 0; i < n.length; i++) {
|
|
1238
|
-
const g = n[i], d = g.breaks, L = Ke(g.style),
|
|
1241
|
+
const g = n[i], d = g.breaks, L = Ke(g.style), C = i === 0 ? null : n[i - 1].breaks[n[i - 1].breaks.length - 1].classMaxValue, E = d[d.length - 1].classMaxValue;
|
|
1239
1242
|
let F;
|
|
1240
1243
|
const V = !!o.defaultSymbol;
|
|
1241
|
-
|
|
1244
|
+
C === null ? F = `${!V && o.minValue != null ? `${l} >= ${o.minValue} AND ` : ""}${l} <= ${E}` : i === n.length - 1 && V ? F = `${l} > ${C}` : F = `${l} > ${C} AND ${l} <= ${E}`;
|
|
1242
1245
|
const T = {
|
|
1243
1246
|
"line-opacity": me(r)
|
|
1244
1247
|
};
|
|
1245
1248
|
if (L && (T["line-dasharray"] = L), d.length === 1)
|
|
1246
|
-
T["line-color"] = z(d[0].symbol?.color), T["line-width"] =
|
|
1249
|
+
T["line-color"] = z(d[0].symbol?.color), T["line-width"] = J(d[0].symbol?.width || 2);
|
|
1247
1250
|
else {
|
|
1248
1251
|
const U = ["step", ["get", l]], de = ["step", ["get", l]];
|
|
1249
|
-
U.push(z(d[0].symbol?.color)), de.push(
|
|
1252
|
+
U.push(z(d[0].symbol?.color)), de.push(J(d[0].symbol?.width || 2));
|
|
1250
1253
|
for (let ve = 1; ve < d.length; ve++)
|
|
1251
|
-
U.push(d[ve - 1].classMaxValue), U.push(z(d[ve].symbol?.color)), de.push(d[ve - 1].classMaxValue), de.push(
|
|
1254
|
+
U.push(d[ve - 1].classMaxValue), U.push(z(d[ve].symbol?.color)), de.push(d[ve - 1].classMaxValue), de.push(J(d[ve].symbol?.width || 2));
|
|
1252
1255
|
T["line-color"] = U, T["line-width"] = de;
|
|
1253
1256
|
}
|
|
1254
1257
|
const O = [];
|
|
@@ -1256,34 +1259,34 @@ function ea(e, a, l, o, r) {
|
|
|
1256
1259
|
O.push({
|
|
1257
1260
|
type: "line",
|
|
1258
1261
|
color: z(U.symbol?.color),
|
|
1259
|
-
width:
|
|
1262
|
+
width: J(U.symbol?.width || 2),
|
|
1260
1263
|
label: U.label || `${m} - ${U.classMaxValue}`
|
|
1261
1264
|
}), m = U.classMaxValue + 1;
|
|
1262
1265
|
const D = g.style.replace("esriSLS", "").toLowerCase();
|
|
1263
1266
|
let ee;
|
|
1264
|
-
i === 0 ? ee = "" : y.has(D) ? ee = `-${D}-${i}` : ee = `-${D}`, y.add(D),
|
|
1267
|
+
i === 0 ? ee = "" : y.has(D) ? ee = `-${D}-${i}` : ee = `-${D}`, y.add(D), S.push({ suffix: ee, where: F, paint: T, legend: O });
|
|
1265
1268
|
}
|
|
1266
|
-
return
|
|
1269
|
+
return S;
|
|
1267
1270
|
}
|
|
1268
1271
|
function ta(e, a, l, o, r) {
|
|
1269
1272
|
const n = /* @__PURE__ */ new Map();
|
|
1270
|
-
for (const
|
|
1271
|
-
const y =
|
|
1272
|
-
n.has(y) || n.set(y, []), n.get(y).push(
|
|
1273
|
+
for (const S of e) {
|
|
1274
|
+
const y = S.symbol?.style || "esriSLSSolid";
|
|
1275
|
+
n.has(y) || n.set(y, []), n.get(y).push(S);
|
|
1273
1276
|
}
|
|
1274
1277
|
const u = [], w = /* @__PURE__ */ new Set();
|
|
1275
1278
|
let p = !0;
|
|
1276
|
-
for (const [
|
|
1277
|
-
const m = Ke(
|
|
1279
|
+
for (const [S, y] of n) {
|
|
1280
|
+
const m = Ke(S), g = y.map((F) => `${a} = '${String(F.value).replace(/'/g, "''")}'`).join(" OR "), d = {
|
|
1278
1281
|
"line-opacity": me(o)
|
|
1279
1282
|
};
|
|
1280
1283
|
if (m && (d["line-dasharray"] = m), y.length === 1)
|
|
1281
|
-
d["line-color"] = z(y[0].symbol?.color), d["line-width"] =
|
|
1284
|
+
d["line-color"] = z(y[0].symbol?.color), d["line-width"] = J(y[0].symbol?.width || 2);
|
|
1282
1285
|
else {
|
|
1283
1286
|
const F = ["match", ["to-string", ["get", a]]];
|
|
1284
1287
|
for (const V of y)
|
|
1285
1288
|
F.push(it(V.value)), F.push(z(V.symbol?.color));
|
|
1286
|
-
F.push(l ? z(l.color) : "rgba(0, 0, 0, 0)"), d["line-color"] = F, d["line-width"] =
|
|
1289
|
+
F.push(l ? z(l.color) : "rgba(0, 0, 0, 0)"), d["line-color"] = F, d["line-width"] = J(y[0].symbol?.width || 2);
|
|
1287
1290
|
}
|
|
1288
1291
|
const L = [];
|
|
1289
1292
|
for (const F of y) {
|
|
@@ -1291,13 +1294,13 @@ function ta(e, a, l, o, r) {
|
|
|
1291
1294
|
L.push({
|
|
1292
1295
|
type: "line",
|
|
1293
1296
|
color: z(F.symbol?.color),
|
|
1294
|
-
width:
|
|
1297
|
+
width: J(F.symbol?.width || 1),
|
|
1295
1298
|
label: O
|
|
1296
1299
|
});
|
|
1297
1300
|
}
|
|
1298
|
-
const
|
|
1301
|
+
const C = S.replace("esriSLS", "").toLowerCase();
|
|
1299
1302
|
let E;
|
|
1300
|
-
p ? E = "" : w.has(
|
|
1303
|
+
p ? E = "" : w.has(C) ? E = `-${C}-${u.length}` : E = `-${C}`, w.add(C), p = !1, u.push({ suffix: E, where: g, paint: d, legend: L });
|
|
1301
1304
|
}
|
|
1302
1305
|
return u;
|
|
1303
1306
|
}
|
|
@@ -1309,7 +1312,7 @@ function z(e) {
|
|
|
1309
1312
|
function me(e) {
|
|
1310
1313
|
return e !== void 0 ? e : 1;
|
|
1311
1314
|
}
|
|
1312
|
-
function
|
|
1315
|
+
function J(e) {
|
|
1313
1316
|
return Math.round(e * (96 / 72) * 10) / 10;
|
|
1314
1317
|
}
|
|
1315
1318
|
const oa = 559082264;
|
|
@@ -1355,12 +1358,12 @@ function Ut(e, a, l) {
|
|
|
1355
1358
|
const o = e.symbol, r = st(o);
|
|
1356
1359
|
let n = {}, u = [], w = null;
|
|
1357
1360
|
if (r === "fill" && o) {
|
|
1358
|
-
const p = o.color === null ? 0 : o.color?.[3] ?? 255,
|
|
1361
|
+
const p = o.color === null ? 0 : o.color?.[3] ?? 255, S = p === 0 ? "rgba(0, 0, 0, 0)" : z(o.color), y = p === 0 ? 0 : p < 255 ? 1 : me(a);
|
|
1359
1362
|
if (n = {
|
|
1360
|
-
"fill-color":
|
|
1363
|
+
"fill-color": S,
|
|
1361
1364
|
"fill-opacity": y
|
|
1362
1365
|
}, Pe(o.outline)) {
|
|
1363
|
-
const m =
|
|
1366
|
+
const m = J(o.outline.width || 1);
|
|
1364
1367
|
w = {
|
|
1365
1368
|
"line-color": z(o.outline.color),
|
|
1366
1369
|
"line-width": m
|
|
@@ -1376,7 +1379,7 @@ function Ut(e, a, l) {
|
|
|
1376
1379
|
} else if (r === "line" && o) {
|
|
1377
1380
|
n = {
|
|
1378
1381
|
"line-color": z(o.color),
|
|
1379
|
-
"line-width":
|
|
1382
|
+
"line-width": J(o.width || 1),
|
|
1380
1383
|
"line-opacity": me(a)
|
|
1381
1384
|
};
|
|
1382
1385
|
const p = Ke(o.style);
|
|
@@ -1384,7 +1387,7 @@ function Ut(e, a, l) {
|
|
|
1384
1387
|
{
|
|
1385
1388
|
type: "line",
|
|
1386
1389
|
color: z(o.color),
|
|
1387
|
-
width:
|
|
1390
|
+
width: J(o.width || 1),
|
|
1388
1391
|
label: e.label || "Feature"
|
|
1389
1392
|
}
|
|
1390
1393
|
];
|
|
@@ -1394,7 +1397,7 @@ function Ut(e, a, l) {
|
|
|
1394
1397
|
"circle-color": z(o.color),
|
|
1395
1398
|
"circle-radius": p,
|
|
1396
1399
|
"circle-opacity": me(a)
|
|
1397
|
-
}, Pe(o.outline) && (n["circle-stroke-color"] = z(o.outline.color), n["circle-stroke-width"] =
|
|
1400
|
+
}, Pe(o.outline) && (n["circle-stroke-color"] = z(o.outline.color), n["circle-stroke-width"] = J(o.outline.width || 1)), u = [
|
|
1398
1401
|
{
|
|
1399
1402
|
type: "circle",
|
|
1400
1403
|
color: z(o.color),
|
|
@@ -1410,24 +1413,28 @@ function ia(e, a, l) {
|
|
|
1410
1413
|
return Ut({ ...e, symbol: n }, a);
|
|
1411
1414
|
const u = r[0]?.symbol || n, w = st(u);
|
|
1412
1415
|
let p = {};
|
|
1413
|
-
const
|
|
1416
|
+
const S = [];
|
|
1414
1417
|
let y = null;
|
|
1415
1418
|
if (w === "fill") {
|
|
1416
1419
|
const m = ["match", ["to-string", ["get", o]]];
|
|
1417
1420
|
for (const i of r) {
|
|
1418
1421
|
m.push(it(i.value)), m.push(z(i.symbol?.color));
|
|
1419
1422
|
const g = String(i.value), L = l?.get(g) || i.label || g;
|
|
1420
|
-
|
|
1423
|
+
S.push({
|
|
1421
1424
|
type: "fill",
|
|
1422
1425
|
color: z(i.symbol?.color),
|
|
1423
1426
|
label: L
|
|
1424
1427
|
});
|
|
1425
1428
|
}
|
|
1426
|
-
if (m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"),
|
|
1429
|
+
if (m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1430
|
+
type: "fill",
|
|
1431
|
+
color: z(n.color),
|
|
1432
|
+
label: e.defaultLabel || "Other"
|
|
1433
|
+
}), p = {
|
|
1427
1434
|
"fill-color": m,
|
|
1428
1435
|
"fill-opacity": me(a)
|
|
1429
1436
|
}, Pe(u?.outline)) {
|
|
1430
|
-
const i =
|
|
1437
|
+
const i = J(Math.max(u.outline.width || 1, 1));
|
|
1431
1438
|
y = {
|
|
1432
1439
|
"line-color": z(u.outline.color),
|
|
1433
1440
|
"line-width": i
|
|
@@ -1438,16 +1445,21 @@ function ia(e, a, l) {
|
|
|
1438
1445
|
for (const d of r) {
|
|
1439
1446
|
m.push(it(d.value)), m.push(z(d.symbol?.color));
|
|
1440
1447
|
const L = String(d.value), E = l?.get(L) || d.label || L;
|
|
1441
|
-
|
|
1448
|
+
S.push({
|
|
1442
1449
|
type: "line",
|
|
1443
1450
|
color: z(d.symbol?.color),
|
|
1444
|
-
width:
|
|
1451
|
+
width: J(d.symbol?.width || 1),
|
|
1445
1452
|
label: E
|
|
1446
1453
|
});
|
|
1447
1454
|
}
|
|
1448
|
-
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"),
|
|
1455
|
+
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1456
|
+
type: "line",
|
|
1457
|
+
color: z(n.color),
|
|
1458
|
+
width: J(n.width || 1),
|
|
1459
|
+
label: e.defaultLabel || "Other"
|
|
1460
|
+
}), p = {
|
|
1449
1461
|
"line-color": m,
|
|
1450
|
-
"line-width":
|
|
1462
|
+
"line-width": J(u?.width || 2),
|
|
1451
1463
|
"line-opacity": me(a)
|
|
1452
1464
|
};
|
|
1453
1465
|
const i = r.map((d) => d.symbol?.style || "esriSLSSolid"), g = [...new Set(i)];
|
|
@@ -1463,22 +1475,26 @@ function ia(e, a, l) {
|
|
|
1463
1475
|
const m = ["match", ["to-string", ["get", o]]];
|
|
1464
1476
|
for (const g of r) {
|
|
1465
1477
|
m.push(it(g.value)), m.push(z(g.symbol?.color));
|
|
1466
|
-
const d = String(g.value),
|
|
1467
|
-
|
|
1478
|
+
const d = String(g.value), C = l?.get(d) || g.label || d;
|
|
1479
|
+
S.push({
|
|
1468
1480
|
type: "circle",
|
|
1469
1481
|
color: z(g.symbol?.color),
|
|
1470
|
-
label:
|
|
1482
|
+
label: C
|
|
1471
1483
|
});
|
|
1472
1484
|
}
|
|
1473
|
-
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)")
|
|
1485
|
+
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1486
|
+
type: "circle",
|
|
1487
|
+
color: z(n.color),
|
|
1488
|
+
label: e.defaultLabel || "Other"
|
|
1489
|
+
});
|
|
1474
1490
|
const i = Math.round((u?.size || 6) * 0.71 * 100) / 100;
|
|
1475
1491
|
p = {
|
|
1476
1492
|
"circle-color": m,
|
|
1477
1493
|
"circle-radius": i,
|
|
1478
1494
|
"circle-opacity": me(a)
|
|
1479
|
-
}, Pe(u?.outline) && (p["circle-stroke-color"] = z(u.outline.color), p["circle-stroke-width"] =
|
|
1495
|
+
}, Pe(u?.outline) && (p["circle-stroke-color"] = z(u.outline.color), p["circle-stroke-width"] = J(u.outline.width || 1));
|
|
1480
1496
|
}
|
|
1481
|
-
return { paint: p, legend:
|
|
1497
|
+
return { paint: p, legend: S, geomType: w, outlinePaint: y };
|
|
1482
1498
|
}
|
|
1483
1499
|
function la(e, a) {
|
|
1484
1500
|
const l = e.field.toLowerCase(), o = e.classBreakInfos || [], r = e.visualVariables?.find((y) => y.type === "colorInfo");
|
|
@@ -1489,7 +1505,7 @@ function la(e, a) {
|
|
|
1489
1505
|
const n = o[0]?.symbol, u = st(n);
|
|
1490
1506
|
let w = {};
|
|
1491
1507
|
const p = [];
|
|
1492
|
-
let
|
|
1508
|
+
let S = null;
|
|
1493
1509
|
if (u === "fill") {
|
|
1494
1510
|
const y = ["step", ["get", l]];
|
|
1495
1511
|
y.push(z(o[0]?.symbol?.color));
|
|
@@ -1505,8 +1521,8 @@ function la(e, a) {
|
|
|
1505
1521
|
"fill-color": y,
|
|
1506
1522
|
"fill-opacity": me(a)
|
|
1507
1523
|
}, Pe(n?.outline)) {
|
|
1508
|
-
const m =
|
|
1509
|
-
|
|
1524
|
+
const m = J(n.outline.width || 1);
|
|
1525
|
+
S = {
|
|
1510
1526
|
"line-color": z(n.outline.color),
|
|
1511
1527
|
"line-width": m
|
|
1512
1528
|
};
|
|
@@ -1515,7 +1531,7 @@ function la(e, a) {
|
|
|
1515
1531
|
const y = o.map((E) => E.symbol?.style || "esriSLSSolid"), m = [...new Set(y)];
|
|
1516
1532
|
if (m.length > 1) {
|
|
1517
1533
|
const E = ea(o, y, l, e, a);
|
|
1518
|
-
return { paint: {}, legend: [], geomType: u, outlinePaint:
|
|
1534
|
+
return { paint: {}, legend: [], geomType: u, outlinePaint: S, splitLayers: E };
|
|
1519
1535
|
}
|
|
1520
1536
|
const g = ["step", ["get", l]];
|
|
1521
1537
|
g.push(z(o[0]?.symbol?.color));
|
|
@@ -1525,20 +1541,20 @@ function la(e, a) {
|
|
|
1525
1541
|
E > 0 && (g.push(o[E - 1].classMaxValue), g.push(z(F.symbol?.color))), p.push({
|
|
1526
1542
|
type: "line",
|
|
1527
1543
|
color: z(F.symbol?.color),
|
|
1528
|
-
width:
|
|
1544
|
+
width: J(F.symbol?.width || n?.width || 2),
|
|
1529
1545
|
label: F.label || `${d} - ${F.classMaxValue}`
|
|
1530
1546
|
}), d = F.classMaxValue + 1;
|
|
1531
1547
|
}
|
|
1532
|
-
const L =
|
|
1548
|
+
const L = J(n?.width || 2);
|
|
1533
1549
|
w = {
|
|
1534
1550
|
"line-color": g,
|
|
1535
1551
|
"line-width": L,
|
|
1536
1552
|
"line-opacity": me(a)
|
|
1537
1553
|
};
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1554
|
+
const C = Ke(m[0]);
|
|
1555
|
+
C && (w["line-dasharray"] = C);
|
|
1540
1556
|
}
|
|
1541
|
-
return { paint: w, legend: p, geomType: u, outlinePaint:
|
|
1557
|
+
return { paint: w, legend: p, geomType: u, outlinePaint: S };
|
|
1542
1558
|
}
|
|
1543
1559
|
function na(e, a, l, o) {
|
|
1544
1560
|
const r = e.stops || [];
|
|
@@ -1547,7 +1563,7 @@ function na(e, a, l, o) {
|
|
|
1547
1563
|
const n = l.classBreakInfos?.[0]?.symbol || l.defaultSymbol, u = st(n);
|
|
1548
1564
|
let w = {};
|
|
1549
1565
|
const p = [];
|
|
1550
|
-
let
|
|
1566
|
+
let S = null;
|
|
1551
1567
|
if (u === "fill") {
|
|
1552
1568
|
const y = ["interpolate", ["linear"], ["get", a]];
|
|
1553
1569
|
for (const i of r)
|
|
@@ -1567,14 +1583,14 @@ function na(e, a, l, o) {
|
|
|
1567
1583
|
],
|
|
1568
1584
|
"fill-opacity": me(o)
|
|
1569
1585
|
}, Pe(n?.outline)) {
|
|
1570
|
-
const i =
|
|
1571
|
-
|
|
1586
|
+
const i = J(n.outline.width || 1);
|
|
1587
|
+
S = {
|
|
1572
1588
|
"line-color": z(n.outline.color),
|
|
1573
1589
|
"line-width": i
|
|
1574
1590
|
};
|
|
1575
1591
|
}
|
|
1576
1592
|
}
|
|
1577
|
-
return { paint: w, legend: p, geomType: u, outlinePaint:
|
|
1593
|
+
return { paint: w, legend: p, geomType: u, outlinePaint: S };
|
|
1578
1594
|
}
|
|
1579
1595
|
function ra(e, a, l, o) {
|
|
1580
1596
|
if (!e?.renderer)
|
|
@@ -1662,16 +1678,16 @@ async function Wt(e) {
|
|
|
1662
1678
|
if (r.url && !r.title?.toLowerCase().includes("(under construction)") && !(r.url && /\/MapServer(\/\d+)?$/i.test(r.url)))
|
|
1663
1679
|
try {
|
|
1664
1680
|
let n = r.layerDefinition?.drawingInfo, u;
|
|
1665
|
-
const w = !n || !n.renderer, p = o.includes(r.title),
|
|
1681
|
+
const w = !n || !n.renderer, p = o.includes(r.title), S = n?.renderer?.uniqueValueInfos?.[0]?.symbol?.outline || n?.renderer?.defaultSymbol?.outline;
|
|
1666
1682
|
if ((w || p) && r.url) {
|
|
1667
1683
|
const O = await pa(r.url);
|
|
1668
1684
|
if (O) {
|
|
1669
|
-
if (n = O.drawingInfo,
|
|
1685
|
+
if (n = O.drawingInfo, S && Pe(S) && n?.renderer) {
|
|
1670
1686
|
const D = n.renderer, ee = D.uniqueValueInfos?.[0]?.symbol?.outline || D.defaultSymbol?.outline;
|
|
1671
1687
|
if (!Pe(ee)) {
|
|
1672
1688
|
for (const U of D.uniqueValueInfos || [])
|
|
1673
|
-
U.symbol && (U.symbol.outline =
|
|
1674
|
-
D.defaultSymbol && (D.defaultSymbol.outline =
|
|
1689
|
+
U.symbol && (U.symbol.outline = S);
|
|
1690
|
+
D.defaultSymbol && (D.defaultSymbol.outline = S);
|
|
1675
1691
|
}
|
|
1676
1692
|
}
|
|
1677
1693
|
O.description && (u = fa(O.description), u.size > 0);
|
|
@@ -1682,7 +1698,7 @@ async function Wt(e) {
|
|
|
1682
1698
|
r.opacity,
|
|
1683
1699
|
u,
|
|
1684
1700
|
r.title
|
|
1685
|
-
), L = sa(r.popupInfo),
|
|
1701
|
+
), L = sa(r.popupInfo), C = ca(r.layerDefinition), E = aa(r.layerDefinition?.minScale, r.layerDefinition?.maxScale), F = ua(r.title), V = da(r.title), T = r.opacity ?? 1;
|
|
1686
1702
|
if (d && d.length > 0)
|
|
1687
1703
|
for (const O of d) {
|
|
1688
1704
|
const D = `${F}${O.suffix}`;
|
|
@@ -1695,7 +1711,7 @@ async function Wt(e) {
|
|
|
1695
1711
|
paint: O.paint,
|
|
1696
1712
|
legend: O.legend,
|
|
1697
1713
|
popup: L,
|
|
1698
|
-
where:
|
|
1714
|
+
where: C ? `(${C}) AND (${O.where})` : O.where,
|
|
1699
1715
|
minZoom: E.minZoom,
|
|
1700
1716
|
maxZoom: E.maxZoom,
|
|
1701
1717
|
parentId: O.suffix ? F : void 0
|
|
@@ -1711,7 +1727,7 @@ async function Wt(e) {
|
|
|
1711
1727
|
paint: y,
|
|
1712
1728
|
legend: m,
|
|
1713
1729
|
popup: L,
|
|
1714
|
-
where:
|
|
1730
|
+
where: C,
|
|
1715
1731
|
minZoom: E.minZoom,
|
|
1716
1732
|
maxZoom: E.maxZoom,
|
|
1717
1733
|
outlinePaint: g
|
|
@@ -1834,7 +1850,7 @@ function va(e) {
|
|
|
1834
1850
|
throw new Error(`HTTP ${L.status}: ${L.statusText}`);
|
|
1835
1851
|
d = await L.json();
|
|
1836
1852
|
} else if (i.type === "esri") {
|
|
1837
|
-
const
|
|
1853
|
+
const C = `${i.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, E = await fetch(C, i.options);
|
|
1838
1854
|
if (!E.ok)
|
|
1839
1855
|
throw new Error(`HTTP ${E.status}: ${E.statusText}`);
|
|
1840
1856
|
d = (await E.json()).features?.map((V) => V.attributes) || [];
|
|
@@ -1876,7 +1892,7 @@ function va(e) {
|
|
|
1876
1892
|
function p(i) {
|
|
1877
1893
|
return a.value[i]?.loading ?? !1;
|
|
1878
1894
|
}
|
|
1879
|
-
function
|
|
1895
|
+
function S(i) {
|
|
1880
1896
|
return a.value[i]?.error ?? null;
|
|
1881
1897
|
}
|
|
1882
1898
|
function y() {
|
|
@@ -1911,7 +1927,7 @@ function va(e) {
|
|
|
1911
1927
|
/** Check if a specific source is loading */
|
|
1912
1928
|
isSourceLoading: p,
|
|
1913
1929
|
/** Get error for a specific source */
|
|
1914
|
-
getError:
|
|
1930
|
+
getError: S,
|
|
1915
1931
|
/** Stop all polling (useful for cleanup) */
|
|
1916
1932
|
stopPolling: m
|
|
1917
1933
|
};
|
|
@@ -1961,12 +1977,12 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1961
1977
|
},
|
|
1962
1978
|
emits: ["configs-loaded", "load-error", "zoom"],
|
|
1963
1979
|
setup(e, { expose: a, emit: l }) {
|
|
1964
|
-
const o = e, r = l, n = x([]), u = x(!0), w = x(null), p = x(12),
|
|
1980
|
+
const o = e, r = l, n = x([]), u = x(!0), w = x(null), p = x(12), S = x(""), y = x(/* @__PURE__ */ new Set()), m = x({}), i = x(/* @__PURE__ */ new Set()), g = x({}), d = x({}), L = x(/* @__PURE__ */ new Set()), C = x({});
|
|
1965
1981
|
function E() {
|
|
1966
1982
|
const v = {};
|
|
1967
1983
|
for (const $ of o.tiledLayers)
|
|
1968
1984
|
v[$.id] = $.opacity ?? 1;
|
|
1969
|
-
|
|
1985
|
+
C.value = v;
|
|
1970
1986
|
}
|
|
1971
1987
|
function F(v) {
|
|
1972
1988
|
L.value.has(v) ? L.value.delete(v) : L.value.add(v), L.value = new Set(L.value);
|
|
@@ -1975,7 +1991,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1975
1991
|
$ ? L.value.add(v) : L.value.delete(v), L.value = new Set(L.value);
|
|
1976
1992
|
}
|
|
1977
1993
|
function T(v, $) {
|
|
1978
|
-
|
|
1994
|
+
C.value = { ...C.value, [v]: $ };
|
|
1979
1995
|
}
|
|
1980
1996
|
const O = o.dataSources.length > 0 ? va(o.dataSources) : null, D = _(() => O?.state.value ?? {}), ee = _(() => O?.isLoading.value ?? !1);
|
|
1981
1997
|
function U(v) {
|
|
@@ -1984,7 +2000,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1984
2000
|
function de(v) {
|
|
1985
2001
|
return O?.refetch(v) ?? Promise.resolve();
|
|
1986
2002
|
}
|
|
1987
|
-
N("layerboard-layers", j(n)), N("layerboard-visible", y), N("layerboard-opacities", m), N("layerboard-loading", j(i)), N("layerboard-errors", j(g)), N("layerboard-zoom", j(p)), N("layerboard-toggle-layer", De), N("layerboard-set-layer-visible", je), N("layerboard-set-layers-visible", Me), N("layerboard-set-opacity", Fe), N("layerboard-tiled-layers", j(_(() => o.tiledLayers))), N("layerboard-visible-tiled", L), N("layerboard-tiled-opacities",
|
|
2003
|
+
N("layerboard-layers", j(n)), N("layerboard-visible", y), N("layerboard-opacities", m), N("layerboard-loading", j(i)), N("layerboard-errors", j(g)), N("layerboard-zoom", j(p)), N("layerboard-toggle-layer", De), N("layerboard-set-layer-visible", je), N("layerboard-set-layers-visible", Me), N("layerboard-set-opacity", Fe), N("layerboard-tiled-layers", j(_(() => o.tiledLayers))), N("layerboard-visible-tiled", L), N("layerboard-tiled-opacities", C), N("layerboard-toggle-tiled", F), N("layerboard-set-tiled-opacity", T), N("layerboard-set-tiled-visible", V), N("layerboard-data-sources-state", D), N("layerboard-data-sources-loading", ee), N("layerboard-get-data-source", U), N("layerboard-refetch-data-source", de);
|
|
1988
2004
|
const ve = _(() => ({
|
|
1989
2005
|
backgroundColor: o.themeColor
|
|
1990
2006
|
})), ct = _(() => ({
|
|
@@ -1998,29 +2014,29 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1998
2014
|
try {
|
|
1999
2015
|
u.value = !0, w.value = null;
|
|
2000
2016
|
const $ = (await wt(o.webMapId)).map((Z) => {
|
|
2001
|
-
let
|
|
2017
|
+
let Q = Z;
|
|
2002
2018
|
const Ce = o.layerStyleOverrides[Z.id];
|
|
2003
|
-
Ce && (
|
|
2004
|
-
...
|
|
2005
|
-
paint: Ce.paint ??
|
|
2006
|
-
outlinePaint: Ce.outlinePaint ??
|
|
2007
|
-
legend: Ce.legend ??
|
|
2008
|
-
type: Ce.type ??
|
|
2019
|
+
Ce && (Q = {
|
|
2020
|
+
...Q,
|
|
2021
|
+
paint: Ce.paint ?? Q.paint,
|
|
2022
|
+
outlinePaint: Ce.outlinePaint ?? Q.outlinePaint,
|
|
2023
|
+
legend: Ce.legend ?? Q.legend,
|
|
2024
|
+
type: Ce.type ?? Q.type
|
|
2009
2025
|
});
|
|
2010
2026
|
const Ze = o.popupOverrides[Z.id] || (Z.parentId ? o.popupOverrides[Z.parentId] : void 0);
|
|
2011
|
-
return Ze &&
|
|
2012
|
-
...
|
|
2013
|
-
popup: { ...
|
|
2014
|
-
}),
|
|
2027
|
+
return Ze && Q.popup && (Q = {
|
|
2028
|
+
...Q,
|
|
2029
|
+
popup: { ...Q.popup, ...Ze }
|
|
2030
|
+
}), Q;
|
|
2015
2031
|
});
|
|
2016
2032
|
n.value = $.map((Z) => ({
|
|
2017
2033
|
config: Z,
|
|
2018
2034
|
component: Z.type
|
|
2019
2035
|
}));
|
|
2020
|
-
const
|
|
2036
|
+
const K = {};
|
|
2021
2037
|
$.forEach((Z) => {
|
|
2022
|
-
|
|
2023
|
-
}), m.value =
|
|
2038
|
+
K[Z.id] = Z.opacity ?? 1;
|
|
2039
|
+
}), m.value = K, r("configs-loaded", $);
|
|
2024
2040
|
} catch (v) {
|
|
2025
2041
|
const $ = v instanceof Error ? v.message : "Failed to load layer configurations";
|
|
2026
2042
|
w.value = $, r("load-error", $);
|
|
@@ -2035,10 +2051,10 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2035
2051
|
"select url_text, COALESCE(representation, '') as representation from phl.knack_metadata_reps_endpoints_join WHERE ( format = 'API' OR format = 'GeoService' ) AND url_text IS NOT null"
|
|
2036
2052
|
), $ = await fetch(v);
|
|
2037
2053
|
if (!$.ok) return;
|
|
2038
|
-
const
|
|
2039
|
-
for (const
|
|
2040
|
-
if (
|
|
2041
|
-
const Ce = Nt(
|
|
2054
|
+
const K = await $.json(), Z = {};
|
|
2055
|
+
for (const Q of K.rows || [])
|
|
2056
|
+
if (Q.url_text && Q.representation) {
|
|
2057
|
+
const Ce = Nt(Q.url_text), Ze = `https://metadata.phila.gov/#home/representationdetails/${Q.representation}/`;
|
|
2042
2058
|
Z[Ce] = Ze;
|
|
2043
2059
|
}
|
|
2044
2060
|
d.value = Z;
|
|
@@ -2055,8 +2071,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2055
2071
|
$ ? y.value.add(v) : y.value.delete(v), y.value = new Set(y.value);
|
|
2056
2072
|
}
|
|
2057
2073
|
function Me(v, $) {
|
|
2058
|
-
for (const
|
|
2059
|
-
$ ? y.value.add(
|
|
2074
|
+
for (const K of v)
|
|
2075
|
+
$ ? y.value.add(K) : y.value.delete(K);
|
|
2060
2076
|
y.value = new Set(y.value);
|
|
2061
2077
|
}
|
|
2062
2078
|
function Fe(v, $) {
|
|
@@ -2069,12 +2085,12 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2069
2085
|
if ($)
|
|
2070
2086
|
g.value = { ...g.value, [v]: $ };
|
|
2071
2087
|
else {
|
|
2072
|
-
const
|
|
2073
|
-
delete
|
|
2088
|
+
const K = { ...g.value };
|
|
2089
|
+
delete K[v], g.value = K;
|
|
2074
2090
|
}
|
|
2075
2091
|
}
|
|
2076
2092
|
function re(v) {
|
|
2077
|
-
|
|
2093
|
+
S.value = v;
|
|
2078
2094
|
}
|
|
2079
2095
|
const Te = x(null), oe = x(null), _e = x(null), Ye = x(null), be = x(null), Ge = x(null), et = x(null), Se = x("sidebar");
|
|
2080
2096
|
function ft() {
|
|
@@ -2123,8 +2139,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2123
2139
|
)
|
|
2124
2140
|
);
|
|
2125
2141
|
if ($.length === 0) return;
|
|
2126
|
-
const
|
|
2127
|
-
v.shiftKey ? document.activeElement ===
|
|
2142
|
+
const K = $[0], Z = $[$.length - 1];
|
|
2143
|
+
v.shiftKey ? document.activeElement === K && (v.preventDefault(), Z.focus()) : document.activeElement === Z && (v.preventDefault(), K.focus());
|
|
2128
2144
|
}
|
|
2129
2145
|
}
|
|
2130
2146
|
function pt(v) {
|
|
@@ -2139,8 +2155,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2139
2155
|
)
|
|
2140
2156
|
);
|
|
2141
2157
|
if ($.length === 0) return;
|
|
2142
|
-
const
|
|
2143
|
-
v.shiftKey ? document.activeElement ===
|
|
2158
|
+
const K = $[0], Z = $[$.length - 1];
|
|
2159
|
+
v.shiftKey ? document.activeElement === K && (v.preventDefault(), Z.focus()) : document.activeElement === Z && (v.preventDefault(), K.focus());
|
|
2144
2160
|
}
|
|
2145
2161
|
}
|
|
2146
2162
|
N("layerboard-open-modal", Ae), N("layerboard-close-modal", le), N("layerboard-is-modal-open", j(ie)), a({
|
|
@@ -2172,7 +2188,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2172
2188
|
/** Set of visible tiled layer IDs */
|
|
2173
2189
|
visibleTiledLayers: L,
|
|
2174
2190
|
/** Tiled layer opacity values */
|
|
2175
|
-
tiledLayerOpacities:
|
|
2191
|
+
tiledLayerOpacities: C,
|
|
2176
2192
|
/** Toggle a tiled layer's visibility */
|
|
2177
2193
|
toggleTiledLayer: F,
|
|
2178
2194
|
/** Set a tiled layer's visibility explicitly */
|
|
@@ -2322,7 +2338,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2322
2338
|
setOpacity: Fe,
|
|
2323
2339
|
tiledLayers: e.tiledLayers,
|
|
2324
2340
|
visibleTiledLayers: L.value,
|
|
2325
|
-
tiledLayerOpacities:
|
|
2341
|
+
tiledLayerOpacities: C.value,
|
|
2326
2342
|
toggleTiledLayer: F,
|
|
2327
2343
|
setTiledLayerVisible: V,
|
|
2328
2344
|
setTiledLayerOpacity: T,
|
|
@@ -2339,7 +2355,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2339
2355
|
"loading-layers": i.value,
|
|
2340
2356
|
"layer-errors": g.value,
|
|
2341
2357
|
"current-zoom": p.value,
|
|
2342
|
-
"search-query":
|
|
2358
|
+
"search-query": S.value,
|
|
2343
2359
|
"layer-metadata": d.value,
|
|
2344
2360
|
onToggleLayer: De,
|
|
2345
2361
|
onSetOpacity: Fe,
|
|
@@ -2358,7 +2374,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2358
2374
|
"layer-list": n.value,
|
|
2359
2375
|
"tiled-layers": e.tiledLayers,
|
|
2360
2376
|
"visible-tiled-layers": L.value,
|
|
2361
|
-
"tiled-layer-opacities":
|
|
2377
|
+
"tiled-layer-opacities": C.value,
|
|
2362
2378
|
"cyclomedia-config": e.cyclomediaConfig,
|
|
2363
2379
|
"pictometry-credentials": e.pictometryCredentials,
|
|
2364
2380
|
"basemap-control-position": e.basemapControlPosition,
|
|
@@ -2468,7 +2484,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2468
2484
|
function w() {
|
|
2469
2485
|
r.value = !r.value, o("toggle", r.value);
|
|
2470
2486
|
}
|
|
2471
|
-
return (p,
|
|
2487
|
+
return (p, S) => {
|
|
2472
2488
|
const y = to("font-awesome-icon");
|
|
2473
2489
|
return h(), M("div", {
|
|
2474
2490
|
class: ne(["topic-accordion", { "is-expanded": r.value }])
|
|
@@ -2493,7 +2509,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2493
2509
|
P("span", Oa, G(e.title), 1),
|
|
2494
2510
|
P("span", {
|
|
2495
2511
|
class: ne(["topic-chevron", { "is-rotated": r.value }])
|
|
2496
|
-
}, [...
|
|
2512
|
+
}, [...S[0] || (S[0] = [
|
|
2497
2513
|
P("svg", {
|
|
2498
2514
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2499
2515
|
width: "20",
|
|
@@ -2517,7 +2533,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2517
2533
|
class: "topic-content"
|
|
2518
2534
|
}, [
|
|
2519
2535
|
he(p.$slots, "default", {}, () => [
|
|
2520
|
-
|
|
2536
|
+
S[1] || (S[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
|
|
2521
2537
|
], !0)
|
|
2522
2538
|
], 512), [
|
|
2523
2539
|
[oo, r.value]
|
|
@@ -2559,7 +2575,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2559
2575
|
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading: u, getLayerError: w, isLayerAvailableAtZoom: p } = Ct(
|
|
2560
2576
|
() => l
|
|
2561
2577
|
);
|
|
2562
|
-
function
|
|
2578
|
+
function S(y) {
|
|
2563
2579
|
o("toggleLayer", y);
|
|
2564
2580
|
}
|
|
2565
2581
|
return (y, m) => (h(), M("fieldset", {
|
|
@@ -2582,7 +2598,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2582
2598
|
type: "checkbox",
|
|
2583
2599
|
checked: f(r)(i.id),
|
|
2584
2600
|
disabled: !f(p)(i),
|
|
2585
|
-
onChange: (g) =>
|
|
2601
|
+
onChange: (g) => S(i.id)
|
|
2586
2602
|
}, null, 40, Ra),
|
|
2587
2603
|
P("span", Aa, [
|
|
2588
2604
|
xe(G(f(ze)(i)) + " ", 1),
|
|
@@ -2646,7 +2662,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2646
2662
|
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading: u, getLayerError: w, isLayerAvailableAtZoom: p } = Ct(
|
|
2647
2663
|
() => l
|
|
2648
2664
|
);
|
|
2649
|
-
function
|
|
2665
|
+
function S(y) {
|
|
2650
2666
|
const m = l.layers.filter((i) => l.visibleLayerIds.has(i.id) && i.id !== y).map((i) => i.id);
|
|
2651
2667
|
o("selectLayer", y, m);
|
|
2652
2668
|
}
|
|
@@ -2670,7 +2686,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2670
2686
|
name: e.groupName,
|
|
2671
2687
|
checked: f(r)(i.id),
|
|
2672
2688
|
disabled: !f(p)(i),
|
|
2673
|
-
onChange: (g) =>
|
|
2689
|
+
onChange: (g) => S(i.id)
|
|
2674
2690
|
}, null, 40, Ua),
|
|
2675
2691
|
P("span", Wa, [
|
|
2676
2692
|
xe(G(f(ze)(i)) + " ", 1),
|
|
@@ -2699,7 +2715,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2699
2715
|
}
|
|
2700
2716
|
}), oi = /* @__PURE__ */ $e(qa, [["__scopeId", "data-v-c368d815"]]);
|
|
2701
2717
|
function ai(e) {
|
|
2702
|
-
const a = x([]), l = x(/* @__PURE__ */ new Set()), o = x({}), r = x(/* @__PURE__ */ new Set()), n = x({}), u = x(""), w = x(!1), p = x(!1),
|
|
2718
|
+
const a = x([]), l = x(/* @__PURE__ */ new Set()), o = x({}), r = x(/* @__PURE__ */ new Set()), n = x({}), u = x(""), w = x(!1), p = x(!1), S = x(null), y = _(() => {
|
|
2703
2719
|
if (!u.value.trim())
|
|
2704
2720
|
return a.value;
|
|
2705
2721
|
const T = u.value.toLowerCase();
|
|
@@ -2711,7 +2727,7 @@ function ai(e) {
|
|
|
2711
2727
|
})));
|
|
2712
2728
|
async function i() {
|
|
2713
2729
|
if (!p.value) {
|
|
2714
|
-
w.value = !0,
|
|
2730
|
+
w.value = !0, S.value = null;
|
|
2715
2731
|
try {
|
|
2716
2732
|
let T;
|
|
2717
2733
|
e.mode === "dynamic" || !e.mode ? e.webMapId ? T = await g(e.webMapId) : T = await wt() : T = await wt(), a.value = T;
|
|
@@ -2720,7 +2736,7 @@ function ai(e) {
|
|
|
2720
2736
|
O[D.id] = D.opacity ?? 1;
|
|
2721
2737
|
}), o.value = O, p.value = !0;
|
|
2722
2738
|
} catch (T) {
|
|
2723
|
-
|
|
2739
|
+
S.value = T instanceof Error ? T : new Error("Failed to initialize layerboard");
|
|
2724
2740
|
} finally {
|
|
2725
2741
|
w.value = !1;
|
|
2726
2742
|
}
|
|
@@ -2743,7 +2759,7 @@ function ai(e) {
|
|
|
2743
2759
|
[T]: Math.max(0, Math.min(1, O))
|
|
2744
2760
|
};
|
|
2745
2761
|
}
|
|
2746
|
-
function
|
|
2762
|
+
function C(T) {
|
|
2747
2763
|
u.value = T;
|
|
2748
2764
|
}
|
|
2749
2765
|
function E(T, O) {
|
|
@@ -2759,7 +2775,7 @@ function ai(e) {
|
|
|
2759
2775
|
}
|
|
2760
2776
|
}
|
|
2761
2777
|
function V() {
|
|
2762
|
-
a.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {}, u.value = "", w.value = !1, p.value = !1,
|
|
2778
|
+
a.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {}, u.value = "", w.value = !1, p.value = !1, S.value = null;
|
|
2763
2779
|
}
|
|
2764
2780
|
return {
|
|
2765
2781
|
// State (readonly)
|
|
@@ -2771,7 +2787,7 @@ function ai(e) {
|
|
|
2771
2787
|
searchQuery: j(u),
|
|
2772
2788
|
isLoading: j(w),
|
|
2773
2789
|
isInitialized: j(p),
|
|
2774
|
-
error: j(
|
|
2790
|
+
error: j(S),
|
|
2775
2791
|
// Computed
|
|
2776
2792
|
filteredLayerConfigs: y,
|
|
2777
2793
|
layerList: m,
|
|
@@ -2781,7 +2797,7 @@ function ai(e) {
|
|
|
2781
2797
|
initialize: i,
|
|
2782
2798
|
toggleLayer: d,
|
|
2783
2799
|
setLayerOpacity: L,
|
|
2784
|
-
filterLayers:
|
|
2800
|
+
filterLayers: C,
|
|
2785
2801
|
setLayerLoading: E,
|
|
2786
2802
|
setLayerError: F,
|
|
2787
2803
|
reset: V
|
|
@@ -2807,12 +2823,12 @@ function Ga(e) {
|
|
|
2807
2823
|
const a = x(null), l = x(!1), o = x(null), r = x(0);
|
|
2808
2824
|
async function n(p = {}) {
|
|
2809
2825
|
l.value = !0, o.value = null;
|
|
2810
|
-
const
|
|
2826
|
+
const S = e.pageSize || 2e3;
|
|
2811
2827
|
let y = 0, m = [], i = !0;
|
|
2812
2828
|
try {
|
|
2813
2829
|
for (; i; ) {
|
|
2814
2830
|
const d = e.url.replace(/\/$/, ""), L = encodeURIComponent(p.where || e.where || "1=1");
|
|
2815
|
-
let
|
|
2831
|
+
let C = `${d}/query?where=${L}&outFields=*&returnGeometry=true&resultRecordCount=${S}&resultOffset=${y}&f=geojson`;
|
|
2816
2832
|
if (p.bounds) {
|
|
2817
2833
|
const V = JSON.stringify({
|
|
2818
2834
|
xmin: p.bounds.west,
|
|
@@ -2821,13 +2837,13 @@ function Ga(e) {
|
|
|
2821
2837
|
ymax: p.bounds.north,
|
|
2822
2838
|
spatialReference: { wkid: 4326 }
|
|
2823
2839
|
});
|
|
2824
|
-
|
|
2840
|
+
C += `&geometry=${encodeURIComponent(V)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
|
|
2825
2841
|
}
|
|
2826
|
-
const E = await fetch(
|
|
2842
|
+
const E = await fetch(C);
|
|
2827
2843
|
if (!E.ok)
|
|
2828
2844
|
throw new Error(`HTTP ${E.status}: ${E.statusText}`);
|
|
2829
2845
|
const F = await E.json();
|
|
2830
|
-
F.features && F.features.length > 0 ? (m = m.concat(F.features), y += F.features.length, i = F.features.length ===
|
|
2846
|
+
F.features && F.features.length > 0 ? (m = m.concat(F.features), y += F.features.length, i = F.features.length === S) : i = !1;
|
|
2831
2847
|
}
|
|
2832
2848
|
const g = {
|
|
2833
2849
|
type: "FeatureCollection",
|