@delta10/atlas-sdk 0.2.0 → 0.2.2
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 +9 -3
- package/dist/Example.vue.d.ts +3 -0
- 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.d.ts +103 -0
- package/dist/components/Map.vue.js +7 -0
- package/dist/components/Map.vue2.js +583 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/panels/BaseLayers.vue.d.ts +23 -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.d.ts +23 -0
- package/dist/components/panels/Layers.vue.js +7 -0
- package/dist/components/panels/Layers.vue2.js +35 -0
- package/dist/data/demo-data.d.ts +15 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +10 -0
- package/dist/main.d.ts +1 -0
- package/dist/{assets/index-DTZ2AlyB.css → style.css} +1 -1
- package/dist/utils/projections.d.ts +5 -0
- package/dist/utils/projections.js +8 -0
- package/package.json +1 -1
- package/dist/assets/index-BxWjC_eB.js +0 -12
- package/dist/index.html +0 -14
package/README.md
CHANGED
|
@@ -72,6 +72,7 @@ const interactions: InteractionsConfig = {
|
|
|
72
72
|
selectable: {
|
|
73
73
|
enabled: true,
|
|
74
74
|
layers: ['meetbouten'],
|
|
75
|
+
hitTolerance: 20,
|
|
75
76
|
style: {
|
|
76
77
|
'circle-radius': 8,
|
|
77
78
|
'circle-fill-color': 'red',
|
|
@@ -375,6 +376,7 @@ Allow users to select features from specific layers:
|
|
|
375
376
|
selectable: {
|
|
376
377
|
enabled: true,
|
|
377
378
|
layers: ['meetbouten'],
|
|
379
|
+
hitTolerance: 20,
|
|
378
380
|
style: {
|
|
379
381
|
'circle-radius': 8,
|
|
380
382
|
'circle-fill-color': 'red',
|
|
@@ -386,18 +388,22 @@ Allow users to select features from specific layers:
|
|
|
386
388
|
```
|
|
387
389
|
|
|
388
390
|
### Modify Interaction
|
|
389
|
-
Allow users to edit existing geometries:
|
|
391
|
+
Allow users to edit existing geometries directly on the configured layer:
|
|
390
392
|
```typescript
|
|
391
393
|
{
|
|
392
394
|
modify: {
|
|
393
395
|
enabled: true,
|
|
394
396
|
layer: 'meetbouten',
|
|
395
|
-
labelProperty: 'meetboutnummer' // Optional: feature property shown in the confirm/cancel overlay
|
|
397
|
+
labelProperty: 'meetboutnummer', // Optional: feature property shown in the confirm/cancel overlay
|
|
398
|
+
pixelTolerance: 20, // Optional: edit tolerance in pixels for point symbols
|
|
399
|
+
filter: (feature) => feature.get('editable') === true // Optional: return false to prevent editing
|
|
396
400
|
}
|
|
397
401
|
}
|
|
398
402
|
```
|
|
399
403
|
|
|
400
|
-
The `labelProperty` value is read from the
|
|
404
|
+
The `labelProperty` value is read from the modified feature's `properties`. For example, if a feature has `properties: { id: '123482' }`, use `labelProperty: 'id'` to show that value in the confirmation overlay.
|
|
405
|
+
|
|
406
|
+
The optional `filter` callback receives the OpenLayers feature and layer. Return `false` to skip that feature for editing.
|
|
401
407
|
|
|
402
408
|
### Snap Interaction
|
|
403
409
|
Snap modified features to existing features:
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -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,103 @@
|
|
|
1
|
+
export type StyleConfig = any;
|
|
2
|
+
export interface SelectableConfig {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
layers: string[];
|
|
5
|
+
style?: StyleConfig;
|
|
6
|
+
hitTolerance?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ModifyConfig {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
layer: string;
|
|
11
|
+
labelProperty?: string;
|
|
12
|
+
pixelTolerance?: number;
|
|
13
|
+
filter?: (feature: any, layer?: any) => boolean;
|
|
14
|
+
style?: StyleConfig;
|
|
15
|
+
}
|
|
16
|
+
export interface SnapConfig {
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
targetLayer: string;
|
|
19
|
+
pixelTolerance?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface InteractionsConfig {
|
|
22
|
+
selectable?: SelectableConfig;
|
|
23
|
+
modify?: ModifyConfig;
|
|
24
|
+
snap?: SnapConfig;
|
|
25
|
+
}
|
|
26
|
+
export interface LayerConfig {
|
|
27
|
+
type: "wmts" | "vector" | "wms";
|
|
28
|
+
options: {
|
|
29
|
+
identifier: string;
|
|
30
|
+
title: string;
|
|
31
|
+
url?: string;
|
|
32
|
+
layer?: string;
|
|
33
|
+
matrixSet?: string;
|
|
34
|
+
format?: string;
|
|
35
|
+
projection?: string;
|
|
36
|
+
features?: Array<{
|
|
37
|
+
type: "Point" | "Polygon";
|
|
38
|
+
coordinates: number[] | number[][][] | number[][][][];
|
|
39
|
+
properties?: Record<string, any>;
|
|
40
|
+
}>;
|
|
41
|
+
style?: StyleConfig;
|
|
42
|
+
styleFunction?: (feature: any, currentStyle: any, resolution: number) => any;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
type __VLS_Props = {
|
|
46
|
+
layers?: LayerConfig[];
|
|
47
|
+
baseLayers?: LayerConfig[];
|
|
48
|
+
toggleableLayers?: LayerConfig[];
|
|
49
|
+
interactions?: InteractionsConfig;
|
|
50
|
+
zoom?: number;
|
|
51
|
+
center?: [number, number];
|
|
52
|
+
};
|
|
53
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
54
|
+
map: import("vue").Ref<any, any>;
|
|
55
|
+
view: import("vue").Ref<any, any>;
|
|
56
|
+
fitToFeatures: (features: Array<{
|
|
57
|
+
type: "Point" | "Polygon";
|
|
58
|
+
coordinates: number[] | number[][][] | number[][][][];
|
|
59
|
+
properties?: Record<string, any>;
|
|
60
|
+
}>) => void;
|
|
61
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
62
|
+
featureSelected: (event: {
|
|
63
|
+
selected: any[];
|
|
64
|
+
}) => any;
|
|
65
|
+
featureDeselected: (event: {
|
|
66
|
+
deselected: any[];
|
|
67
|
+
}) => any;
|
|
68
|
+
featureModified: (event: {
|
|
69
|
+
features: any[];
|
|
70
|
+
}) => any;
|
|
71
|
+
mapClicked: (event: {
|
|
72
|
+
coordinate: [number, number];
|
|
73
|
+
pixel: [number, number];
|
|
74
|
+
}) => any;
|
|
75
|
+
modifyCancelled: (event: {
|
|
76
|
+
features: any[];
|
|
77
|
+
}) => any;
|
|
78
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
79
|
+
onFeatureSelected?: ((event: {
|
|
80
|
+
selected: any[];
|
|
81
|
+
}) => any) | undefined;
|
|
82
|
+
onFeatureDeselected?: ((event: {
|
|
83
|
+
deselected: any[];
|
|
84
|
+
}) => any) | undefined;
|
|
85
|
+
onFeatureModified?: ((event: {
|
|
86
|
+
features: any[];
|
|
87
|
+
}) => any) | undefined;
|
|
88
|
+
onMapClicked?: ((event: {
|
|
89
|
+
coordinate: [number, number];
|
|
90
|
+
pixel: [number, number];
|
|
91
|
+
}) => any) | undefined;
|
|
92
|
+
onModifyCancelled?: ((event: {
|
|
93
|
+
features: any[];
|
|
94
|
+
}) => any) | undefined;
|
|
95
|
+
}>, {
|
|
96
|
+
baseLayers: LayerConfig[];
|
|
97
|
+
toggleableLayers: LayerConfig[];
|
|
98
|
+
layers: LayerConfig[];
|
|
99
|
+
zoom: number;
|
|
100
|
+
center: [number, number];
|
|
101
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
102
|
+
declare const _default: typeof __VLS_export;
|
|
103
|
+
export default _default;
|