@delta10/atlas-sdk 0.1.12 → 0.2.1
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 +113 -36
- package/dist/components/Map.vue.d.ts +1 -0
- package/dist/components/Map.vue.js +2 -2
- package/dist/components/Map.vue2.js +332 -295
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,11 @@ const layers: LayerConfig[] = [
|
|
|
28
28
|
features: [
|
|
29
29
|
{
|
|
30
30
|
type: 'Point',
|
|
31
|
-
coordinates: [120000, 487000]
|
|
31
|
+
coordinates: [120000, 487000],
|
|
32
|
+
properties: {
|
|
33
|
+
id: '123482',
|
|
34
|
+
geplaatst: false
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
],
|
|
34
38
|
style: {
|
|
@@ -83,13 +87,17 @@ const onFeatureSelected = (event: any) => {
|
|
|
83
87
|
console.log('Features selected:', event.selected)
|
|
84
88
|
}
|
|
85
89
|
|
|
86
|
-
const onFeatureDrawn = (event: any) => {
|
|
87
|
-
console.log('Feature drawn:', event.feature)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
90
|
const onFeatureModified = (event: any) => {
|
|
91
91
|
console.log('Features modified:', event.features)
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
const onModifyCancelled = (event: any) => {
|
|
95
|
+
console.log('Modification cancelled:', event.features)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const onMapClicked = (event: any) => {
|
|
99
|
+
console.log('Map clicked:', event.coordinate, event.pixel)
|
|
100
|
+
}
|
|
93
101
|
</script>
|
|
94
102
|
|
|
95
103
|
<template>
|
|
@@ -101,8 +109,9 @@ const onFeatureModified = (event: any) => {
|
|
|
101
109
|
:baseLayers="baseLayers"
|
|
102
110
|
:interactions="interactions"
|
|
103
111
|
@featureSelected="onFeatureSelected"
|
|
104
|
-
@featureDrawn="onFeatureDrawn"
|
|
105
112
|
@featureModified="onFeatureModified"
|
|
113
|
+
@modifyCancelled="onModifyCancelled"
|
|
114
|
+
@mapClicked="onMapClicked"
|
|
106
115
|
/>
|
|
107
116
|
</div>
|
|
108
117
|
</template>
|
|
@@ -117,16 +126,16 @@ The `Map` component is the main component of the SDK, providing an interactive m
|
|
|
117
126
|
- **`layers`** `LayerConfig[]` - Array of regular layers to display
|
|
118
127
|
- **`baseLayers`** `LayerConfig[]` - Array of base layers (only one can be active)
|
|
119
128
|
- **`toggleableLayers`** `LayerConfig[]` - Array of toggleable layers (users can show/hide)
|
|
120
|
-
- **`interactions`** `InteractionsConfig` - Configuration for map interactions (select,
|
|
129
|
+
- **`interactions`** `InteractionsConfig` - Configuration for map interactions (select, modify, snap)
|
|
121
130
|
- **`zoom`** `number` (default: `10`) - Initial zoom level
|
|
122
131
|
- **`center`** `[number, number]` (default: `[120000, 487000]`) - Initial center coordinates
|
|
123
132
|
|
|
124
133
|
### Events
|
|
125
134
|
|
|
126
135
|
- **`@featureSelected`** - Emitted when features are selected. Payload: `{ selected: Feature[] }`
|
|
127
|
-
- **`@featureDrawn`** - Emitted when a new feature is drawn. Payload: `{ feature: Feature }`
|
|
128
136
|
- **`@featureModified`** - Emitted when features are modified. Payload: `{ features: Feature[] }`
|
|
129
|
-
- **`@
|
|
137
|
+
- **`@modifyCancelled`** - Emitted when a pending modification is cancelled. Payload: `{ features: Feature[] }`
|
|
138
|
+
- **`@mapClicked`** - Emitted when the map is clicked. Payload: `{ coordinate: [number, number]; pixel: [number, number] }`
|
|
130
139
|
|
|
131
140
|
### Methods
|
|
132
141
|
|
|
@@ -225,7 +234,11 @@ onMounted(() => {
|
|
|
225
234
|
features: [
|
|
226
235
|
{
|
|
227
236
|
type: 'Point',
|
|
228
|
-
coordinates: [120000, 487000]
|
|
237
|
+
coordinates: [120000, 487000],
|
|
238
|
+
properties: {
|
|
239
|
+
id: '123482',
|
|
240
|
+
geplaatst: false
|
|
241
|
+
}
|
|
229
242
|
}
|
|
230
243
|
],
|
|
231
244
|
style: {
|
|
@@ -303,13 +316,55 @@ This example checks if the `geplaatst` property equals `true`:
|
|
|
303
316
|
- If true: circle fill color is `blue`
|
|
304
317
|
- If false: circle fill color is `lightblue`
|
|
305
318
|
|
|
306
|
-
|
|
319
|
+
Supported expression operators:
|
|
320
|
+
- `'get'` - Read a feature property
|
|
321
|
+
- `'case'` - Choose a value based on conditions
|
|
307
322
|
- `'=='` - Equal to
|
|
308
|
-
- `'
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
323
|
+
- `'coalesce'` - Use the first non-null value
|
|
324
|
+
|
|
325
|
+
### OpenLayers Style Functions
|
|
326
|
+
|
|
327
|
+
For more control, vector layers can also use an OpenLayers style function. This is useful for resolution-dependent styling, feature labels, or logic that is easier to express in TypeScript:
|
|
328
|
+
|
|
329
|
+
```typescript
|
|
330
|
+
import { Style, Stroke, Fill, Circle as CircleStyle, Text } from 'ol/style'
|
|
331
|
+
|
|
332
|
+
{
|
|
333
|
+
type: 'vector',
|
|
334
|
+
options: {
|
|
335
|
+
identifier: 'meetbouten',
|
|
336
|
+
title: 'Meetbouten',
|
|
337
|
+
features: meetboutenFeatures,
|
|
338
|
+
styleFunction: (feature, _currentStyle, resolution) => {
|
|
339
|
+
if (resolution > 0.2) {
|
|
340
|
+
return []
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const properties = feature.getProperties()
|
|
344
|
+
const isGeplaatst = properties.geplaatst === true
|
|
345
|
+
const featureId = properties.id || ''
|
|
346
|
+
|
|
347
|
+
return [new Style({
|
|
348
|
+
image: new CircleStyle({
|
|
349
|
+
radius: 20,
|
|
350
|
+
fill: new Fill({ color: 'white' }),
|
|
351
|
+
stroke: new Stroke({
|
|
352
|
+
color: isGeplaatst ? 'green' : 'red',
|
|
353
|
+
width: 2
|
|
354
|
+
})
|
|
355
|
+
}),
|
|
356
|
+
text: featureId ? new Text({
|
|
357
|
+
text: String(featureId),
|
|
358
|
+
fill: new Fill({ color: '#000' }),
|
|
359
|
+
stroke: new Stroke({ color: '#fff', width: 2 })
|
|
360
|
+
}) : undefined
|
|
361
|
+
})]
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Returning an empty array hides the feature for that render pass.
|
|
313
368
|
|
|
314
369
|
## Interactions Configuration
|
|
315
370
|
|
|
@@ -330,31 +385,22 @@ Allow users to select features from specific layers:
|
|
|
330
385
|
}
|
|
331
386
|
```
|
|
332
387
|
|
|
333
|
-
### Draw Interaction
|
|
334
|
-
Allow users to draw new geometries:
|
|
335
|
-
```typescript
|
|
336
|
-
{
|
|
337
|
-
draw: {
|
|
338
|
-
enabled: true,
|
|
339
|
-
layer: 'meetbouten',
|
|
340
|
-
type: 'Point' // 'Point' | 'LineString' | 'Polygon'
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
```
|
|
344
|
-
|
|
345
388
|
### Modify Interaction
|
|
346
389
|
Allow users to edit existing geometries:
|
|
347
390
|
```typescript
|
|
348
391
|
{
|
|
349
392
|
modify: {
|
|
350
393
|
enabled: true,
|
|
351
|
-
layer: 'meetbouten'
|
|
394
|
+
layer: 'meetbouten',
|
|
395
|
+
labelProperty: 'meetboutnummer' // Optional: feature property shown in the confirm/cancel overlay
|
|
352
396
|
}
|
|
353
397
|
}
|
|
354
398
|
```
|
|
355
399
|
|
|
400
|
+
The `labelProperty` value is read from the selected feature's `properties`. For example, if a feature has `properties: { id: '123482' }`, use `labelProperty: 'id'` to show that value in the confirmation overlay.
|
|
401
|
+
|
|
356
402
|
### Snap Interaction
|
|
357
|
-
Snap
|
|
403
|
+
Snap modified features to existing features:
|
|
358
404
|
```typescript
|
|
359
405
|
{
|
|
360
406
|
snap: {
|
|
@@ -382,14 +428,10 @@ const interactions: InteractionsConfig = {
|
|
|
382
428
|
'circle-stroke-width': 2
|
|
383
429
|
}
|
|
384
430
|
},
|
|
385
|
-
draw: {
|
|
386
|
-
enabled: true,
|
|
387
|
-
layer: 'meetbouten',
|
|
388
|
-
type: 'Point'
|
|
389
|
-
},
|
|
390
431
|
modify: {
|
|
391
432
|
enabled: true,
|
|
392
|
-
layer: 'meetbouten'
|
|
433
|
+
layer: 'meetbouten',
|
|
434
|
+
labelProperty: 'meetboutnummer'
|
|
393
435
|
},
|
|
394
436
|
snap: {
|
|
395
437
|
enabled: true,
|
|
@@ -398,6 +440,41 @@ const interactions: InteractionsConfig = {
|
|
|
398
440
|
}
|
|
399
441
|
```
|
|
400
442
|
|
|
443
|
+
## Reactive Data
|
|
444
|
+
|
|
445
|
+
Layer configuration can be reactive. Use `computed` when feature arrays are loaded or replaced after mount:
|
|
446
|
+
|
|
447
|
+
```typescript
|
|
448
|
+
const pandenFeatures = ref<any[]>([])
|
|
449
|
+
const meetboutenFeatures = ref<any[]>([])
|
|
450
|
+
|
|
451
|
+
const layers = computed<LayerConfig[]>(() => [
|
|
452
|
+
{
|
|
453
|
+
type: 'vector',
|
|
454
|
+
options: {
|
|
455
|
+
identifier: 'panden',
|
|
456
|
+
title: 'Panden',
|
|
457
|
+
features: pandenFeatures.value
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
type: 'vector',
|
|
462
|
+
options: {
|
|
463
|
+
identifier: 'meetbouten',
|
|
464
|
+
title: 'Meetbouten',
|
|
465
|
+
features: meetboutenFeatures.value
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
])
|
|
469
|
+
|
|
470
|
+
onMounted(() => {
|
|
471
|
+
pandenFeatures.value = loadedPandenFeatures
|
|
472
|
+
meetboutenFeatures.value = loadedMeetboutenFeatures
|
|
473
|
+
|
|
474
|
+
mapRef.value?.fitToFeatures(loadedPandenFeatures)
|
|
475
|
+
})
|
|
476
|
+
```
|
|
477
|
+
|
|
401
478
|
## Development
|
|
402
479
|
|
|
403
480
|
### Install dependencies
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Map.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-00ea6e03"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,31 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { OlMap as
|
|
3
|
-
import { OlTileLayer as
|
|
4
|
-
import {
|
|
5
|
-
import { OlGeomPoint as
|
|
6
|
-
import { OlStyle as
|
|
7
|
-
import { OlInteractionSelect as
|
|
8
|
-
import { epsg28992 as
|
|
9
|
-
import { optionsFromCapabilities as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { defineComponent as Oe, ref as c, shallowRef as ie, computed as b, onMounted as ze, openBlock as l, createElementBlock as L, createVNode as g, unref as r, withCtx as k, createBlock as f, normalizeStyle as xe, createCommentVNode as d, Fragment as K, renderList as se, createElementVNode as m, toDisplayString as Pe, normalizeClass as re, Transition as le } from "vue";
|
|
2
|
+
import { OlMap as Be, OlProjectionRegister as Ae, OlView as We, OlFeature as je, OlOverlay as Re } from "vue3-openlayers/map";
|
|
3
|
+
import { OlTileLayer as ae, OlVectorLayer as Ve } from "vue3-openlayers/layers";
|
|
4
|
+
import { OlSourceVector as Ze } from "vue3-openlayers/sources";
|
|
5
|
+
import { OlGeomPoint as $e, OlGeomPolygon as Ge } from "vue3-openlayers/geometries";
|
|
6
|
+
import { OlStyle as Ne } from "vue3-openlayers/styles";
|
|
7
|
+
import { OlInteractionSelect as De, OlInteractionModify as Ue, OlInteractionSnap as Ke } from "vue3-openlayers/interactions";
|
|
8
|
+
import { epsg28992 as j } from "../utils/projections.js";
|
|
9
|
+
import Ye, { optionsFromCapabilities as qe } from "ol/source/WMTS";
|
|
10
|
+
import He from "ol/format/WMTSCapabilities";
|
|
11
|
+
import Je from "ol/source/TileWMS";
|
|
12
|
+
import { Style as Y, Fill as q, Stroke as H, Circle as Qe, Text as Xe } from "ol/style";
|
|
13
|
+
import { boundingExtent as Ee } from "ol/extent";
|
|
14
|
+
import { unByKey as et } from "ol/Observable";
|
|
15
|
+
import { Collection as tt } from "ol";
|
|
15
16
|
import "ol/geom";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
const
|
|
17
|
+
import ot from "../assets/icons/map.svg.js";
|
|
18
|
+
import nt from "../assets/icons/layers.svg.js";
|
|
19
|
+
import it from "../assets/icons/plus.svg.js";
|
|
20
|
+
import st from "../assets/icons/minus.svg.js";
|
|
21
|
+
import rt from "./panels/BaseLayers.vue.js";
|
|
22
|
+
import lt from "./panels/Layers.vue.js";
|
|
23
|
+
const at = { class: "map-container" }, ct = { class: "modify-overlay" }, ut = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "modify-overlay-label"
|
|
26
|
+
}, ft = { class: "bottom-left-panels" }, dt = {
|
|
23
27
|
key: 0,
|
|
24
28
|
class: "layers-control"
|
|
25
|
-
},
|
|
29
|
+
}, pt = ["aria-expanded"], mt = { class: "bottom-right-panels" }, yt = {
|
|
26
30
|
key: 0,
|
|
27
31
|
class: "base-layers-control"
|
|
28
|
-
},
|
|
32
|
+
}, vt = ["aria-expanded"], gt = { class: "zoom-panel" }, Zt = /* @__PURE__ */ Oe({
|
|
29
33
|
__name: "Map",
|
|
30
34
|
props: {
|
|
31
35
|
layers: { default: () => [] },
|
|
@@ -36,74 +40,104 @@ const Ee = { class: "map-container" }, et = { class: "bottom-left-panels" }, tt
|
|
|
36
40
|
center: { default: () => [12e4, 487e3] }
|
|
37
41
|
},
|
|
38
42
|
emits: ["featureSelected", "featureDeselected", "featureModified", "mapClicked", "modifyCancelled"],
|
|
39
|
-
setup(
|
|
40
|
-
const i =
|
|
43
|
+
setup(S, { expose: ce, emit: ue }) {
|
|
44
|
+
const i = S, x = ue, P = c(), w = c(), J = c(), fe = c({}), R = c({}), F = c(!1), I = c(!1), _ = c(null), O = c(/* @__PURE__ */ new Set()), V = c(!1), z = c(null), h = c(null), M = c(null), B = c(null), A = c(null), C = ie(new tt([])), Z = b(() => C.value), Q = b(() => {
|
|
45
|
+
const e = i.interactions?.modify?.labelProperty;
|
|
46
|
+
if (!e || !M.value) return "";
|
|
47
|
+
const t = M.value.get?.(e);
|
|
48
|
+
return t == null ? "" : String(t);
|
|
49
|
+
}), T = ie(
|
|
41
50
|
new globalThis.Map()
|
|
42
|
-
),
|
|
51
|
+
), X = new globalThis.Map(), E = /* @__PURE__ */ new WeakMap(), $ = (e, t) => {
|
|
52
|
+
if (!e || !t) return null;
|
|
53
|
+
const o = `${e}|${t}`, n = X.get(o);
|
|
54
|
+
if (n) return n;
|
|
55
|
+
const s = new Je({
|
|
56
|
+
url: e,
|
|
57
|
+
params: { LAYERS: t, TILED: !0 },
|
|
58
|
+
serverType: "geoserver",
|
|
59
|
+
crossOrigin: "anonymous"
|
|
60
|
+
});
|
|
61
|
+
return X.set(o, s), s;
|
|
62
|
+
}, G = (e) => {
|
|
63
|
+
if (!e) return null;
|
|
64
|
+
const t = E.get(e);
|
|
65
|
+
if (t) return t;
|
|
66
|
+
const o = new Ye({
|
|
67
|
+
...e,
|
|
68
|
+
style: e.style || "default"
|
|
69
|
+
});
|
|
70
|
+
return E.set(e, o), o;
|
|
71
|
+
}, N = (e, t) => {
|
|
72
|
+
const o = new globalThis.Map(T.value);
|
|
73
|
+
o.set(e, t), T.value = o;
|
|
74
|
+
}, ee = (e, t, o, n) => {
|
|
43
75
|
if (!e) return;
|
|
44
|
-
if (e instanceof
|
|
76
|
+
if (e instanceof Y || typeof e == "function")
|
|
45
77
|
return e;
|
|
46
|
-
const
|
|
47
|
-
if (Array.isArray(
|
|
48
|
-
const [y, ...u] =
|
|
78
|
+
const s = {}, a = (p) => {
|
|
79
|
+
if (Array.isArray(p)) {
|
|
80
|
+
const [y, ...u] = p;
|
|
49
81
|
switch (y) {
|
|
50
82
|
case "get":
|
|
51
|
-
return
|
|
83
|
+
return t?.getProperties()?.[u[0]] ?? null;
|
|
52
84
|
case "case":
|
|
53
85
|
for (let v = 0; v < u.length - 1; v += 2)
|
|
54
|
-
if (
|
|
55
|
-
return
|
|
56
|
-
return
|
|
86
|
+
if (a(u[v]))
|
|
87
|
+
return a(u[v + 1]);
|
|
88
|
+
return a(u[u.length - 1]);
|
|
57
89
|
case "==":
|
|
58
|
-
return
|
|
90
|
+
return a(u[0]) === a(u[1]);
|
|
59
91
|
case "coalesce":
|
|
60
92
|
for (const v of u) {
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
93
|
+
const U = a(v);
|
|
94
|
+
if (U != null) return U;
|
|
63
95
|
}
|
|
64
96
|
return null;
|
|
65
97
|
default:
|
|
66
|
-
return
|
|
98
|
+
return p;
|
|
67
99
|
}
|
|
68
100
|
}
|
|
69
|
-
return
|
|
101
|
+
return p;
|
|
70
102
|
};
|
|
71
|
-
if (e["fill-color"] && (
|
|
72
|
-
color:
|
|
73
|
-
width:
|
|
103
|
+
if (e["fill-color"] && (s.fill = new q({ color: a(e["fill-color"]) })), (e["stroke-color"] || e["stroke-width"]) && (s.stroke = new H({
|
|
104
|
+
color: a(e["stroke-color"]) || "#3399CC",
|
|
105
|
+
width: a(e["stroke-width"]) || 1.25
|
|
74
106
|
})), e["circle-radius"] || e["circle-fill-color"] || e["circle-stroke-color"]) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
radius:
|
|
78
|
-
fill: y ? new
|
|
79
|
-
stroke: new
|
|
107
|
+
const p = a(e["circle-radius"]) || 5, y = a(e["circle-fill-color"]), u = a(e["circle-stroke-color"]) || "#3399CC", v = a(e["circle-stroke-width"]) || 1.25;
|
|
108
|
+
s.image = new Qe({
|
|
109
|
+
radius: p,
|
|
110
|
+
fill: y ? new q({ color: y }) : void 0,
|
|
111
|
+
stroke: new H({ color: u, width: v })
|
|
80
112
|
});
|
|
81
113
|
}
|
|
82
114
|
if (e["text-value"]) {
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
text: String(
|
|
86
|
-
fill: new
|
|
87
|
-
stroke: new
|
|
115
|
+
const p = a(e["text-value"]);
|
|
116
|
+
p && (s.text = new Xe({
|
|
117
|
+
text: String(p),
|
|
118
|
+
fill: new q({ color: "#000" }),
|
|
119
|
+
stroke: new H({ color: "#fff", width: 2 })
|
|
88
120
|
}));
|
|
89
121
|
}
|
|
90
|
-
return new
|
|
91
|
-
},
|
|
92
|
-
const
|
|
93
|
-
return
|
|
94
|
-
},
|
|
122
|
+
return new Y(s);
|
|
123
|
+
}, de = (e) => typeof e == "function" ? e : e instanceof Y ? (t, o, n) => [e] : (t, o, n) => {
|
|
124
|
+
const s = ee(e, t);
|
|
125
|
+
return s ? [s] : void 0;
|
|
126
|
+
}, pe = b(() => i.layers.map((e) => {
|
|
95
127
|
if (e.type === "wmts") {
|
|
96
|
-
const
|
|
128
|
+
const t = T.value.get(e.options.identifier);
|
|
97
129
|
return {
|
|
98
130
|
type: "wmts",
|
|
99
131
|
identifier: e.options.identifier,
|
|
100
|
-
options:
|
|
132
|
+
options: t || null,
|
|
133
|
+
source: G(t)
|
|
101
134
|
};
|
|
102
135
|
} else return e.type === "wms" ? {
|
|
103
136
|
type: "wms",
|
|
104
137
|
identifier: e.options.identifier,
|
|
105
138
|
wmsUrl: e.options.url,
|
|
106
|
-
layerName: e.options.layer
|
|
139
|
+
layerName: e.options.layer,
|
|
140
|
+
source: $(e.options.url, e.options.layer)
|
|
107
141
|
} : {
|
|
108
142
|
type: "vector",
|
|
109
143
|
identifier: e.options.identifier,
|
|
@@ -111,47 +145,60 @@ const Ee = { class: "map-container" }, et = { class: "bottom-left-panels" }, tt
|
|
|
111
145
|
style: e.options.style,
|
|
112
146
|
styleFunction: e.options.styleFunction
|
|
113
147
|
};
|
|
114
|
-
})),
|
|
115
|
-
if (!
|
|
148
|
+
})), W = b(() => {
|
|
149
|
+
if (!_.value || !i.baseLayers)
|
|
116
150
|
return null;
|
|
117
151
|
const e = i.baseLayers.find(
|
|
118
|
-
(
|
|
152
|
+
(t) => t.options.identifier === _.value
|
|
119
153
|
);
|
|
120
|
-
return !e || e.type === "wmts" && !
|
|
121
|
-
}),
|
|
122
|
-
(e) =>
|
|
123
|
-
).map((e) =>
|
|
124
|
-
type
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
154
|
+
return !e || e.type === "wmts" && !T.value.get(e.options.identifier) ? null : e;
|
|
155
|
+
}), te = b(() => W.value && T.value.get(W.value.options.identifier) || null), me = b(() => (i.toggleableLayers || []).filter(
|
|
156
|
+
(e) => O.value.has(e.options.identifier)
|
|
157
|
+
).map((e) => {
|
|
158
|
+
if (e.type === "wms")
|
|
159
|
+
return {
|
|
160
|
+
type: "wms",
|
|
161
|
+
identifier: e.options.identifier,
|
|
162
|
+
wmsUrl: e.options.url,
|
|
163
|
+
layerName: e.options.layer,
|
|
164
|
+
source: $(e.options.url, e.options.layer)
|
|
165
|
+
};
|
|
166
|
+
if (e.type === "wmts") {
|
|
167
|
+
const t = T.value.get(e.options.identifier);
|
|
168
|
+
return {
|
|
169
|
+
type: "wmts",
|
|
170
|
+
identifier: e.options.identifier,
|
|
171
|
+
wmtsOptions: t,
|
|
172
|
+
source: G(t)
|
|
173
|
+
};
|
|
174
|
+
} else if (e.type === "vector")
|
|
175
|
+
return {
|
|
176
|
+
type: "vector",
|
|
177
|
+
identifier: e.options.identifier,
|
|
178
|
+
options: e.options,
|
|
179
|
+
style: e.options.style,
|
|
180
|
+
styleFunction: e.options.styleFunction
|
|
181
|
+
};
|
|
182
|
+
return {
|
|
183
|
+
...e,
|
|
184
|
+
identifier: e.options.identifier
|
|
185
|
+
};
|
|
186
|
+
})), ye = b(() => {
|
|
142
187
|
const e = [];
|
|
143
|
-
if (
|
|
144
|
-
const n =
|
|
188
|
+
if (W.value) {
|
|
189
|
+
const n = W.value;
|
|
145
190
|
n.type === "wmts" ? e.push({
|
|
146
191
|
type: "wmts",
|
|
147
192
|
identifier: n.options.identifier,
|
|
148
|
-
wmtsOptions:
|
|
193
|
+
wmtsOptions: te.value,
|
|
194
|
+
source: G(te.value),
|
|
149
195
|
zIndex: 0
|
|
150
196
|
}) : n.type === "wms" ? e.push({
|
|
151
197
|
type: "wms",
|
|
152
198
|
identifier: n.options.identifier,
|
|
153
199
|
wmsUrl: n.options.url,
|
|
154
200
|
layerName: n.options.layer,
|
|
201
|
+
source: $(n.options.url, n.options.layer),
|
|
155
202
|
zIndex: 0
|
|
156
203
|
}) : n.type === "vector" && e.push({
|
|
157
204
|
type: "vector",
|
|
@@ -162,40 +209,40 @@ const Ee = { class: "map-container" }, et = { class: "bottom-left-panels" }, tt
|
|
|
162
209
|
zIndex: 0
|
|
163
210
|
});
|
|
164
211
|
}
|
|
165
|
-
const
|
|
212
|
+
const t = me.value.map((n, s) => ({
|
|
166
213
|
...n,
|
|
167
|
-
zIndex:
|
|
168
|
-
})),
|
|
214
|
+
zIndex: s + 10
|
|
215
|
+
})), o = pe.value.map((n, s) => ({
|
|
169
216
|
...n,
|
|
170
|
-
zIndex:
|
|
217
|
+
zIndex: t.length + s + 20
|
|
171
218
|
}));
|
|
172
|
-
return [...e, ...
|
|
173
|
-
}),
|
|
219
|
+
return [...e, ...t, ...o];
|
|
220
|
+
}), ve = () => {
|
|
221
|
+
F.value = !F.value;
|
|
222
|
+
}, ge = () => {
|
|
174
223
|
I.value = !I.value;
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
},
|
|
180
|
-
O.value = e;
|
|
181
|
-
}, fe = () => {
|
|
224
|
+
}, be = (e) => {
|
|
225
|
+
O.value.has(e) ? O.value.delete(e) : O.value.add(e);
|
|
226
|
+
}, we = (e) => {
|
|
227
|
+
_.value = e;
|
|
228
|
+
}, he = () => {
|
|
182
229
|
if (w.value?.view) {
|
|
183
|
-
const e = w.value.view,
|
|
184
|
-
typeof
|
|
230
|
+
const e = w.value.view, t = e.getZoom(), o = e.getMaxZoom();
|
|
231
|
+
typeof t == "number" && t < o && e.animate({ zoom: t + 1, duration: 250 });
|
|
185
232
|
}
|
|
186
|
-
},
|
|
233
|
+
}, Le = () => {
|
|
187
234
|
if (w.value?.view) {
|
|
188
|
-
const e = w.value.view,
|
|
189
|
-
typeof
|
|
235
|
+
const e = w.value.view, t = e.getZoom(), o = e.getMinZoom();
|
|
236
|
+
typeof t == "number" && t > o && e.animate({ zoom: t - 1, duration: 250 });
|
|
190
237
|
}
|
|
191
|
-
},
|
|
238
|
+
}, D = async (e, t, o) => {
|
|
192
239
|
try {
|
|
193
|
-
const
|
|
240
|
+
const s = await (await fetch(e)).text(), a = new He().read(s), p = o ? [o, "image/jpeg", "image/png"] : ["image/png", "image/jpeg"];
|
|
194
241
|
let y = null;
|
|
195
|
-
for (const u of
|
|
242
|
+
for (const u of p)
|
|
196
243
|
try {
|
|
197
|
-
if (y =
|
|
198
|
-
layer:
|
|
244
|
+
if (y = qe(a, {
|
|
245
|
+
layer: t,
|
|
199
246
|
matrixSet: "EPSG:28992",
|
|
200
247
|
projection: "EPSG:28992",
|
|
201
248
|
format: u,
|
|
@@ -203,314 +250,304 @@ const Ee = { class: "map-container" }, et = { class: "bottom-left-panels" }, tt
|
|
|
203
250
|
style: "default"
|
|
204
251
|
}), y) break;
|
|
205
252
|
} catch (v) {
|
|
206
|
-
console.warn(`Format ${u} failed for layer ${
|
|
253
|
+
console.warn(`Format ${u} failed for layer ${t}:`, v);
|
|
207
254
|
}
|
|
208
255
|
return y && (y.style = "default"), y;
|
|
209
256
|
} catch (n) {
|
|
210
257
|
return console.error("Failed to fetch WMTS capabilities:", n), null;
|
|
211
258
|
}
|
|
212
|
-
},
|
|
259
|
+
}, ke = (e) => {
|
|
213
260
|
if (!e || e.length === 0 || !w.value?.view) return;
|
|
214
|
-
const
|
|
215
|
-
for (const
|
|
216
|
-
if (
|
|
217
|
-
|
|
218
|
-
else if (
|
|
219
|
-
const n =
|
|
220
|
-
for (const
|
|
221
|
-
for (const
|
|
222
|
-
|
|
261
|
+
const t = [];
|
|
262
|
+
for (const o of e)
|
|
263
|
+
if (o.type === "Point")
|
|
264
|
+
t.push(o.coordinates);
|
|
265
|
+
else if (o.type === "Polygon") {
|
|
266
|
+
const n = o.coordinates;
|
|
267
|
+
for (const s of n)
|
|
268
|
+
for (const a of s)
|
|
269
|
+
t.push(a);
|
|
223
270
|
}
|
|
224
|
-
if (
|
|
225
|
-
const
|
|
226
|
-
w.value.view.fit(
|
|
271
|
+
if (t.length > 0) {
|
|
272
|
+
const o = Ee(t);
|
|
273
|
+
w.value.view.fit(o, {
|
|
227
274
|
padding: [50, 50, 50, 50]
|
|
228
275
|
});
|
|
229
276
|
}
|
|
230
277
|
};
|
|
231
|
-
|
|
232
|
-
if (
|
|
278
|
+
ze(async () => {
|
|
279
|
+
if (!_.value && i.baseLayers && i.baseLayers.length > 0) {
|
|
233
280
|
const e = i.baseLayers[0];
|
|
234
|
-
e?.options.identifier && (
|
|
281
|
+
e?.options.identifier && (_.value = e.options.identifier);
|
|
235
282
|
}
|
|
236
|
-
await new Promise((e) => setTimeout(e, 100)),
|
|
237
|
-
|
|
283
|
+
await new Promise((e) => setTimeout(e, 100)), P.value?.map && P.value.map.on("singleclick", (e) => {
|
|
284
|
+
x("mapClicked", {
|
|
238
285
|
coordinate: e.coordinate,
|
|
239
286
|
pixel: e.pixel
|
|
240
287
|
});
|
|
241
288
|
});
|
|
242
|
-
for (const e of i.layers.filter((
|
|
289
|
+
for (const e of i.layers.filter((t) => t.type === "wmts"))
|
|
243
290
|
if (e.options.url) {
|
|
244
|
-
const
|
|
291
|
+
const t = await D(
|
|
245
292
|
e.options.url,
|
|
246
293
|
e.options.identifier,
|
|
247
294
|
e.options.format
|
|
248
295
|
);
|
|
249
|
-
|
|
296
|
+
N(e.options.identifier, t);
|
|
250
297
|
}
|
|
251
298
|
if (i.baseLayers) {
|
|
252
|
-
for (const e of i.baseLayers.filter((
|
|
299
|
+
for (const e of i.baseLayers.filter((t) => t.type === "wmts"))
|
|
253
300
|
if (e.options.url) {
|
|
254
|
-
const
|
|
301
|
+
const t = await D(
|
|
255
302
|
e.options.url,
|
|
256
303
|
e.options.identifier,
|
|
257
304
|
e.options.format
|
|
258
305
|
);
|
|
259
|
-
|
|
306
|
+
N(e.options.identifier, t);
|
|
260
307
|
}
|
|
261
308
|
}
|
|
262
309
|
if (i.toggleableLayers) {
|
|
263
310
|
for (const e of i.toggleableLayers.filter(
|
|
264
|
-
(
|
|
311
|
+
(t) => t.type === "wmts"
|
|
265
312
|
))
|
|
266
313
|
if (e.options.url) {
|
|
267
|
-
const
|
|
314
|
+
const t = await D(
|
|
268
315
|
e.options.url,
|
|
269
316
|
e.options.identifier,
|
|
270
317
|
e.options.format
|
|
271
318
|
);
|
|
272
|
-
|
|
319
|
+
N(e.options.identifier, t);
|
|
273
320
|
}
|
|
274
321
|
}
|
|
275
322
|
});
|
|
276
|
-
const
|
|
323
|
+
const Se = b(() => {
|
|
277
324
|
if (!i.interactions?.selectable?.layers || i.interactions.selectable.layers.length === 0)
|
|
278
325
|
return;
|
|
279
326
|
const e = i.interactions.selectable.layers;
|
|
280
|
-
return (
|
|
281
|
-
if (!
|
|
282
|
-
const n =
|
|
327
|
+
return (t, o) => {
|
|
328
|
+
if (!o) return !1;
|
|
329
|
+
const n = o.get("name");
|
|
283
330
|
return e.includes(n);
|
|
284
331
|
};
|
|
285
|
-
}),
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
if (
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
const n =
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
|
|
332
|
+
}), _e = b(() => ee(i.interactions?.selectable?.style, void 0)), Me = (e) => {
|
|
333
|
+
C.value && (C.value.clear(), e.selected && e.selected.length > 0 && C.value.push(e.selected[0])), x("featureSelected", e);
|
|
334
|
+
}, Ce = (e) => {
|
|
335
|
+
h.value = e;
|
|
336
|
+
const t = e.features.getArray()[0];
|
|
337
|
+
if (M.value = t || null, t) {
|
|
338
|
+
const o = t.getGeometry();
|
|
339
|
+
B.value = o.clone();
|
|
340
|
+
const n = o.getCoordinates();
|
|
341
|
+
z.value = n, V.value = !0, A.value = o.on("change", () => {
|
|
342
|
+
const s = o.getCoordinates();
|
|
343
|
+
z.value = s;
|
|
297
344
|
});
|
|
298
345
|
}
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
346
|
+
}, Te = (e) => {
|
|
347
|
+
h.value = e, M.value = e.features.getArray()[0] || M.value;
|
|
348
|
+
}, oe = () => {
|
|
349
|
+
C.value && C.value.clear();
|
|
350
|
+
const e = J.value?.select;
|
|
351
|
+
(e?.value || e)?.getFeatures?.().clear();
|
|
352
|
+
}, Fe = () => {
|
|
353
|
+
if (h.value) {
|
|
354
|
+
const e = h.value.features.getArray();
|
|
355
|
+
x("featureModified", { features: e });
|
|
305
356
|
}
|
|
306
|
-
|
|
307
|
-
},
|
|
308
|
-
if (
|
|
309
|
-
const e =
|
|
310
|
-
e && e.setGeometry(
|
|
311
|
-
const
|
|
312
|
-
|
|
357
|
+
oe(), ne();
|
|
358
|
+
}, Ie = () => {
|
|
359
|
+
if (h.value && B.value) {
|
|
360
|
+
const e = h.value.features.getArray()[0];
|
|
361
|
+
e && e.setGeometry(B.value);
|
|
362
|
+
const t = h.value.features.getArray();
|
|
363
|
+
x("modifyCancelled", { features: t });
|
|
313
364
|
}
|
|
314
|
-
|
|
315
|
-
},
|
|
316
|
-
|
|
365
|
+
oe(), ne();
|
|
366
|
+
}, ne = () => {
|
|
367
|
+
V.value = !1, z.value = null, h.value = null, M.value = null, B.value = null, A.value && (et(A.value), A.value = null);
|
|
317
368
|
};
|
|
318
|
-
return
|
|
319
|
-
|
|
369
|
+
return ce({ map: P, view: w, fitToFeatures: ke }), (e, t) => (l(), L("div", at, [
|
|
370
|
+
g(r(Be), {
|
|
320
371
|
ref_key: "mapRef",
|
|
321
|
-
ref:
|
|
372
|
+
ref: P,
|
|
322
373
|
style: { width: "100%", height: "100%" },
|
|
323
374
|
controls: []
|
|
324
375
|
}, {
|
|
325
|
-
default:
|
|
326
|
-
|
|
327
|
-
projectionName:
|
|
328
|
-
projectionDef:
|
|
329
|
-
extent:
|
|
376
|
+
default: k(() => [
|
|
377
|
+
g(r(Ae), {
|
|
378
|
+
projectionName: r(j).name,
|
|
379
|
+
projectionDef: r(j).def,
|
|
380
|
+
extent: r(j).extent
|
|
330
381
|
}, null, 8, ["projectionName", "projectionDef", "extent"]),
|
|
331
|
-
|
|
382
|
+
g(r(We), {
|
|
332
383
|
ref_key: "viewRef",
|
|
333
384
|
ref: w,
|
|
334
|
-
center:
|
|
335
|
-
zoom:
|
|
336
|
-
projection:
|
|
385
|
+
center: S.center,
|
|
386
|
+
zoom: S.zoom,
|
|
387
|
+
projection: r(j).name
|
|
337
388
|
}, null, 8, ["center", "zoom", "projection"]),
|
|
338
|
-
i.interactions?.selectable?.enabled ? (
|
|
389
|
+
i.interactions?.selectable?.enabled ? (l(), f(r(De), {
|
|
339
390
|
key: 0,
|
|
340
391
|
ref_key: "selectInteractionRef",
|
|
341
|
-
ref:
|
|
392
|
+
ref: J,
|
|
342
393
|
multi: !1,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
394
|
+
features: Z.value,
|
|
395
|
+
filter: Se.value,
|
|
396
|
+
style: xe(_e.value),
|
|
397
|
+
onSelect: Me
|
|
398
|
+
}, null, 8, ["features", "filter", "style"])) : d("", !0),
|
|
399
|
+
(l(!0), L(K, null, se(ye.value, (o) => (l(), L(K, {
|
|
400
|
+
key: o.identifier
|
|
349
401
|
}, [
|
|
350
|
-
|
|
402
|
+
o.type === "wms" && o.source ? (l(), f(r(ae), {
|
|
351
403
|
key: 0,
|
|
352
|
-
zIndex:
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
d(s(ze), {
|
|
356
|
-
url: t.wmsUrl,
|
|
357
|
-
layers: t.layerName || "",
|
|
358
|
-
params: { LAYERS: t.layerName || "", TILED: !0 },
|
|
359
|
-
serverType: "geoserver",
|
|
360
|
-
crossOrigin: "anonymous"
|
|
361
|
-
}, null, 8, ["url", "layers", "params"])
|
|
362
|
-
]),
|
|
363
|
-
_: 2
|
|
364
|
-
}, 1032, ["zIndex"])) : t.type === "wmts" && (t.wmtsOptions || t.options) ? (a(), f(s(X), {
|
|
404
|
+
zIndex: o.zIndex,
|
|
405
|
+
source: o.source
|
|
406
|
+
}, null, 8, ["zIndex", "source"])) : o.type === "wmts" && o.source ? (l(), f(r(ae), {
|
|
365
407
|
key: 1,
|
|
366
|
-
zIndex:
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
d(s(xe), _e(
|
|
370
|
-
{ ref_for: !0 },
|
|
371
|
-
t.wmtsOptions || t.options,
|
|
372
|
-
{ styles: "default" }
|
|
373
|
-
), null, 16)
|
|
374
|
-
]),
|
|
375
|
-
_: 2
|
|
376
|
-
}, 1032, ["zIndex"])) : t.type === "vector" ? (a(), f(s(Te), {
|
|
408
|
+
zIndex: o.zIndex,
|
|
409
|
+
source: o.source
|
|
410
|
+
}, null, 8, ["zIndex", "source"])) : o.type === "vector" ? (l(), f(r(Ve), {
|
|
377
411
|
key: 2,
|
|
378
|
-
zIndex:
|
|
379
|
-
properties: { name:
|
|
412
|
+
zIndex: o.zIndex,
|
|
413
|
+
properties: { name: o.identifier },
|
|
380
414
|
ref_for: !0,
|
|
381
415
|
ref: (n) => {
|
|
382
|
-
n && (
|
|
416
|
+
n && (fe.value[o.identifier] = n);
|
|
383
417
|
}
|
|
384
418
|
}, {
|
|
385
|
-
default:
|
|
386
|
-
|
|
419
|
+
default: k(() => [
|
|
420
|
+
o.styleFunction || o.options?.styleFunction || o.style || o.options?.style ? (l(), f(r(Ne), {
|
|
387
421
|
key: 0,
|
|
388
|
-
overrideStyleFunction:
|
|
389
|
-
}, null, 8, ["overrideStyleFunction"])) :
|
|
390
|
-
|
|
422
|
+
overrideStyleFunction: o.styleFunction || o.options?.styleFunction || de(o.style || o.options?.style)
|
|
423
|
+
}, null, 8, ["overrideStyleFunction"])) : d("", !0),
|
|
424
|
+
g(r(Ze), {
|
|
391
425
|
ref_for: !0,
|
|
392
426
|
ref: (n) => {
|
|
393
|
-
n && (
|
|
427
|
+
n && (R.value[o.identifier] = n);
|
|
394
428
|
}
|
|
395
429
|
}, {
|
|
396
|
-
default:
|
|
397
|
-
(
|
|
398
|
-
key: `${
|
|
430
|
+
default: k(() => [
|
|
431
|
+
(l(!0), L(K, null, se(o.options?.features, (n, s) => (l(), f(r(je), {
|
|
432
|
+
key: `${o.identifier}-${s}`,
|
|
399
433
|
properties: n.properties || {}
|
|
400
434
|
}, {
|
|
401
|
-
default:
|
|
402
|
-
n.type === "Point" ? (
|
|
435
|
+
default: k(() => [
|
|
436
|
+
n.type === "Point" ? (l(), f(r($e), {
|
|
403
437
|
key: 0,
|
|
404
438
|
coordinates: n.coordinates
|
|
405
|
-
}, null, 8, ["coordinates"])) :
|
|
406
|
-
n.type === "Polygon" ? (
|
|
439
|
+
}, null, 8, ["coordinates"])) : d("", !0),
|
|
440
|
+
n.type === "Polygon" ? (l(), f(r(Ge), {
|
|
407
441
|
key: 1,
|
|
408
442
|
coordinates: n.coordinates
|
|
409
|
-
}, null, 8, ["coordinates"])) :
|
|
443
|
+
}, null, 8, ["coordinates"])) : d("", !0)
|
|
410
444
|
]),
|
|
411
445
|
_: 2
|
|
412
446
|
}, 1032, ["properties"]))), 128)),
|
|
413
|
-
i.interactions?.modify?.enabled && i.interactions.modify.layer ===
|
|
447
|
+
i.interactions?.modify?.enabled && i.interactions.modify.layer === o.identifier && Z.value ? (l(), f(r(Ue), {
|
|
414
448
|
key: 0,
|
|
415
|
-
features:
|
|
416
|
-
onModifystart:
|
|
417
|
-
onModifyend:
|
|
418
|
-
}, null, 8, ["features"])) :
|
|
419
|
-
i.interactions?.snap?.enabled && i.interactions?.modify?.enabled && i.interactions?.modify?.layer ===
|
|
420
|
-
key: `snap-${
|
|
421
|
-
source:
|
|
449
|
+
features: Z.value,
|
|
450
|
+
onModifystart: Ce,
|
|
451
|
+
onModifyend: Te
|
|
452
|
+
}, null, 8, ["features"])) : d("", !0),
|
|
453
|
+
i.interactions?.snap?.enabled && i.interactions?.modify?.enabled && i.interactions?.modify?.layer === o.identifier && R.value[i.interactions.snap.targetLayer]?.source ? (l(), f(r(Ke), {
|
|
454
|
+
key: `snap-${o.identifier}-${i.interactions?.snap?.enabled}-${i.interactions?.modify?.enabled}`,
|
|
455
|
+
source: R.value[i.interactions.snap.targetLayer]?.source,
|
|
422
456
|
pixelTolerance: i.interactions?.snap?.pixelTolerance || 8
|
|
423
|
-
}, null, 8, ["source", "pixelTolerance"])) :
|
|
457
|
+
}, null, 8, ["source", "pixelTolerance"])) : d("", !0)
|
|
424
458
|
]),
|
|
425
459
|
_: 2
|
|
426
460
|
}, 1536)
|
|
427
461
|
]),
|
|
428
462
|
_: 2
|
|
429
|
-
}, 1032, ["zIndex", "properties"])) :
|
|
463
|
+
}, 1032, ["zIndex", "properties"])) : d("", !0)
|
|
430
464
|
], 64))), 128)),
|
|
431
|
-
|
|
465
|
+
V.value && z.value ? (l(), f(r(Re), {
|
|
432
466
|
key: 1,
|
|
433
|
-
position:
|
|
467
|
+
position: z.value,
|
|
434
468
|
positioning: "bottom-left",
|
|
435
469
|
offset: [10, -10],
|
|
436
470
|
stopEvent: !0
|
|
437
471
|
}, {
|
|
438
|
-
default:
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
472
|
+
default: k(() => [
|
|
473
|
+
m("div", ct, [
|
|
474
|
+
Q.value ? (l(), L("div", ut, Pe(Q.value), 1)) : d("", !0),
|
|
475
|
+
m("div", { class: "modify-overlay-actions" }, [
|
|
476
|
+
m("button", {
|
|
477
|
+
class: "modify-btn modify-btn-cancel",
|
|
478
|
+
onClick: Ie
|
|
479
|
+
}, " Annuleer "),
|
|
480
|
+
m("button", {
|
|
481
|
+
class: "modify-btn modify-btn-ok",
|
|
482
|
+
onClick: Fe
|
|
483
|
+
}, " Bevestig ")
|
|
484
|
+
])
|
|
448
485
|
])
|
|
449
486
|
]),
|
|
450
487
|
_: 1
|
|
451
|
-
}, 8, ["position"])) :
|
|
488
|
+
}, 8, ["position"])) : d("", !0)
|
|
452
489
|
]),
|
|
453
490
|
_: 1
|
|
454
491
|
}, 512),
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
class:
|
|
492
|
+
m("div", ft, [
|
|
493
|
+
S.toggleableLayers && S.toggleableLayers.length > 0 ? (l(), L("div", dt, [
|
|
494
|
+
m("button", {
|
|
495
|
+
class: re(["iconbutton", { isActive: I.value }]),
|
|
459
496
|
"aria-label": "Toon lagen",
|
|
460
|
-
"aria-expanded":
|
|
461
|
-
onClick:
|
|
497
|
+
"aria-expanded": I.value,
|
|
498
|
+
onClick: ge
|
|
462
499
|
}, [
|
|
463
|
-
|
|
464
|
-
], 10,
|
|
465
|
-
|
|
466
|
-
default:
|
|
467
|
-
|
|
500
|
+
g(r(nt))
|
|
501
|
+
], 10, pt),
|
|
502
|
+
g(le, { name: "fade" }, {
|
|
503
|
+
default: k(() => [
|
|
504
|
+
I.value ? (l(), f(lt, {
|
|
468
505
|
key: 0,
|
|
469
|
-
toggleableLayers:
|
|
470
|
-
visibleToggleableLayers:
|
|
471
|
-
onToggleLayer:
|
|
472
|
-
}, null, 8, ["toggleableLayers", "visibleToggleableLayers"])) :
|
|
506
|
+
toggleableLayers: S.toggleableLayers || [],
|
|
507
|
+
visibleToggleableLayers: O.value,
|
|
508
|
+
onToggleLayer: be
|
|
509
|
+
}, null, 8, ["toggleableLayers", "visibleToggleableLayers"])) : d("", !0)
|
|
473
510
|
]),
|
|
474
511
|
_: 1
|
|
475
512
|
})
|
|
476
|
-
])) :
|
|
513
|
+
])) : d("", !0)
|
|
477
514
|
]),
|
|
478
|
-
|
|
479
|
-
i.baseLayers && i.baseLayers.length > 0 ? (
|
|
480
|
-
|
|
481
|
-
class:
|
|
515
|
+
m("div", mt, [
|
|
516
|
+
i.baseLayers && i.baseLayers.length > 0 ? (l(), L("div", yt, [
|
|
517
|
+
m("button", {
|
|
518
|
+
class: re(["iconbutton", { isActive: F.value }]),
|
|
482
519
|
"aria-label": "Toon basislagen",
|
|
483
|
-
"aria-expanded":
|
|
484
|
-
onClick:
|
|
520
|
+
"aria-expanded": F.value,
|
|
521
|
+
onClick: ve
|
|
485
522
|
}, [
|
|
486
|
-
|
|
487
|
-
], 10,
|
|
488
|
-
|
|
489
|
-
default:
|
|
490
|
-
|
|
523
|
+
g(r(ot))
|
|
524
|
+
], 10, vt),
|
|
525
|
+
g(le, { name: "fade" }, {
|
|
526
|
+
default: k(() => [
|
|
527
|
+
F.value ? (l(), f(rt, {
|
|
491
528
|
key: 0,
|
|
492
529
|
baseLayers: i.baseLayers,
|
|
493
|
-
selectedBaseLayerId:
|
|
494
|
-
onSelectBaseLayer:
|
|
495
|
-
}, null, 8, ["baseLayers", "selectedBaseLayerId"])) :
|
|
530
|
+
selectedBaseLayerId: _.value,
|
|
531
|
+
onSelectBaseLayer: we
|
|
532
|
+
}, null, 8, ["baseLayers", "selectedBaseLayerId"])) : d("", !0)
|
|
496
533
|
]),
|
|
497
534
|
_: 1
|
|
498
535
|
})
|
|
499
|
-
])) :
|
|
500
|
-
|
|
501
|
-
|
|
536
|
+
])) : d("", !0),
|
|
537
|
+
m("div", gt, [
|
|
538
|
+
m("button", {
|
|
502
539
|
class: "iconbutton",
|
|
503
540
|
"aria-label": "Zoom in",
|
|
504
|
-
onClick:
|
|
541
|
+
onClick: he
|
|
505
542
|
}, [
|
|
506
|
-
|
|
543
|
+
g(r(it))
|
|
507
544
|
]),
|
|
508
|
-
|
|
545
|
+
m("button", {
|
|
509
546
|
class: "iconbutton",
|
|
510
547
|
"aria-label": "Zoom out",
|
|
511
|
-
onClick:
|
|
548
|
+
onClick: Le
|
|
512
549
|
}, [
|
|
513
|
-
|
|
550
|
+
g(r(st))
|
|
514
551
|
])
|
|
515
552
|
])
|
|
516
553
|
])
|
|
@@ -518,5 +555,5 @@ const Ee = { class: "map-container" }, et = { class: "bottom-left-panels" }, tt
|
|
|
518
555
|
}
|
|
519
556
|
});
|
|
520
557
|
export {
|
|
521
|
-
|
|
558
|
+
Zt as default
|
|
522
559
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.wrapper[data-v-7a503b81]{position:absolute;bottom:100%;right:0;padding:8px 12px;background:#fff;border-radius:4px 4px 0;box-shadow:0 2px 8px #00000026;min-width:150px;z-index:1000;margin-bottom:8px}ul[data-v-7a503b81]{list-style:none;margin:0;padding:0}.layer[data-v-7a503b81]{position:relative;display:flex;margin-bottom:4px}.layer[data-v-7a503b81]:last-child{margin-bottom:0}.layer>input[data-v-7a503b81]{position:absolute;top:6px;left:0;width:12px;height:12px;margin:0;cursor:pointer}.layer>label[data-v-7a503b81]{display:block;position:relative;width:100%;cursor:pointer;padding:3px 0 3px 18px;-webkit-user-select:none;user-select:none;font-size:14px;white-space:nowrap}.wrapper[data-v-16f7d1b3]{position:absolute;bottom:100%;left:0;padding:12px;background:#fff;border-radius:4px 4px 4px 0;box-shadow:0 2px 8px #00000026;min-width:200px;z-index:1000;margin-bottom:8px}ul[data-v-16f7d1b3]{list-style:none;margin:0;padding:0}.layer[data-v-16f7d1b3]{margin-bottom:8px}.layer[data-v-16f7d1b3]:last-child{margin-bottom:0}.layer-control[data-v-16f7d1b3]{display:flex;align-items:center;cursor:pointer;gap:8px}.layer-checkbox[data-v-16f7d1b3]{flex-shrink:0}.layer-title[data-v-16f7d1b3]{font-size:14px;font-weight:500;color:#333;line-height:1.3}.map-container[data-v-
|
|
1
|
+
.wrapper[data-v-7a503b81]{position:absolute;bottom:100%;right:0;padding:8px 12px;background:#fff;border-radius:4px 4px 0;box-shadow:0 2px 8px #00000026;min-width:150px;z-index:1000;margin-bottom:8px}ul[data-v-7a503b81]{list-style:none;margin:0;padding:0}.layer[data-v-7a503b81]{position:relative;display:flex;margin-bottom:4px}.layer[data-v-7a503b81]:last-child{margin-bottom:0}.layer>input[data-v-7a503b81]{position:absolute;top:6px;left:0;width:12px;height:12px;margin:0;cursor:pointer}.layer>label[data-v-7a503b81]{display:block;position:relative;width:100%;cursor:pointer;padding:3px 0 3px 18px;-webkit-user-select:none;user-select:none;font-size:14px;white-space:nowrap}.wrapper[data-v-16f7d1b3]{position:absolute;bottom:100%;left:0;padding:12px;background:#fff;border-radius:4px 4px 4px 0;box-shadow:0 2px 8px #00000026;min-width:200px;z-index:1000;margin-bottom:8px}ul[data-v-16f7d1b3]{list-style:none;margin:0;padding:0}.layer[data-v-16f7d1b3]{margin-bottom:8px}.layer[data-v-16f7d1b3]:last-child{margin-bottom:0}.layer-control[data-v-16f7d1b3]{display:flex;align-items:center;cursor:pointer;gap:8px}.layer-checkbox[data-v-16f7d1b3]{flex-shrink:0}.layer-title[data-v-16f7d1b3]{font-size:14px;font-weight:500;color:#333;line-height:1.3}.map-container[data-v-00ea6e03]{position:relative;width:100%;height:100%}.bottom-right-panels[data-v-00ea6e03]{position:absolute;z-index:1;bottom:20px;right:20px;display:flex;flex-direction:column;gap:8px}.bottom-left-panels[data-v-00ea6e03]{position:absolute;z-index:1;bottom:20px;left:20px;display:flex;flex-direction:column;gap:8px}.zoom-panel[data-v-00ea6e03],.base-layers-control[data-v-00ea6e03],.layers-control[data-v-00ea6e03]{display:flex;flex-direction:column;background:#fff;border-radius:4px;box-shadow:0 1px 4px #0003;overflow:visible;position:relative}.iconbutton[data-v-00ea6e03]{width:30px;height:30px;border:none;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .2s;padding:0}.iconbutton[data-v-00ea6e03]:hover{background:#f0f0f0}.iconbutton.isActive[data-v-00ea6e03]{background:#e6f3ff}.iconbutton[data-v-00ea6e03]:not(:last-child){border-bottom:1px solid #ddd}.fade-enter-active[data-v-00ea6e03],.fade-leave-active[data-v-00ea6e03]{transition:opacity .2s ease}.fade-enter-from[data-v-00ea6e03],.fade-leave-to[data-v-00ea6e03]{opacity:0}.modify-overlay[data-v-00ea6e03]{display:flex;flex-direction:column;align-items:stretch;gap:6px;background:#fff;padding:6px;border-radius:4px;box-shadow:0 2px 8px #0003;border:1px solid #ccc}.modify-overlay-label[data-v-00ea6e03]{max-width:220px;padding:0 6px;color:#333;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.modify-overlay-actions[data-v-00ea6e03]{display:flex;gap:4px}.modify-btn[data-v-00ea6e03]{padding:6px 12px;border:none;border-radius:3px;cursor:pointer;font-size:12px;font-weight:500;transition:background-color .2s}.modify-btn-ok[data-v-00ea6e03]{background:#4caf50;color:#fff}.modify-btn-ok[data-v-00ea6e03]:hover{background:#45a049}.modify-btn-cancel[data-v-00ea6e03]{background:#f44336;color:#fff}.modify-btn-cancel[data-v-00ea6e03]:hover{background:#da190b}
|