@delta10/atlas-sdk 0.1.8 → 0.1.9
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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/assets/icons/layers.svg.js +23 -0
- package/dist/assets/icons/map.svg.js +21 -0
- package/dist/assets/icons/minus.svg.js +20 -0
- package/dist/assets/icons/plus.svg.js +20 -0
- package/dist/components/Map.vue.js +7 -0
- package/dist/components/Map.vue2.js +422 -0
- package/dist/components/panels/BaseLayers.vue.js +7 -0
- package/dist/components/panels/BaseLayers.vue2.js +50 -0
- package/dist/components/panels/Layers.vue.js +7 -0
- package/dist/components/panels/Layers.vue2.js +35 -0
- package/dist/index.js +10 -0
- package/dist/style.css +1 -1
- package/dist/utils/projections.js +8 -0
- package/package.json +6 -9
- package/dist/atlas-sdk.js +0 -5
- package/dist/atlas-sdk.umd.cjs +0 -816
- package/dist/basedecoder-PoXbLGBV.js +0 -88
- package/dist/decoder-CLokFc0V.js +0 -8
- package/dist/deflate-DbhbvOaP.js +0 -10
- package/dist/html2canvas.esm-C17pzFXx-LAKgTrxK.js +0 -4852
- package/dist/index-B8ywHuC8.js +0 -62579
- package/dist/index.es-Di2I6Ukg-D4fShinS.js +0 -6622
- package/dist/jpeg-CqPRbuRp.js +0 -533
- package/dist/lerc-OTtaxyqU.js +0 -1032
- package/dist/lzw-DQ6ibF74.js +0 -84
- package/dist/packbits-BuzK6gM3.js +0 -24
- package/dist/pako.esm-Bx5X36Wo.js +0 -1074
- package/dist/purify.es-DaUpxO-q-DMHqskJ-.js +0 -552
- package/dist/raw-CaSL8pVO.js +0 -9
- package/dist/webimage--SJddlky.js +0 -19
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { openBlock as l, createElementBlock as n, createElementVNode as t } from "vue";
|
|
2
|
+
const o = {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
width: "24",
|
|
5
|
+
height: "24"
|
|
6
|
+
};
|
|
7
|
+
function r(c, e) {
|
|
8
|
+
return l(), n("svg", o, [...e[0] || (e[0] = [
|
|
9
|
+
t("path", {
|
|
10
|
+
fill: "none",
|
|
11
|
+
d: "M0 0h24v24H0z"
|
|
12
|
+
}, null, -1),
|
|
13
|
+
t("path", {
|
|
14
|
+
fill: "currentColor",
|
|
15
|
+
d: "m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27zm0-11.47L17.74 9 12 13.47 6.26 9z"
|
|
16
|
+
}, null, -1)
|
|
17
|
+
])]);
|
|
18
|
+
}
|
|
19
|
+
const s = { render: r };
|
|
20
|
+
export {
|
|
21
|
+
s as default,
|
|
22
|
+
r as render
|
|
23
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { openBlock as t, createElementBlock as n, createElementVNode as e } from "vue";
|
|
2
|
+
const o = {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
width: "24",
|
|
5
|
+
height: "24",
|
|
6
|
+
fill: "currentColor"
|
|
7
|
+
};
|
|
8
|
+
function r(c, l) {
|
|
9
|
+
return t(), n("svg", o, [...l[0] || (l[0] = [
|
|
10
|
+
e("path", {
|
|
11
|
+
fill: "none",
|
|
12
|
+
d: "M0 0h24v24H0z"
|
|
13
|
+
}, null, -1),
|
|
14
|
+
e("path", { d: "m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5M10 5.47l4 1.4v11.66l-4-1.4zm-5 .99 3-1.01v11.7l-3 1.16zm14 11.08-3 1.01V6.86l3-1.16z" }, null, -1)
|
|
15
|
+
])]);
|
|
16
|
+
}
|
|
17
|
+
const m = { render: r };
|
|
18
|
+
export {
|
|
19
|
+
m as default,
|
|
20
|
+
r as render
|
|
21
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { openBlock as t, createElementBlock as n, createElementVNode as o } from "vue";
|
|
2
|
+
const l = {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
width: "10",
|
|
5
|
+
height: "2"
|
|
6
|
+
};
|
|
7
|
+
function r(d, e) {
|
|
8
|
+
return t(), n("svg", l, [...e[0] || (e[0] = [
|
|
9
|
+
o("path", {
|
|
10
|
+
fill: "#000",
|
|
11
|
+
"fill-rule": "evenodd",
|
|
12
|
+
d: "M10 2V0H0v2z"
|
|
13
|
+
}, null, -1)
|
|
14
|
+
])]);
|
|
15
|
+
}
|
|
16
|
+
const s = { render: r };
|
|
17
|
+
export {
|
|
18
|
+
s as default,
|
|
19
|
+
r as render
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { openBlock as t, createElementBlock as l, createElementVNode as n } from "vue";
|
|
2
|
+
const o = {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
width: "10",
|
|
5
|
+
height: "10"
|
|
6
|
+
};
|
|
7
|
+
function r(d, e) {
|
|
8
|
+
return t(), l("svg", o, [...e[0] || (e[0] = [
|
|
9
|
+
n("path", {
|
|
10
|
+
fill: "#000",
|
|
11
|
+
"fill-rule": "evenodd",
|
|
12
|
+
d: "M4 10h2V6h4V4H6V0H4v4H0v2h4z"
|
|
13
|
+
}, null, -1)
|
|
14
|
+
])]);
|
|
15
|
+
}
|
|
16
|
+
const s = { render: r };
|
|
17
|
+
export {
|
|
18
|
+
s as default,
|
|
19
|
+
r as render
|
|
20
|
+
};
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { defineComponent as pe, ref as u, computed as v, onMounted as me, openBlock as s, createElementBlock as L, createVNode as a, unref as r, withCtx as d, createBlock as l, normalizeStyle as Z, createCommentVNode as c, Fragment as x, renderList as D, mergeProps as ye, createElementVNode as g, normalizeClass as $, Transition as V } from "vue";
|
|
2
|
+
import { Map as T, Interactions as _, Layers as B, Sources as j, Geometries as R } from "vue3-openlayers";
|
|
3
|
+
import { epsg28992 as z } from "../utils/projections.js";
|
|
4
|
+
import { optionsFromCapabilities as ve } from "ol/source/WMTS";
|
|
5
|
+
import ge from "ol/format/WMTSCapabilities";
|
|
6
|
+
import { Style as W, Fill as G, Stroke as A, Circle as we } from "ol/style";
|
|
7
|
+
import { boundingExtent as be } from "ol/extent";
|
|
8
|
+
import Le from "../assets/icons/map.svg.js";
|
|
9
|
+
import he from "../assets/icons/layers.svg.js";
|
|
10
|
+
import ke from "../assets/icons/plus.svg.js";
|
|
11
|
+
import Se from "../assets/icons/minus.svg.js";
|
|
12
|
+
import Ie from "./panels/BaseLayers.vue.js";
|
|
13
|
+
import Oe from "./panels/Layers.vue.js";
|
|
14
|
+
const Te = { class: "map-container" }, _e = { class: "bottom-left-panels" }, ze = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "layers-control"
|
|
17
|
+
}, Me = ["aria-expanded"], Ce = { class: "bottom-right-panels" }, Pe = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "base-layers-control"
|
|
20
|
+
}, xe = ["aria-expanded"], Be = { class: "zoom-panel" }, qe = /* @__PURE__ */ pe({
|
|
21
|
+
__name: "Map",
|
|
22
|
+
props: {
|
|
23
|
+
layers: { default: () => [] },
|
|
24
|
+
baseLayers: { default: () => [] },
|
|
25
|
+
toggleableLayers: { default: () => [] },
|
|
26
|
+
interactions: {},
|
|
27
|
+
zoom: { default: 10 },
|
|
28
|
+
center: { default: () => [12e4, 487e3] }
|
|
29
|
+
},
|
|
30
|
+
emits: ["featureSelected", "featureDeselected", "featureModified", "featureDrawn"],
|
|
31
|
+
setup(w, { expose: U, emit: Y }) {
|
|
32
|
+
const i = w, M = Y, F = u(), f = u(), q = u({}), p = u({}), h = u(!1), k = u(!1), b = u(null), S = u(/* @__PURE__ */ new Set()), m = u(
|
|
33
|
+
new globalThis.Map()
|
|
34
|
+
), H = (e) => {
|
|
35
|
+
if (!e) return;
|
|
36
|
+
if (e instanceof W || typeof e == "function")
|
|
37
|
+
return e;
|
|
38
|
+
const o = {};
|
|
39
|
+
return e["fill-color"] && (o.fill = new G({ color: e["fill-color"] })), (e["stroke-color"] || e["stroke-width"]) && (o.stroke = new A({
|
|
40
|
+
color: e["stroke-color"] || "#3399CC",
|
|
41
|
+
width: e["stroke-width"] || 1.25
|
|
42
|
+
})), (e["circle-radius"] || e["circle-fill-color"] || e["circle-stroke-color"]) && (o.image = new we({
|
|
43
|
+
radius: e["circle-radius"] || 5,
|
|
44
|
+
fill: e["circle-fill-color"] ? new G({ color: e["circle-fill-color"] }) : void 0,
|
|
45
|
+
stroke: e["circle-stroke-color"] || e["circle-stroke-width"] ? new A({
|
|
46
|
+
color: e["circle-stroke-color"] || "#3399CC",
|
|
47
|
+
width: e["circle-stroke-width"] || 1.25
|
|
48
|
+
}) : void 0
|
|
49
|
+
})), new W(o);
|
|
50
|
+
}, J = v(() => i.layers.map((e) => {
|
|
51
|
+
if (e.type === "wmts") {
|
|
52
|
+
const o = m.value.get(e.options.identifier);
|
|
53
|
+
return {
|
|
54
|
+
type: "wmts",
|
|
55
|
+
identifier: e.options.identifier,
|
|
56
|
+
options: o || null
|
|
57
|
+
};
|
|
58
|
+
} else return e.type === "wms" ? {
|
|
59
|
+
type: "wms",
|
|
60
|
+
identifier: e.options.identifier,
|
|
61
|
+
wmsUrl: e.options.url,
|
|
62
|
+
layerName: e.options.layer
|
|
63
|
+
} : {
|
|
64
|
+
type: "vector",
|
|
65
|
+
identifier: e.options.identifier,
|
|
66
|
+
options: e.options,
|
|
67
|
+
style: e.options.style
|
|
68
|
+
};
|
|
69
|
+
})), O = v(() => {
|
|
70
|
+
if (!b.value || !i.baseLayers)
|
|
71
|
+
return null;
|
|
72
|
+
const e = i.baseLayers.find(
|
|
73
|
+
(o) => o.options.identifier === b.value
|
|
74
|
+
);
|
|
75
|
+
return !e || e.type === "wmts" && !m.value.get(e.options.identifier) ? null : e;
|
|
76
|
+
}), K = v(() => O.value && m.value.get(O.value.options.identifier) || null), Q = v(() => (i.toggleableLayers || []).filter(
|
|
77
|
+
(e) => S.value.has(e.options.identifier)
|
|
78
|
+
).map((e) => e.type === "wms" ? {
|
|
79
|
+
type: "wms",
|
|
80
|
+
identifier: e.options.identifier,
|
|
81
|
+
wmsUrl: e.options.url,
|
|
82
|
+
layerName: e.options.layer
|
|
83
|
+
} : e.type === "wmts" ? {
|
|
84
|
+
type: "wmts",
|
|
85
|
+
identifier: e.options.identifier,
|
|
86
|
+
wmtsOptions: m.value.get(e.options.identifier)
|
|
87
|
+
} : e.type === "vector" ? {
|
|
88
|
+
type: "vector",
|
|
89
|
+
identifier: e.options.identifier,
|
|
90
|
+
options: e.options,
|
|
91
|
+
style: e.options.style
|
|
92
|
+
} : {
|
|
93
|
+
...e,
|
|
94
|
+
identifier: e.options.identifier
|
|
95
|
+
})), X = v(() => {
|
|
96
|
+
const e = [];
|
|
97
|
+
if (O.value) {
|
|
98
|
+
const n = O.value;
|
|
99
|
+
n.type === "wmts" ? e.push({
|
|
100
|
+
type: "wmts",
|
|
101
|
+
identifier: n.options.identifier,
|
|
102
|
+
wmtsOptions: K.value,
|
|
103
|
+
zIndex: 0
|
|
104
|
+
}) : n.type === "wms" ? e.push({
|
|
105
|
+
type: "wms",
|
|
106
|
+
identifier: n.options.identifier,
|
|
107
|
+
wmsUrl: n.options.url,
|
|
108
|
+
layerName: n.options.layer,
|
|
109
|
+
zIndex: 0
|
|
110
|
+
}) : n.type === "vector" && e.push({
|
|
111
|
+
type: "vector",
|
|
112
|
+
identifier: n.options.identifier,
|
|
113
|
+
options: n.options,
|
|
114
|
+
style: n.options.style,
|
|
115
|
+
zIndex: 0
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
const o = Q.value.map((n, y) => ({
|
|
119
|
+
...n,
|
|
120
|
+
zIndex: y + 10
|
|
121
|
+
})), t = J.value.map((n, y) => ({
|
|
122
|
+
...n,
|
|
123
|
+
zIndex: o.length + y + 20
|
|
124
|
+
}));
|
|
125
|
+
return [...e, ...o, ...t];
|
|
126
|
+
}), E = () => {
|
|
127
|
+
h.value = !h.value;
|
|
128
|
+
}, ee = () => {
|
|
129
|
+
k.value = !k.value;
|
|
130
|
+
}, te = (e) => {
|
|
131
|
+
S.value.has(e) ? S.value.delete(e) : S.value.add(e);
|
|
132
|
+
}, oe = (e) => {
|
|
133
|
+
b.value = e;
|
|
134
|
+
}, ie = () => {
|
|
135
|
+
if (f.value?.view) {
|
|
136
|
+
const e = f.value.view, o = e.getZoom(), t = e.getMaxZoom();
|
|
137
|
+
typeof o == "number" && o < t && e.animate({ zoom: o + 1, duration: 250 });
|
|
138
|
+
}
|
|
139
|
+
}, ne = () => {
|
|
140
|
+
if (f.value?.view) {
|
|
141
|
+
const e = f.value.view, o = e.getZoom(), t = e.getMinZoom();
|
|
142
|
+
typeof o == "number" && o > t && e.animate({ zoom: o - 1, duration: 250 });
|
|
143
|
+
}
|
|
144
|
+
}, C = async (e, o, t) => {
|
|
145
|
+
try {
|
|
146
|
+
const y = await (await fetch(e)).text(), P = new ge().read(y), fe = t ? [t, "image/jpeg", "image/png"] : ["image/png", "image/jpeg"];
|
|
147
|
+
let I = null;
|
|
148
|
+
for (const N of fe)
|
|
149
|
+
try {
|
|
150
|
+
if (I = ve(P, {
|
|
151
|
+
layer: o,
|
|
152
|
+
matrixSet: "EPSG:28992",
|
|
153
|
+
projection: "EPSG:28992",
|
|
154
|
+
format: N,
|
|
155
|
+
crossOrigin: "anonymous",
|
|
156
|
+
style: "default"
|
|
157
|
+
}), I) break;
|
|
158
|
+
} catch (de) {
|
|
159
|
+
console.warn(`Format ${N} failed for layer ${o}:`, de);
|
|
160
|
+
}
|
|
161
|
+
return I && (I.style = "default"), I;
|
|
162
|
+
} catch (n) {
|
|
163
|
+
return console.error("Failed to fetch WMTS capabilities:", n), null;
|
|
164
|
+
}
|
|
165
|
+
}, re = (e) => {
|
|
166
|
+
if (!e || e.length === 0 || !f.value?.view) return;
|
|
167
|
+
const o = [];
|
|
168
|
+
for (const t of e)
|
|
169
|
+
if (t.type === "Point")
|
|
170
|
+
o.push(t.coordinates);
|
|
171
|
+
else if (t.type === "Polygon") {
|
|
172
|
+
const n = t.coordinates;
|
|
173
|
+
for (const y of n)
|
|
174
|
+
for (const P of y)
|
|
175
|
+
o.push(P);
|
|
176
|
+
}
|
|
177
|
+
if (o.length > 0) {
|
|
178
|
+
const t = be(o);
|
|
179
|
+
f.value.view.fit(t, {
|
|
180
|
+
padding: [50, 50, 50, 50]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
me(async () => {
|
|
185
|
+
if (!b.value && i.baseLayers && i.baseLayers.length > 0) {
|
|
186
|
+
const e = i.baseLayers[0];
|
|
187
|
+
e?.options.identifier && (b.value = e.options.identifier);
|
|
188
|
+
}
|
|
189
|
+
for (const e of i.layers.filter((o) => o.type === "wmts"))
|
|
190
|
+
if (e.options.url) {
|
|
191
|
+
const o = await C(
|
|
192
|
+
e.options.url,
|
|
193
|
+
e.options.identifier,
|
|
194
|
+
e.options.format
|
|
195
|
+
);
|
|
196
|
+
m.value.set(e.options.identifier, o);
|
|
197
|
+
}
|
|
198
|
+
if (i.baseLayers) {
|
|
199
|
+
for (const e of i.baseLayers.filter((o) => o.type === "wmts"))
|
|
200
|
+
if (e.options.url) {
|
|
201
|
+
const o = await C(
|
|
202
|
+
e.options.url,
|
|
203
|
+
e.options.identifier,
|
|
204
|
+
e.options.format
|
|
205
|
+
);
|
|
206
|
+
m.value.set(e.options.identifier, o);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (i.toggleableLayers) {
|
|
210
|
+
for (const e of i.toggleableLayers.filter(
|
|
211
|
+
(o) => o.type === "wmts"
|
|
212
|
+
))
|
|
213
|
+
if (e.options.url) {
|
|
214
|
+
const o = await C(
|
|
215
|
+
e.options.url,
|
|
216
|
+
e.options.identifier,
|
|
217
|
+
e.options.format
|
|
218
|
+
);
|
|
219
|
+
m.value.set(e.options.identifier, o);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
const se = v(() => {
|
|
224
|
+
if (!i.interactions?.selectable?.layers || i.interactions.selectable.layers.length === 0)
|
|
225
|
+
return;
|
|
226
|
+
const e = i.interactions.selectable.layers;
|
|
227
|
+
return (o, t) => {
|
|
228
|
+
if (!t) return !1;
|
|
229
|
+
const n = t.get("name");
|
|
230
|
+
return e.includes(n);
|
|
231
|
+
};
|
|
232
|
+
}), ae = v(() => H(i.interactions?.selectable?.style)), le = (e) => {
|
|
233
|
+
M("featureSelected", e);
|
|
234
|
+
}, ce = (e) => {
|
|
235
|
+
M("featureModified", { features: e.features.getArray() });
|
|
236
|
+
}, ue = (e) => {
|
|
237
|
+
M("featureDrawn", { feature: e.feature });
|
|
238
|
+
};
|
|
239
|
+
return U({ map: F, view: f, fitToFeatures: re }), (e, o) => (s(), L("div", Te, [
|
|
240
|
+
a(r(T).OlMap, {
|
|
241
|
+
ref_key: "mapRef",
|
|
242
|
+
ref: F,
|
|
243
|
+
style: { width: "100%", height: "100%" },
|
|
244
|
+
controls: []
|
|
245
|
+
}, {
|
|
246
|
+
default: d(() => [
|
|
247
|
+
a(r(T).OlProjectionRegister, {
|
|
248
|
+
projectionName: r(z).name,
|
|
249
|
+
projectionDef: r(z).def,
|
|
250
|
+
extent: r(z).extent
|
|
251
|
+
}, null, 8, ["projectionName", "projectionDef", "extent"]),
|
|
252
|
+
a(r(T).OlView, {
|
|
253
|
+
ref_key: "viewRef",
|
|
254
|
+
ref: f,
|
|
255
|
+
center: w.center,
|
|
256
|
+
zoom: w.zoom,
|
|
257
|
+
projection: r(z).name
|
|
258
|
+
}, null, 8, ["center", "zoom", "projection"]),
|
|
259
|
+
i.interactions?.selectable?.enabled ? (s(), l(r(_).OlInteractionSelect, {
|
|
260
|
+
key: 0,
|
|
261
|
+
multi: !1,
|
|
262
|
+
filter: se.value,
|
|
263
|
+
style: Z(ae.value),
|
|
264
|
+
onSelect: le
|
|
265
|
+
}, null, 8, ["filter", "style"])) : c("", !0),
|
|
266
|
+
(s(!0), L(x, null, D(X.value, (t) => (s(), L(x, {
|
|
267
|
+
key: t.identifier
|
|
268
|
+
}, [
|
|
269
|
+
t.type === "wms" ? (s(), l(r(B).OlTileLayer, {
|
|
270
|
+
key: 0,
|
|
271
|
+
zIndex: t.zIndex
|
|
272
|
+
}, {
|
|
273
|
+
default: d(() => [
|
|
274
|
+
a(r(j).OlSourceTileWMS, {
|
|
275
|
+
url: t.wmsUrl,
|
|
276
|
+
layers: t.layerName || "",
|
|
277
|
+
params: { LAYERS: t.layerName || "", TILED: !0 },
|
|
278
|
+
serverType: "geoserver",
|
|
279
|
+
crossOrigin: "anonymous"
|
|
280
|
+
}, null, 8, ["url", "layers", "params"])
|
|
281
|
+
]),
|
|
282
|
+
_: 2
|
|
283
|
+
}, 1032, ["zIndex"])) : t.type === "wmts" && (t.wmtsOptions || t.options) ? (s(), l(r(B).OlTileLayer, {
|
|
284
|
+
key: 1,
|
|
285
|
+
zIndex: t.zIndex
|
|
286
|
+
}, {
|
|
287
|
+
default: d(() => [
|
|
288
|
+
a(r(j).OlSourceWMTS, ye(
|
|
289
|
+
{ ref_for: !0 },
|
|
290
|
+
t.wmtsOptions || t.options,
|
|
291
|
+
{ styles: "default" }
|
|
292
|
+
), null, 16)
|
|
293
|
+
]),
|
|
294
|
+
_: 2
|
|
295
|
+
}, 1032, ["zIndex"])) : t.type === "vector" ? (s(), l(r(B).OlVectorLayer, {
|
|
296
|
+
key: 2,
|
|
297
|
+
zIndex: t.zIndex,
|
|
298
|
+
style: Z(t.style),
|
|
299
|
+
properties: { name: t.identifier },
|
|
300
|
+
ref_for: !0,
|
|
301
|
+
ref: (n) => {
|
|
302
|
+
n && (q.value[t.identifier] = n);
|
|
303
|
+
}
|
|
304
|
+
}, {
|
|
305
|
+
default: d(() => [
|
|
306
|
+
a(r(j).OlSourceVector, {
|
|
307
|
+
ref_for: !0,
|
|
308
|
+
ref: (n) => {
|
|
309
|
+
n && (p.value[t.identifier] = n);
|
|
310
|
+
}
|
|
311
|
+
}, {
|
|
312
|
+
default: d(() => [
|
|
313
|
+
(s(!0), L(x, null, D(t.options?.features, (n) => (s(), l(r(T).OlFeature, {
|
|
314
|
+
key: `${t.identifier}-${n.coordinates}`,
|
|
315
|
+
properties: n.properties || {}
|
|
316
|
+
}, {
|
|
317
|
+
default: d(() => [
|
|
318
|
+
n.type === "Point" ? (s(), l(r(R).OlGeomPoint, {
|
|
319
|
+
key: 0,
|
|
320
|
+
coordinates: n.coordinates
|
|
321
|
+
}, null, 8, ["coordinates"])) : c("", !0),
|
|
322
|
+
n.type === "Polygon" ? (s(), l(r(R).OlGeomPolygon, {
|
|
323
|
+
key: 1,
|
|
324
|
+
coordinates: n.coordinates
|
|
325
|
+
}, null, 8, ["coordinates"])) : c("", !0)
|
|
326
|
+
]),
|
|
327
|
+
_: 2
|
|
328
|
+
}, 1032, ["properties"]))), 128)),
|
|
329
|
+
i.interactions?.snap?.enabled && (i.interactions.draw?.enabled || i.interactions.modify?.enabled) && (i.interactions.draw?.layer === t.identifier || i.interactions.modify?.layer === t.identifier) && p.value[i.interactions.snap.targetLayer]?.source ? (s(), l(r(_).OlInteractionSnap, {
|
|
330
|
+
key: `snap-${i.interactions?.snap?.enabled}-${i.interactions?.draw?.enabled}-${i.interactions?.draw?.layer}-${i.interactions?.modify?.enabled}-${i.interactions?.modify?.layer}`,
|
|
331
|
+
source: p.value[i.interactions.snap.targetLayer]?.source,
|
|
332
|
+
pixelTolerance: i.interactions?.snap?.pixelTolerance || 8
|
|
333
|
+
}, null, 8, ["source", "pixelTolerance"])) : c("", !0),
|
|
334
|
+
i.interactions?.modify?.enabled && i.interactions.modify.layer === t.identifier && p.value[t.identifier]?.source ? (s(), l(r(_).OlInteractionModify, {
|
|
335
|
+
key: 1,
|
|
336
|
+
source: p.value[t.identifier]?.source,
|
|
337
|
+
onModifyend: ce
|
|
338
|
+
}, null, 8, ["source"])) : c("", !0),
|
|
339
|
+
i.interactions?.draw?.enabled && i.interactions.draw.layer === t.identifier && p.value[t.identifier]?.source ? (s(), l(r(_).OlInteractionDraw, {
|
|
340
|
+
key: 2,
|
|
341
|
+
source: p.value[t.identifier]?.source,
|
|
342
|
+
type: i.interactions.draw.type || "Point",
|
|
343
|
+
onDrawend: ue
|
|
344
|
+
}, null, 8, ["source", "type"])) : c("", !0)
|
|
345
|
+
]),
|
|
346
|
+
_: 2
|
|
347
|
+
}, 1536)
|
|
348
|
+
]),
|
|
349
|
+
_: 2
|
|
350
|
+
}, 1032, ["zIndex", "style", "properties"])) : c("", !0)
|
|
351
|
+
], 64))), 128))
|
|
352
|
+
]),
|
|
353
|
+
_: 1
|
|
354
|
+
}, 512),
|
|
355
|
+
g("div", _e, [
|
|
356
|
+
w.toggleableLayers && w.toggleableLayers.length > 0 ? (s(), L("div", ze, [
|
|
357
|
+
g("button", {
|
|
358
|
+
class: $(["iconbutton", { isActive: k.value }]),
|
|
359
|
+
"aria-label": "Toon lagen",
|
|
360
|
+
"aria-expanded": k.value,
|
|
361
|
+
onClick: ee
|
|
362
|
+
}, [
|
|
363
|
+
a(r(he))
|
|
364
|
+
], 10, Me),
|
|
365
|
+
a(V, { name: "fade" }, {
|
|
366
|
+
default: d(() => [
|
|
367
|
+
k.value ? (s(), l(Oe, {
|
|
368
|
+
key: 0,
|
|
369
|
+
toggleableLayers: w.toggleableLayers || [],
|
|
370
|
+
visibleToggleableLayers: S.value,
|
|
371
|
+
onToggleLayer: te
|
|
372
|
+
}, null, 8, ["toggleableLayers", "visibleToggleableLayers"])) : c("", !0)
|
|
373
|
+
]),
|
|
374
|
+
_: 1
|
|
375
|
+
})
|
|
376
|
+
])) : c("", !0)
|
|
377
|
+
]),
|
|
378
|
+
g("div", Ce, [
|
|
379
|
+
i.baseLayers && i.baseLayers.length > 0 ? (s(), L("div", Pe, [
|
|
380
|
+
g("button", {
|
|
381
|
+
class: $(["iconbutton", { isActive: h.value }]),
|
|
382
|
+
"aria-label": "Toon basislagen",
|
|
383
|
+
"aria-expanded": h.value,
|
|
384
|
+
onClick: E
|
|
385
|
+
}, [
|
|
386
|
+
a(r(Le))
|
|
387
|
+
], 10, xe),
|
|
388
|
+
a(V, { name: "fade" }, {
|
|
389
|
+
default: d(() => [
|
|
390
|
+
h.value ? (s(), l(Ie, {
|
|
391
|
+
key: 0,
|
|
392
|
+
baseLayers: i.baseLayers,
|
|
393
|
+
selectedBaseLayerId: b.value,
|
|
394
|
+
onSelectBaseLayer: oe
|
|
395
|
+
}, null, 8, ["baseLayers", "selectedBaseLayerId"])) : c("", !0)
|
|
396
|
+
]),
|
|
397
|
+
_: 1
|
|
398
|
+
})
|
|
399
|
+
])) : c("", !0),
|
|
400
|
+
g("div", Be, [
|
|
401
|
+
g("button", {
|
|
402
|
+
class: "iconbutton",
|
|
403
|
+
"aria-label": "Zoom in",
|
|
404
|
+
onClick: ie
|
|
405
|
+
}, [
|
|
406
|
+
a(r(ke))
|
|
407
|
+
]),
|
|
408
|
+
g("button", {
|
|
409
|
+
class: "iconbutton",
|
|
410
|
+
"aria-label": "Zoom out",
|
|
411
|
+
onClick: ne
|
|
412
|
+
}, [
|
|
413
|
+
a(r(Se))
|
|
414
|
+
])
|
|
415
|
+
])
|
|
416
|
+
])
|
|
417
|
+
]));
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
export {
|
|
421
|
+
qe as default
|
|
422
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent as u, computed as f, openBlock as o, createElementBlock as r, createElementVNode as t, Fragment as m, renderList as y, toDisplayString as L } from "vue";
|
|
2
|
+
const _ = { class: "wrapper" }, B = ["id", "checked", "onClick"], k = ["for"], b = { class: "layer" }, h = ["checked"], I = /* @__PURE__ */ u({
|
|
3
|
+
__name: "BaseLayers",
|
|
4
|
+
props: {
|
|
5
|
+
baseLayers: {},
|
|
6
|
+
selectedBaseLayerId: {}
|
|
7
|
+
},
|
|
8
|
+
emits: ["selectBaseLayer"],
|
|
9
|
+
setup(a, { emit: c }) {
|
|
10
|
+
const i = a, l = c, p = f(() => i.selectedBaseLayerId === null), d = (n) => {
|
|
11
|
+
if (!n) {
|
|
12
|
+
l("selectBaseLayer", null);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
i.selectedBaseLayerId !== n.options.identifier && l("selectBaseLayer", n.options.identifier);
|
|
16
|
+
};
|
|
17
|
+
return (n, s) => (o(), r("div", _, [
|
|
18
|
+
t("ul", null, [
|
|
19
|
+
(o(!0), r(m, null, y(a.baseLayers, (e) => (o(), r("li", {
|
|
20
|
+
key: e.options.identifier,
|
|
21
|
+
class: "layer"
|
|
22
|
+
}, [
|
|
23
|
+
t("input", {
|
|
24
|
+
id: e.options.identifier,
|
|
25
|
+
type: "radio",
|
|
26
|
+
name: "baseLayer",
|
|
27
|
+
checked: i.selectedBaseLayerId === e.options.identifier,
|
|
28
|
+
onClick: () => d(e)
|
|
29
|
+
}, null, 8, B),
|
|
30
|
+
t("label", {
|
|
31
|
+
for: e.options.identifier
|
|
32
|
+
}, L(e.options.title), 9, k)
|
|
33
|
+
]))), 128)),
|
|
34
|
+
t("li", b, [
|
|
35
|
+
t("input", {
|
|
36
|
+
id: "baseLayer_none",
|
|
37
|
+
type: "radio",
|
|
38
|
+
name: "baseLayer",
|
|
39
|
+
checked: p.value,
|
|
40
|
+
onClick: s[0] || (s[0] = () => d(null))
|
|
41
|
+
}, null, 8, h),
|
|
42
|
+
s[1] || (s[1] = t("label", { for: "baseLayer_none" }, "Geen", -1))
|
|
43
|
+
])
|
|
44
|
+
])
|
|
45
|
+
]));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
I as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as c, openBlock as t, createElementBlock as o, Fragment as g, renderList as d, createElementVNode as s, toDisplayString as h, createCommentVNode as y } from "vue";
|
|
2
|
+
const m = { class: "wrapper" }, p = { key: 0 }, _ = { class: "layer-control" }, u = ["checked", "onChange"], b = { class: "layer-title" }, v = /* @__PURE__ */ c({
|
|
3
|
+
__name: "Layers",
|
|
4
|
+
props: {
|
|
5
|
+
toggleableLayers: {},
|
|
6
|
+
visibleToggleableLayers: {}
|
|
7
|
+
},
|
|
8
|
+
emits: ["toggleLayer"],
|
|
9
|
+
setup(n, { emit: a }) {
|
|
10
|
+
const i = a, r = (l) => {
|
|
11
|
+
i("toggleLayer", l);
|
|
12
|
+
};
|
|
13
|
+
return (l, L) => (t(), o("div", m, [
|
|
14
|
+
n.toggleableLayers.length > 0 ? (t(), o("ul", p, [
|
|
15
|
+
(t(!0), o(g, null, d(n.toggleableLayers, (e) => (t(), o("li", {
|
|
16
|
+
key: "toggle-" + e.options.identifier,
|
|
17
|
+
class: "layer"
|
|
18
|
+
}, [
|
|
19
|
+
s("label", _, [
|
|
20
|
+
s("input", {
|
|
21
|
+
type: "checkbox",
|
|
22
|
+
checked: n.visibleToggleableLayers.has(e.options.identifier),
|
|
23
|
+
onChange: (k) => r(e.options.identifier),
|
|
24
|
+
class: "layer-checkbox"
|
|
25
|
+
}, null, 40, u),
|
|
26
|
+
s("span", b, h(e.options.title), 1)
|
|
27
|
+
])
|
|
28
|
+
]))), 128))
|
|
29
|
+
])) : y("", !0)
|
|
30
|
+
]));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
v as default
|
|
35
|
+
};
|