ym-giswidget-2d 1.0.5 → 1.0.8
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/_virtual/_commonjs-dynamic-modules.js +6 -0
- package/_virtual/_commonjsHelpers.js +8 -0
- package/_virtual/jszip.min.js +4 -0
- package/components/clear/Clear.vue.d.ts +6 -0
- package/components/clear/Clear.vue.js +19 -0
- package/components/clear/Clear.vue2.js +4 -0
- package/components/clear/index.d.ts +6 -0
- package/components/clear/index.js +8 -0
- package/components/draw/Draw.vue.d.ts +6 -0
- package/components/draw/Draw.vue.js +71 -0
- package/components/draw/Draw.vue2.js +4 -0
- package/components/draw/index.d.ts +6 -0
- package/components/draw/index.js +8 -0
- package/components/export/Export.vue.d.ts +154 -0
- package/components/export/Export.vue.js +7 -0
- package/components/export/Export.vue2.js +298 -0
- package/components/export/index.css +3 -0
- package/components/export/index.d.ts +154 -0
- package/components/export/index.js +8 -0
- package/components/horizontally-top-toolbar/{horizontallyTopToolbar.vue.js → HorizontallyTopToolbar.vue.js} +2 -2
- package/components/horizontally-top-toolbar/{horizontallyTopToolbar.vue2.js → HorizontallyTopToolbar.vue2.js} +3 -3
- package/components/horizontally-top-toolbar/index.css +9 -9
- package/components/horizontally-top-toolbar/index.js +1 -1
- package/components/identify/Identify.vue.d.ts +13 -0
- package/components/identify/Identify.vue.js +96 -0
- package/components/identify/Identify.vue2.js +4 -0
- package/components/identify/index.d.ts +18 -0
- package/components/identify/index.js +8 -0
- package/components/import/Import.vue.d.ts +13 -0
- package/components/import/Import.vue.js +162 -0
- package/components/import/Import.vue2.js +4 -0
- package/components/import/index.d.ts +15 -0
- package/components/import/index.js +8 -0
- package/components/layer-tree/{layerTree.vue.d.ts → LayerTree.vue.d.ts} +212 -186
- package/components/layer-tree/{layerTree.vue.js → LayerTree.vue.js} +2 -2
- package/components/layer-tree/{layerTree.vue2.js → LayerTree.vue2.js} +2 -2
- package/components/layer-tree/index.css +11 -11
- package/components/layer-tree/index.d.ts +194 -184
- package/components/layer-tree/index.js +1 -1
- package/components/multi-screen/MultiScreen.vue.d.ts +425 -0
- package/components/multi-screen/MultiScreen.vue2.js +1 -1
- package/components/multi-screen/index.d.ts +426 -0
- package/components/multi-screen-panel/PanelMultiScreen.vue2.js +1 -1
- package/components/popup/Popup.vue.d.ts +158 -0
- package/components/popup/Popup.vue.js +8 -0
- package/components/popup/Popup.vue2.js +266 -0
- package/components/popup/index.css +61 -0
- package/components/popup/index.d.ts +157 -0
- package/components/popup/index.js +8 -0
- package/components/popup/index2.css +5 -0
- package/components/select/Select.vue.d.ts +13 -0
- package/components/select/Select.vue.js +142 -0
- package/components/select/Select.vue2.js +4 -0
- package/components/select/index.d.ts +18 -0
- package/components/select/index.js +8 -0
- package/components/swipe-layer/SwipeLayer.vue.d.ts +6 -0
- package/components/swipe-layer/SwipeLayer.vue.js +24 -0
- package/components/swipe-layer/SwipeLayer.vue2.js +4 -0
- package/components/swipe-layer/index.d.ts +6 -0
- package/components/swipe-layer/index.js +8 -0
- package/components/toc-card/{tocCard.vue.js → TocCard.vue.js} +2 -2
- package/components/toc-card/{tocCard.vue2.js → TocCard.vue2.js} +2 -2
- package/components/toc-card/index.css +1 -1
- package/components/toc-card/index.js +1 -1
- package/config/Config.d.ts +13 -0
- package/config/Config.js +8 -0
- package/css/index.css +64 -14
- package/http/Axios.d.ts +14 -0
- package/http/Axios.js +37 -0
- package/http/LayerField.js +29 -0
- package/http/SpaceFile.d.ts +3 -0
- package/http/SpaceFile.js +38 -0
- package/http/layerField.d.ts +19 -0
- package/index.d.ts +7 -0
- package/index.js +14 -0
- package/package.json +2 -2
- package/panel/DraggablePanel.vue.d.ts +82 -0
- package/panel/DraggablePanel.vue2.js +1 -1
- /package/components/horizontally-top-toolbar/{horizontallyTopToolbar.vue.d.ts → HorizontallyTopToolbar.vue.d.ts} +0 -0
- /package/components/toc-card/{tocCard.vue.d.ts → TocCard.vue.d.ts} +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
export declare const Export: import('../../utils').WithInstall<import('vue').DefineComponent<{
|
|
2
|
+
map: import('ym-giscomm-2d/mapView/Map').default;
|
|
3
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
|
+
activeInteraction: (...args: any[]) => void;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
6
|
+
map: import('ym-giscomm-2d/mapView/Map').default;
|
|
7
|
+
}> & Readonly<{
|
|
8
|
+
onActiveInteraction?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
10
|
+
popupDom: ({
|
|
11
|
+
$: import('vue').ComponentInternalInstance;
|
|
12
|
+
$data: {};
|
|
13
|
+
$props: {
|
|
14
|
+
readonly title?: string | undefined;
|
|
15
|
+
readonly width?: number | undefined;
|
|
16
|
+
readonly height?: number | undefined;
|
|
17
|
+
readonly minWidth?: number | undefined;
|
|
18
|
+
readonly minHeight?: number | undefined;
|
|
19
|
+
readonly resizable?: boolean | undefined;
|
|
20
|
+
readonly showClose?: boolean | undefined;
|
|
21
|
+
readonly showMinimize?: boolean | undefined;
|
|
22
|
+
readonly showMaximize?: boolean | undefined;
|
|
23
|
+
readonly showDock?: boolean | undefined;
|
|
24
|
+
readonly drag?: boolean | undefined;
|
|
25
|
+
readonly showOk?: boolean | undefined;
|
|
26
|
+
readonly showCancel?: boolean | undefined;
|
|
27
|
+
readonly okText?: string | undefined;
|
|
28
|
+
readonly cancelText?: string | undefined;
|
|
29
|
+
readonly onClose?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
readonly onResize?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
readonly onMove?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
readonly onOk?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
34
|
+
$attrs: {
|
|
35
|
+
[x: string]: unknown;
|
|
36
|
+
};
|
|
37
|
+
$refs: {
|
|
38
|
+
[x: string]: unknown;
|
|
39
|
+
} & {
|
|
40
|
+
panelRef: HTMLDivElement;
|
|
41
|
+
};
|
|
42
|
+
$slots: Readonly<{
|
|
43
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
46
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
47
|
+
$host: Element | null;
|
|
48
|
+
$emit: ((event: "close", ...args: any[]) => void) & ((event: "resize", ...args: any[]) => void) & ((event: "move", ...args: any[]) => void) & ((event: "ok", ...args: any[]) => void);
|
|
49
|
+
$el: HTMLDivElement;
|
|
50
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
51
|
+
title?: string;
|
|
52
|
+
width?: number;
|
|
53
|
+
height?: number;
|
|
54
|
+
minWidth?: number;
|
|
55
|
+
minHeight?: number;
|
|
56
|
+
resizable?: boolean;
|
|
57
|
+
showClose?: boolean;
|
|
58
|
+
showMinimize?: boolean;
|
|
59
|
+
showMaximize?: boolean;
|
|
60
|
+
showDock?: boolean;
|
|
61
|
+
drag?: boolean;
|
|
62
|
+
showOk?: boolean;
|
|
63
|
+
showCancel?: boolean;
|
|
64
|
+
okText?: string;
|
|
65
|
+
cancelText?: string;
|
|
66
|
+
}> & Readonly<{
|
|
67
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
onResize?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
onMove?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
onOk?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
72
|
+
close: (...args: any[]) => void;
|
|
73
|
+
resize: (...args: any[]) => void;
|
|
74
|
+
move: (...args: any[]) => void;
|
|
75
|
+
ok: (...args: any[]) => void;
|
|
76
|
+
}, string, {
|
|
77
|
+
title: string;
|
|
78
|
+
showClose: boolean;
|
|
79
|
+
drag: boolean;
|
|
80
|
+
minWidth: number;
|
|
81
|
+
minHeight: number;
|
|
82
|
+
resizable: boolean;
|
|
83
|
+
showMinimize: boolean;
|
|
84
|
+
showMaximize: boolean;
|
|
85
|
+
showDock: boolean;
|
|
86
|
+
showOk: boolean;
|
|
87
|
+
showCancel: boolean;
|
|
88
|
+
okText: string;
|
|
89
|
+
cancelText: string;
|
|
90
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
91
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
92
|
+
created?: (() => void) | (() => void)[];
|
|
93
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
94
|
+
mounted?: (() => void) | (() => void)[];
|
|
95
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
96
|
+
updated?: (() => void) | (() => void)[];
|
|
97
|
+
activated?: (() => void) | (() => void)[];
|
|
98
|
+
deactivated?: (() => void) | (() => void)[];
|
|
99
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
100
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
101
|
+
destroyed?: (() => void) | (() => void)[];
|
|
102
|
+
unmounted?: (() => void) | (() => void)[];
|
|
103
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
104
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
105
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
106
|
+
};
|
|
107
|
+
$forceUpdate: () => void;
|
|
108
|
+
$nextTick: typeof import('vue').nextTick;
|
|
109
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
110
|
+
} & Readonly<{
|
|
111
|
+
title: string;
|
|
112
|
+
showClose: boolean;
|
|
113
|
+
drag: boolean;
|
|
114
|
+
minWidth: number;
|
|
115
|
+
minHeight: number;
|
|
116
|
+
resizable: boolean;
|
|
117
|
+
showMinimize: boolean;
|
|
118
|
+
showMaximize: boolean;
|
|
119
|
+
showDock: boolean;
|
|
120
|
+
showOk: boolean;
|
|
121
|
+
showCancel: boolean;
|
|
122
|
+
okText: string;
|
|
123
|
+
cancelText: string;
|
|
124
|
+
}> & Omit<Readonly<{
|
|
125
|
+
title?: string;
|
|
126
|
+
width?: number;
|
|
127
|
+
height?: number;
|
|
128
|
+
minWidth?: number;
|
|
129
|
+
minHeight?: number;
|
|
130
|
+
resizable?: boolean;
|
|
131
|
+
showClose?: boolean;
|
|
132
|
+
showMinimize?: boolean;
|
|
133
|
+
showMaximize?: boolean;
|
|
134
|
+
showDock?: boolean;
|
|
135
|
+
drag?: boolean;
|
|
136
|
+
showOk?: boolean;
|
|
137
|
+
showCancel?: boolean;
|
|
138
|
+
okText?: string;
|
|
139
|
+
cancelText?: string;
|
|
140
|
+
}> & Readonly<{
|
|
141
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
142
|
+
onResize?: ((...args: any[]) => any) | undefined;
|
|
143
|
+
onMove?: ((...args: any[]) => any) | undefined;
|
|
144
|
+
onOk?: ((...args: any[]) => any) | undefined;
|
|
145
|
+
}>, "title" | "showClose" | "drag" | "minWidth" | "minHeight" | "resizable" | "showMinimize" | "showMaximize" | "showDock" | "showOk" | "showCancel" | "okText" | "cancelText"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
146
|
+
$slots: {
|
|
147
|
+
header?(_: {}): any;
|
|
148
|
+
default?(_: {}): any;
|
|
149
|
+
footer?(_: {}): any;
|
|
150
|
+
};
|
|
151
|
+
}) | null;
|
|
152
|
+
formRef: unknown;
|
|
153
|
+
}, HTMLDivElement>>;
|
|
154
|
+
export default Export;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _sfc_main from "./
|
|
1
|
+
import _sfc_main from "./HorizontallyTopToolbar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const _HorizontallyTopToolbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const _HorizontallyTopToolbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4542e16b"]]);
|
|
5
5
|
export {
|
|
6
6
|
_HorizontallyTopToolbar as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, reactive, onMounted, toRaw, defineAsyncComponent,
|
|
1
|
+
import { defineComponent, reactive, onMounted, toRaw, defineAsyncComponent, createElementBlock, openBlock, Fragment, createElementVNode, createBlock, createCommentVNode, renderList, withDirectives, normalizeClass, createTextVNode, toDisplayString, vShow, resolveDynamicComponent } from "vue";
|
|
2
2
|
import { ElMessage } from "element-plus";
|
|
3
3
|
const _hoisted_1 = { class: "toolbar-contain" };
|
|
4
4
|
const _hoisted_2 = { class: "toolbar-item-contain" };
|
|
@@ -22,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
...{
|
|
23
23
|
name: "YmHorizontallyTopToolbar"
|
|
24
24
|
},
|
|
25
|
-
__name: "
|
|
25
|
+
__name: "HorizontallyTopToolbar",
|
|
26
26
|
props: {
|
|
27
27
|
tools: { default: () => [
|
|
28
28
|
{
|
|
@@ -128,7 +128,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
128
128
|
},
|
|
129
129
|
emits: ["layerInitLoaded"],
|
|
130
130
|
setup(__props, { emit: __emit }) {
|
|
131
|
-
const modules = /* @__PURE__ */ Object.assign({ "./
|
|
131
|
+
const modules = /* @__PURE__ */ Object.assign({ "../clear/Clear.vue": () => import("../clear/Clear.vue2.js"), "../clear/index.ts": () => import("../clear/index.js"), "../draw/Draw.vue": () => import("../draw/Draw.vue2.js"), "../draw/index.ts": () => import("../draw/index.js"), "../export/Export.vue": () => import("../export/Export.vue.js"), "../export/index.ts": () => import("../export/index.js"), "./HorizontallyTopToolbar.vue": () => import("./HorizontallyTopToolbar.vue.js"), "./index.ts": () => import("./index.js"), "../identify/Identify.vue": () => import("../identify/Identify.vue2.js"), "../identify/index.ts": () => import("../identify/index.js"), "../import/Import.vue": () => import("../import/Import.vue2.js"), "../import/index.ts": () => import("../import/index.js"), "../layer-tree/LayerTree.vue": () => import("../layer-tree/LayerTree.vue.js"), "../layer-tree/index.ts": () => import("../layer-tree/index.js"), "../multi-screen-panel/PanelMultiScreen.vue": () => import("../multi-screen-panel/PanelMultiScreen.vue.js"), "../multi-screen-panel/index.ts": () => import("../multi-screen-panel/index.js"), "../multi-screen/MultiScreen.vue": () => import("../multi-screen/MultiScreen.vue.js"), "../multi-screen/index.ts": () => import("../multi-screen/index.js"), "../popup/Popup.vue": () => import("../popup/Popup.vue.js"), "../popup/index.ts": () => import("../popup/index.js"), "../select/Select.vue": () => import("../select/Select.vue2.js"), "../select/index.ts": () => import("../select/index.js"), "../swipe-layer/SwipeLayer.vue": () => import("../swipe-layer/SwipeLayer.vue2.js"), "../swipe-layer/index.ts": () => import("../swipe-layer/index.js"), "../toc-card/TocCard.vue": () => import("../toc-card/TocCard.vue.js"), "../toc-card/index.ts": () => import("../toc-card/index.js") });
|
|
132
132
|
const props = __props;
|
|
133
133
|
const reactiveValue = reactive({
|
|
134
134
|
activeIds: [],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.toolbar-contain[data-v-
|
|
1
|
+
.toolbar-contain[data-v-4542e16b] {
|
|
2
2
|
position: absolute;
|
|
3
3
|
top: 44px;
|
|
4
4
|
display: flex;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
border: 1px solid var(--system-primary-border-color);
|
|
10
10
|
border-radius: 3px;
|
|
11
11
|
}
|
|
12
|
-
.toolbar-contain .toolbar-item-contain[data-v-
|
|
12
|
+
.toolbar-contain .toolbar-item-contain[data-v-4542e16b] {
|
|
13
13
|
height: 43px;
|
|
14
14
|
line-height: 43px;
|
|
15
15
|
display: flex;
|
|
@@ -18,41 +18,41 @@
|
|
|
18
18
|
align-items: center;
|
|
19
19
|
cursor: pointer;
|
|
20
20
|
}
|
|
21
|
-
.toolbar-contain .toolbar-item-contain .toolbar-item[data-v-
|
|
21
|
+
.toolbar-contain .toolbar-item-contain .toolbar-item[data-v-4542e16b] {
|
|
22
22
|
display: flex;
|
|
23
23
|
align-items: center;
|
|
24
24
|
padding: 0px 10px;
|
|
25
25
|
}
|
|
26
|
-
.toolbar-contain .toolbar-item-contain .toolbar-icon[data-v-
|
|
26
|
+
.toolbar-contain .toolbar-item-contain .toolbar-icon[data-v-4542e16b] {
|
|
27
27
|
width: 24px;
|
|
28
28
|
height: 24px;
|
|
29
29
|
margin-right: 6px;
|
|
30
30
|
}
|
|
31
|
-
.toolbar-contain .toolbar-item-contain .toolbar-children-contain[data-v-
|
|
31
|
+
.toolbar-contain .toolbar-item-contain .toolbar-children-contain[data-v-4542e16b] {
|
|
32
32
|
position: absolute;
|
|
33
33
|
top: 50px;
|
|
34
34
|
background: var(--system-primary-color);
|
|
35
35
|
border: 1px solid var(--system-primary-border-color);
|
|
36
36
|
border-radius: 3px;
|
|
37
37
|
}
|
|
38
|
-
.toolbar-contain .active[data-v-
|
|
38
|
+
.toolbar-contain .active[data-v-4542e16b] {
|
|
39
39
|
color: var(--system-primary-text-active-color);
|
|
40
40
|
}
|
|
41
|
-
.toolbar-contain .toolbar-split[data-v-
|
|
41
|
+
.toolbar-contain .toolbar-split[data-v-4542e16b] {
|
|
42
42
|
width: 2px;
|
|
43
43
|
height: 20px;
|
|
44
44
|
background: #7EA08E;
|
|
45
45
|
margin: auto;
|
|
46
46
|
opacity: 0.5;
|
|
47
47
|
}
|
|
48
|
-
.toolbar-contain .toolbar-h-split[data-v-
|
|
48
|
+
.toolbar-contain .toolbar-h-split[data-v-4542e16b] {
|
|
49
49
|
height: 2px;
|
|
50
50
|
background: #7EA08E;
|
|
51
51
|
margin: auto;
|
|
52
52
|
opacity: 0.5;
|
|
53
53
|
margin: 0px 10px;
|
|
54
54
|
}
|
|
55
|
-
.component-position[data-v-
|
|
55
|
+
.component-position[data-v-4542e16b] {
|
|
56
56
|
position: absolute;
|
|
57
57
|
right: 300px;
|
|
58
58
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
2
|
import { withInstall } from "../../utils/wthInstall.js";
|
|
3
|
-
import _HorizontallyTopToolbar from "./
|
|
3
|
+
import _HorizontallyTopToolbar from "./HorizontallyTopToolbar.vue.js";
|
|
4
4
|
const HorizontallyTopToolbar = withInstall(_HorizontallyTopToolbar);
|
|
5
5
|
export {
|
|
6
6
|
HorizontallyTopToolbar,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as OLMap } from 'ym-giscomm-2d/mapView/Map';
|
|
2
|
+
import { default as Style } from 'ol/style/Style';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
map: OLMap;
|
|
5
|
+
pointStyle?: Style;
|
|
6
|
+
cancePointStyle?: Style;
|
|
7
|
+
lineStyle?: Style;
|
|
8
|
+
canceLineStyle?: Style;
|
|
9
|
+
polygonStyle?: Style;
|
|
10
|
+
cancePolygonStyle?: Style;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { defineComponent, reactive, onMounted, onUnmounted, createBlock, createCommentVNode, openBlock, unref } from "vue";
|
|
2
|
+
import Select from "ym-giscomm-2d/interaction/Select";
|
|
3
|
+
import { ElLoading } from "element-plus";
|
|
4
|
+
import { Popup } from "../popup/index.js";
|
|
5
|
+
import { getSelectPointStyle, getSelectCancePointStyle, getSelectLineStyle, getSelectCancelLineStyle, getSelectPolygonStyle, getSelectCancelPolygonStyle } from "ym-giscomm-2d/style/StyleManager";
|
|
6
|
+
import FeatureManager from "ym-giscomm-2d/feature/FeatureManager";
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "Identify",
|
|
9
|
+
props: {
|
|
10
|
+
map: {},
|
|
11
|
+
pointStyle: {},
|
|
12
|
+
cancePointStyle: {},
|
|
13
|
+
lineStyle: {},
|
|
14
|
+
canceLineStyle: {},
|
|
15
|
+
polygonStyle: {},
|
|
16
|
+
cancePolygonStyle: {}
|
|
17
|
+
},
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const reactiveValue = reactive({
|
|
21
|
+
features: [],
|
|
22
|
+
postion: []
|
|
23
|
+
});
|
|
24
|
+
const pointStyle = props.pointStyle || getSelectPointStyle();
|
|
25
|
+
const cancePointStyle = props.cancePointStyle || getSelectCancePointStyle();
|
|
26
|
+
const lineStyle = props.lineStyle || getSelectLineStyle();
|
|
27
|
+
const canceLineStyle = props.canceLineStyle || getSelectCancelLineStyle();
|
|
28
|
+
const polygonStyle = props.polygonStyle || getSelectPolygonStyle();
|
|
29
|
+
const cancePolygonStyle = props.cancePolygonStyle || getSelectCancelPolygonStyle();
|
|
30
|
+
onMounted(() => {
|
|
31
|
+
const select = new Select("rectangle", {
|
|
32
|
+
pointStyle,
|
|
33
|
+
cancePointStyle,
|
|
34
|
+
lineStyle,
|
|
35
|
+
canceLineStyle,
|
|
36
|
+
polygonStyle,
|
|
37
|
+
cancePolygonStyle,
|
|
38
|
+
addTempLayer: true,
|
|
39
|
+
selectTempLayer: false
|
|
40
|
+
});
|
|
41
|
+
props.map.interactionManager.addInteraction("identify", select);
|
|
42
|
+
let loadingInstance;
|
|
43
|
+
select.on("selectstart", (event) => {
|
|
44
|
+
loadingInstance = ElLoading.service({ text: "正在查询...", background: "rgba(0, 0, 0, 0.5)", target: props.map.getTarget() });
|
|
45
|
+
});
|
|
46
|
+
select.on("selected", (event) => {
|
|
47
|
+
loadingInstance.close();
|
|
48
|
+
clearSelected();
|
|
49
|
+
if (event.allFeatures) {
|
|
50
|
+
for (const feature of event.allFeatures) {
|
|
51
|
+
feature.fromType = "identify";
|
|
52
|
+
}
|
|
53
|
+
reactiveValue.features = event.allFeatures;
|
|
54
|
+
}
|
|
55
|
+
if (event.coordinates) {
|
|
56
|
+
reactiveValue.postion = event.coordinates[event.coordinates.length - 1];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
onUnmounted(() => {
|
|
61
|
+
props.map.interactionManager.removeInteraction("identify");
|
|
62
|
+
clearSelected();
|
|
63
|
+
});
|
|
64
|
+
function handleClose() {
|
|
65
|
+
reactiveValue.features = [];
|
|
66
|
+
clearSelected();
|
|
67
|
+
}
|
|
68
|
+
function clearSelected() {
|
|
69
|
+
const featureManager = new FeatureManager(props.map);
|
|
70
|
+
const features = featureManager.getSelectedFeatures();
|
|
71
|
+
if (!features || features.length == 0) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
for (const feature of features) {
|
|
75
|
+
if (feature.fromType == "identify" && feature.tempLayer) {
|
|
76
|
+
const source = feature.tempLayer.getSource();
|
|
77
|
+
if (source) {
|
|
78
|
+
source.removeFeature(feature);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return (_ctx, _cache) => {
|
|
84
|
+
return reactiveValue.features.length > 0 ? (openBlock(), createBlock(unref(Popup), {
|
|
85
|
+
key: 0,
|
|
86
|
+
map: _ctx.map,
|
|
87
|
+
features: reactiveValue.features,
|
|
88
|
+
postion: reactiveValue.postion,
|
|
89
|
+
onClose: handleClose
|
|
90
|
+
}, null, 8, ["map", "features", "postion"])) : createCommentVNode("", true);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
export {
|
|
95
|
+
_sfc_main as default
|
|
96
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const Identify: import('../../utils').WithInstall<import('vue').DefineComponent<{
|
|
2
|
+
map: import('ym-giscomm-2d/mapView/Map').default;
|
|
3
|
+
pointStyle?: import('ol/style').Style;
|
|
4
|
+
cancePointStyle?: import('ol/style').Style;
|
|
5
|
+
lineStyle?: import('ol/style').Style;
|
|
6
|
+
canceLineStyle?: import('ol/style').Style;
|
|
7
|
+
polygonStyle?: import('ol/style').Style;
|
|
8
|
+
cancePolygonStyle?: import('ol/style').Style;
|
|
9
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
10
|
+
map: import('ym-giscomm-2d/mapView/Map').default;
|
|
11
|
+
pointStyle?: import('ol/style').Style;
|
|
12
|
+
cancePointStyle?: import('ol/style').Style;
|
|
13
|
+
lineStyle?: import('ol/style').Style;
|
|
14
|
+
canceLineStyle?: import('ol/style').Style;
|
|
15
|
+
polygonStyle?: import('ol/style').Style;
|
|
16
|
+
cancePolygonStyle?: import('ol/style').Style;
|
|
17
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>>;
|
|
18
|
+
export default Identify;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as OLMap } from 'ym-giscomm-2d/mapView/Map';
|
|
2
|
+
import { default as Style } from 'ol/style/Style';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
map: OLMap;
|
|
5
|
+
pointStyle?: Style;
|
|
6
|
+
lineStyle?: Style;
|
|
7
|
+
polygonStyle?: Style;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
10
|
+
uploadRef: unknown;
|
|
11
|
+
triggerRef: unknown;
|
|
12
|
+
}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { ElUpload, ElButton } from "element-plus/es";
|
|
2
|
+
import "element-plus/es/components/base/style/css";
|
|
3
|
+
import "element-plus/es/components/upload/style/css";
|
|
4
|
+
import "element-plus/es/components/button/style/css";
|
|
5
|
+
import { defineComponent, ref, onMounted, createElementBlock, openBlock, withDirectives, createVNode, withCtx, vShow } from "vue";
|
|
6
|
+
import { ElLoading, ElMessage } from "element-plus";
|
|
7
|
+
import { importFile } from "../../http/SpaceFile.js";
|
|
8
|
+
import { getEsriSpatialReference } from "ym-giscomm-2d/utils/EsriUtil";
|
|
9
|
+
import Feature from "ym-giscomm-2d/entity/Feature";
|
|
10
|
+
import WKT from "../../node_modules/.pnpm/ol@9.2.4/node_modules/ol/format/WKT.js";
|
|
11
|
+
import GeoJSON from "../../node_modules/.pnpm/ol@9.2.4/node_modules/ol/format/GeoJSON.js";
|
|
12
|
+
import { getSelectPointStyle, getSelectLineStyle, getSelectPolygonStyle } from "ym-giscomm-2d/style/StyleManager";
|
|
13
|
+
import { union } from "ym-giscomm-2d/utils/GeometryUtil";
|
|
14
|
+
import { toGeoJSON } from "ym-giscomm-2d/conver/kml";
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
|
+
__name: "Import",
|
|
17
|
+
props: {
|
|
18
|
+
map: {},
|
|
19
|
+
pointStyle: {},
|
|
20
|
+
lineStyle: {},
|
|
21
|
+
polygonStyle: {}
|
|
22
|
+
},
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const pointStyle = props.pointStyle || getSelectPointStyle();
|
|
26
|
+
const lineStyle = props.lineStyle || getSelectLineStyle();
|
|
27
|
+
const polygonStyle = props.polygonStyle || getSelectPolygonStyle();
|
|
28
|
+
const uploadRef = ref(null);
|
|
29
|
+
onMounted(() => {
|
|
30
|
+
var _a;
|
|
31
|
+
(_a = uploadRef.value) == null ? void 0 : _a.$el.querySelector("input").click();
|
|
32
|
+
});
|
|
33
|
+
async function fileChange(uploadFile) {
|
|
34
|
+
if (!uploadFile.raw) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const extName = uploadFile.name.split(".")[uploadFile.name.split(".").length - 1].toLowerCase();
|
|
38
|
+
const loadingInstance = ElLoading.service({ text: "正在解析文件...", background: "rgba(0, 0, 0, 0.5)", target: props.map.getTarget() });
|
|
39
|
+
try {
|
|
40
|
+
if (extName == "zip") {
|
|
41
|
+
const res = await importFile(uploadFile.raw, void 0, getEsriSpatialReference(props.map.getView().getProjection().getCode()));
|
|
42
|
+
showImportResult(res);
|
|
43
|
+
} else if (extName == "kml" || extName == "kmz") {
|
|
44
|
+
let features = await toGeoJSON(uploadFile.raw, null);
|
|
45
|
+
showKmlImportResult(features);
|
|
46
|
+
}
|
|
47
|
+
loadingInstance.close();
|
|
48
|
+
} catch (err) {
|
|
49
|
+
loadingInstance.close();
|
|
50
|
+
ElMessage.error("解析文件失败");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function showKmlImportResult(features) {
|
|
54
|
+
var _a;
|
|
55
|
+
if (!features) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
var geoJsonFormat = new GeoJSON();
|
|
59
|
+
let unionGeometry = null;
|
|
60
|
+
for (const item of features.features) {
|
|
61
|
+
const feature = geoJsonFormat.readFeature(item, null);
|
|
62
|
+
const geometry = feature.getGeometry();
|
|
63
|
+
if (geometry) {
|
|
64
|
+
let { templayer, style } = getStyle(geometry.getType());
|
|
65
|
+
feature.setStyle(style);
|
|
66
|
+
feature.isSelected = true;
|
|
67
|
+
feature.fromType = "import";
|
|
68
|
+
(_a = templayer.getSource()) == null ? void 0 : _a.addFeature(feature);
|
|
69
|
+
if (unionGeometry) {
|
|
70
|
+
unionGeometry = union(unionGeometry, geometry);
|
|
71
|
+
} else {
|
|
72
|
+
unionGeometry = geometry;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (unionGeometry) {
|
|
77
|
+
props.map.getView().locationGeometry(unionGeometry);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function showImportResult(res) {
|
|
81
|
+
var _a;
|
|
82
|
+
if (!res || !res.features || res.features.length == 0) {
|
|
83
|
+
ElMessage.error("解析文件失败");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const wkt = new WKT();
|
|
87
|
+
let { templayer, style } = getStyle(res.geoType);
|
|
88
|
+
let features = [];
|
|
89
|
+
let unionGeometry = null;
|
|
90
|
+
for (const item of res.features) {
|
|
91
|
+
const feature = new Feature();
|
|
92
|
+
feature.setProperties(
|
|
93
|
+
item.attributes
|
|
94
|
+
);
|
|
95
|
+
const geometry = wkt.readGeometry(item.wkt);
|
|
96
|
+
feature.setGeometry(geometry);
|
|
97
|
+
feature.setStyle(style);
|
|
98
|
+
feature.isSelected = true;
|
|
99
|
+
feature.fromType = "import";
|
|
100
|
+
features.push(feature);
|
|
101
|
+
if (unionGeometry) {
|
|
102
|
+
unionGeometry = union(unionGeometry, geometry);
|
|
103
|
+
} else {
|
|
104
|
+
unionGeometry = geometry;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
(_a = templayer.getSource()) == null ? void 0 : _a.addFeatures(features);
|
|
108
|
+
if (unionGeometry) {
|
|
109
|
+
props.map.getView().locationGeometry(unionGeometry);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function getStyle(geoType) {
|
|
113
|
+
let templayer = props.map.getPolygonTempLayer();
|
|
114
|
+
let style = polygonStyle;
|
|
115
|
+
switch (geoType) {
|
|
116
|
+
case "MultiPolygon":
|
|
117
|
+
case "Polygon":
|
|
118
|
+
templayer = props.map.getPolygonTempLayer();
|
|
119
|
+
style = polygonStyle;
|
|
120
|
+
break;
|
|
121
|
+
case "MultiLineString":
|
|
122
|
+
case "LineString":
|
|
123
|
+
templayer = props.map.getLineTempLayer();
|
|
124
|
+
style = lineStyle;
|
|
125
|
+
break;
|
|
126
|
+
case "MultiPoint":
|
|
127
|
+
case "Point":
|
|
128
|
+
templayer = props.map.getPointTempLayer();
|
|
129
|
+
style = pointStyle;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
return { templayer, style };
|
|
133
|
+
}
|
|
134
|
+
return (_ctx, _cache) => {
|
|
135
|
+
const _component_el_button = ElButton;
|
|
136
|
+
const _component_el_upload = ElUpload;
|
|
137
|
+
return openBlock(), createElementBlock("div", null, [
|
|
138
|
+
withDirectives(createVNode(_component_el_upload, {
|
|
139
|
+
ref_key: "uploadRef",
|
|
140
|
+
ref: uploadRef,
|
|
141
|
+
accept: ".zip,.7z,.rar,.tar,.kml,.kmz",
|
|
142
|
+
limit: 1,
|
|
143
|
+
"auto-upload": false,
|
|
144
|
+
onChange: fileChange
|
|
145
|
+
}, {
|
|
146
|
+
trigger: withCtx(() => [
|
|
147
|
+
createVNode(_component_el_button, {
|
|
148
|
+
type: "primary",
|
|
149
|
+
ref: "triggerRef"
|
|
150
|
+
}, null, 512)
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
}, 512), [
|
|
154
|
+
[vShow, false]
|
|
155
|
+
])
|
|
156
|
+
]);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
export {
|
|
161
|
+
_sfc_main as default
|
|
162
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const Import: import('../../utils').WithInstall<import('vue').DefineComponent<{
|
|
2
|
+
map: import('ym-giscomm-2d/mapView/Map').default;
|
|
3
|
+
pointStyle?: import('ol/style').Style;
|
|
4
|
+
lineStyle?: import('ol/style').Style;
|
|
5
|
+
polygonStyle?: import('ol/style').Style;
|
|
6
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
7
|
+
map: import('ym-giscomm-2d/mapView/Map').default;
|
|
8
|
+
pointStyle?: import('ol/style').Style;
|
|
9
|
+
lineStyle?: import('ol/style').Style;
|
|
10
|
+
polygonStyle?: import('ol/style').Style;
|
|
11
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
12
|
+
uploadRef: unknown;
|
|
13
|
+
triggerRef: unknown;
|
|
14
|
+
}, HTMLDivElement>>;
|
|
15
|
+
export default Import;
|