ym-giswidget-2d 1.0.82 → 1.0.83
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.
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { default as OLMap } from 'ym-gis-2d/mapView/Map';
|
|
2
|
+
import { DrawEvent, DrawGeometryType, ShEvent } from 'ym-gis-2d/interaction/Draw';
|
|
3
|
+
import { default as Feature } from 'ym-gis-2d/entity/Feature';
|
|
2
4
|
import { default as IStyle } from 'ym-gis-2d/entity/style/IStyle';
|
|
3
5
|
type __VLS_Props = {
|
|
4
6
|
map: OLMap;
|
|
5
|
-
geometryType?:
|
|
7
|
+
geometryType?: DrawGeometryType;
|
|
6
8
|
style?: IStyle;
|
|
7
9
|
};
|
|
8
10
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
-
|
|
11
|
+
drawStart: (event: DrawEvent) => any;
|
|
12
|
+
drawEnd: (feature: Feature | undefined) => any;
|
|
13
|
+
drawAbort: (event: DrawEvent) => any;
|
|
14
|
+
drawAddPoint: (event: ShEvent) => any;
|
|
15
|
+
drawMoving: (event: DrawEvent) => any;
|
|
10
16
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
|
|
17
|
+
onDrawStart?: ((event: DrawEvent) => any) | undefined;
|
|
18
|
+
onDrawEnd?: ((feature: Feature | undefined) => any) | undefined;
|
|
19
|
+
onDrawAbort?: ((event: DrawEvent) => any) | undefined;
|
|
20
|
+
onDrawAddPoint?: ((event: ShEvent) => any) | undefined;
|
|
21
|
+
onDrawMoving?: ((event: DrawEvent) => any) | undefined;
|
|
12
22
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
23
|
export default _default;
|
|
@@ -7,14 +7,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7
7
|
geometryType: {},
|
|
8
8
|
style: {}
|
|
9
9
|
},
|
|
10
|
-
emits: ["drawEnd"],
|
|
10
|
+
emits: ["drawStart", "drawAddPoint", "drawMoving", "drawEnd", "drawAbort"],
|
|
11
11
|
setup(__props, { emit: __emit }) {
|
|
12
12
|
const emit = __emit;
|
|
13
13
|
const props = __props;
|
|
14
|
-
watch(() => props.geometryType, (
|
|
14
|
+
watch(() => props.geometryType, () => {
|
|
15
15
|
init();
|
|
16
16
|
});
|
|
17
|
-
watch(() => props.map.currentEditLayer, (
|
|
17
|
+
watch(() => props.map.currentEditLayer, () => {
|
|
18
18
|
init();
|
|
19
19
|
});
|
|
20
20
|
onMounted(() => {
|
|
@@ -52,6 +52,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
style: props.style
|
|
53
53
|
});
|
|
54
54
|
props.map.interactionManager.addInteraction("draw", draw);
|
|
55
|
+
draw.on("drawStart", (event) => {
|
|
56
|
+
emit("drawStart", event);
|
|
57
|
+
});
|
|
58
|
+
draw.on("drawAddPoint", (event) => {
|
|
59
|
+
emit("drawAddPoint", event);
|
|
60
|
+
});
|
|
61
|
+
draw.on("drawMoving", (event) => {
|
|
62
|
+
emit("drawMoving", event);
|
|
63
|
+
});
|
|
55
64
|
draw.on("drawEnd", (event) => {
|
|
56
65
|
const features = event.feature;
|
|
57
66
|
if (features) {
|
|
@@ -61,18 +70,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
70
|
}
|
|
62
71
|
emit("drawEnd", features);
|
|
63
72
|
});
|
|
73
|
+
draw.on("drawAbort", (event) => {
|
|
74
|
+
emit("drawAbort", event);
|
|
75
|
+
});
|
|
64
76
|
}
|
|
65
77
|
function getTempLayerByGeometryType(geometryType) {
|
|
66
78
|
switch (geometryType) {
|
|
67
79
|
case "point":
|
|
68
80
|
return props.map.getPointTempLayer();
|
|
69
81
|
case "polyline":
|
|
82
|
+
case "dashline":
|
|
83
|
+
case "arrowline":
|
|
84
|
+
case "straightarrow":
|
|
70
85
|
return props.map.getLineTempLayer();
|
|
71
86
|
case "polygon":
|
|
72
|
-
return props.map.getPolygonTempLayer();
|
|
73
87
|
case "rectangle":
|
|
74
|
-
return props.map.getPolygonTempLayer();
|
|
75
88
|
case "circle":
|
|
89
|
+
case "arrow":
|
|
76
90
|
return props.map.getPolygonTempLayer();
|
|
77
91
|
default:
|
|
78
92
|
return void 0;
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
export declare const Draw: import('../../utils').WithInstall<import('vue').DefineComponent<{
|
|
2
2
|
map: import('ym-gis-2d/mapView/Map').default;
|
|
3
|
-
geometryType?:
|
|
3
|
+
geometryType?: import('ym-gis-2d/interaction/Draw').DrawGeometryType;
|
|
4
4
|
style?: import('ym-gis-2d/entity/style/IStyle').default;
|
|
5
5
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
-
|
|
6
|
+
drawStart: (event: import('ym-gis-2d/interaction/Draw').DrawEvent) => any;
|
|
7
|
+
drawEnd: (feature: import('ym-gis-2d/entity/Feature').default | undefined) => any;
|
|
8
|
+
drawAbort: (event: import('ym-gis-2d/interaction/Draw').DrawEvent) => any;
|
|
9
|
+
drawAddPoint: (event: import('ym-gis-2d/interaction/Draw').ShEvent) => any;
|
|
10
|
+
drawMoving: (event: import('ym-gis-2d/interaction/Draw').DrawEvent) => any;
|
|
7
11
|
}, string, import('vue').PublicProps, Readonly<{
|
|
8
12
|
map: import('ym-gis-2d/mapView/Map').default;
|
|
9
|
-
geometryType?:
|
|
13
|
+
geometryType?: import('ym-gis-2d/interaction/Draw').DrawGeometryType;
|
|
10
14
|
style?: import('ym-gis-2d/entity/style/IStyle').default;
|
|
11
15
|
}> & Readonly<{
|
|
12
|
-
|
|
16
|
+
onDrawStart?: ((event: import('ym-gis-2d/interaction/Draw').DrawEvent) => any) | undefined;
|
|
17
|
+
onDrawEnd?: ((feature: import('ym-gis-2d/entity/Feature').default | undefined) => any) | undefined;
|
|
18
|
+
onDrawAbort?: ((event: import('ym-gis-2d/interaction/Draw').DrawEvent) => any) | undefined;
|
|
19
|
+
onDrawAddPoint?: ((event: import('ym-gis-2d/interaction/Draw').ShEvent) => any) | undefined;
|
|
20
|
+
onDrawMoving?: ((event: import('ym-gis-2d/interaction/Draw').DrawEvent) => any) | undefined;
|
|
13
21
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>>;
|
|
14
22
|
export default Draw;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Legend.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const _Legend = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const _Legend = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8a0f0076"]]);
|
|
5
5
|
export {
|
|
6
6
|
_Legend as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.legend-container[data-v-
|
|
1
|
+
.legend-container[data-v-8a0f0076] {
|
|
2
2
|
position: absolute;
|
|
3
3
|
left: 10px;
|
|
4
4
|
top: 10px;
|
|
5
5
|
background-color: var(--system-primary-color);
|
|
6
6
|
border: 1px solid var(--system-primary-border-color);
|
|
7
7
|
}
|
|
8
|
-
.legend-container[data-v-
|
|
8
|
+
.legend-container[data-v-8a0f0076] .legend {
|
|
9
9
|
color: var(--system-primary-text-color);
|
|
10
10
|
margin: 9px;
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ym-giswidget-2d",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.83",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"element-plus": "^2.9.0",
|
|
11
11
|
"jszip": "^3.10.1",
|
|
12
12
|
"ol": "^9.2.4",
|
|
13
|
-
"ym-gis-2d": "1.0.
|
|
13
|
+
"ym-gis-2d": "1.0.53"
|
|
14
14
|
}
|
|
15
15
|
}
|