ym-giswidget-2d 1.0.47 → 1.0.48

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.
@@ -4,9 +4,10 @@ import "element-plus/es/components/form/style/css";
4
4
  import "element-plus/es/components/form-item/style/css";
5
5
  import "element-plus/es/components/select/style/css";
6
6
  import "element-plus/es/components/option/style/css";
7
- import { defineComponent, reactive, onMounted, onUnmounted, withDirectives, createBlock, openBlock, withCtx, createVNode, unref, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, vShow } from "vue";
7
+ import { defineComponent, reactive, onMounted, onUnmounted, withDirectives, createBlock, openBlock, withCtx, createVNode, unref, createCommentVNode, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, vShow } from "vue";
8
8
  import DraggablePanel from "../../panel/DraggablePanel.vue.js";
9
9
  import Draw from "ym-gis-2d/interaction/Draw";
10
+ import { getArea } from "ym-gis-2d/utils/GeometryUtil";
10
11
  const _hoisted_1 = { class: "el-current-value" };
11
12
  const _hoisted_2 = { class: "el-current-unit" };
12
13
  const _hoisted_3 = { class: "el-current-value" };
@@ -66,6 +67,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
66
67
  features.fromType = "draw";
67
68
  }
68
69
  });
70
+ draw.on("drawaddpoint", (event) => {
71
+ const features = event.feature;
72
+ if (features) {
73
+ features.isSelected = true;
74
+ features.tempLayer = tempLayer;
75
+ features.fromType = "draw";
76
+ }
77
+ });
78
+ draw.on("drawmoving", (event) => {
79
+ var _a;
80
+ if (!event.coordinates || event.coordinates.length < 2) {
81
+ return;
82
+ }
83
+ const geometry = (_a = event.feature) == null ? void 0 : _a.getGeometry();
84
+ const area = getArea(geometry, props.map.getView().getProjection());
85
+ console.log(area);
86
+ });
69
87
  });
70
88
  onUnmounted(() => {
71
89
  reactiveValue.visible = false;
@@ -82,12 +100,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
82
100
  return withDirectives((openBlock(), createBlock(DraggablePanel, {
83
101
  ref: "areaMeasureDom",
84
102
  class: "el-current",
85
- title: "面积量测",
103
+ title: "面积测量",
86
104
  drag: true,
87
105
  width: 300,
88
- height: 267,
106
+ height: 268,
89
107
  showMaximize: false,
90
- showOk: true,
108
+ showOk: false,
109
+ "show-cancel": true,
110
+ "cancel-text": "关闭",
91
111
  onClose: handleClose
92
112
  }, {
93
113
  default: withCtx(() => [
@@ -128,7 +148,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
128
148
  ]),
129
149
  _: 1
130
150
  }),
131
- createVNode(_component_el_form_item, {
151
+ unref(reactiveValue).allArea > 0 ? (openBlock(), createBlock(_component_el_form_item, {
152
+ key: 0,
132
153
  label: "面积",
133
154
  prop: "allArea"
134
155
  }, {
@@ -140,8 +161,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
140
161
  ];
141
162
  }),
142
163
  _: 1
143
- }),
144
- createVNode(_component_el_form_item, {
164
+ })) : createCommentVNode("", true),
165
+ unref(reactiveValue).allPerimeter > 0 ? (openBlock(), createBlock(_component_el_form_item, {
166
+ key: 1,
145
167
  label: "周长",
146
168
  prop: "allArea"
147
169
  }, {
@@ -153,7 +175,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
153
175
  ];
154
176
  }),
155
177
  _: 1
156
- })
178
+ })) : createCommentVNode("", true)
157
179
  ]),
158
180
  _: 1
159
181
  }, 8, ["model"])
@@ -1,7 +1,7 @@
1
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-3c8586f4"]]);
4
+ const _HorizontallyTopToolbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f42f3be5"]]);
5
5
  export {
6
6
  _HorizontallyTopToolbar as default
7
7
  };
@@ -1,4 +1,4 @@
1
- .toolbar-contain[data-v-3c8586f4] {
1
+ .toolbar-contain[data-v-f42f3be5] {
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-3c8586f4] {
12
+ .toolbar-contain .toolbar-item-contain[data-v-f42f3be5] {
13
13
  height: 43px;
14
14
  line-height: 43px;
15
15
  display: flex;
@@ -18,41 +18,42 @@
18
18
  align-items: center;
19
19
  cursor: pointer;
20
20
  }
21
- .toolbar-contain .toolbar-item-contain .toolbar-item[data-v-3c8586f4] {
21
+ .toolbar-contain .toolbar-item-contain .toolbar-item[data-v-f42f3be5] {
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-3c8586f4] {
26
+ .toolbar-contain .toolbar-item-contain .toolbar-icon[data-v-f42f3be5] {
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-3c8586f4] {
31
+ .toolbar-contain .toolbar-item-contain .toolbar-children-contain[data-v-f42f3be5] {
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
+ margin: 0px -1px;
37
38
  }
38
- .toolbar-contain .active[data-v-3c8586f4] {
39
+ .toolbar-contain .active[data-v-f42f3be5] {
39
40
  color: var(--system-primary-text-active-color);
40
41
  }
41
- .toolbar-contain .toolbar-split[data-v-3c8586f4] {
42
+ .toolbar-contain .toolbar-split[data-v-f42f3be5] {
42
43
  width: 2px;
43
44
  height: 20px;
44
45
  background: #7EA08E;
45
46
  margin: auto;
46
47
  opacity: 0.5;
47
48
  }
48
- .toolbar-contain .toolbar-h-split[data-v-3c8586f4] {
49
+ .toolbar-contain .toolbar-h-split[data-v-f42f3be5] {
49
50
  height: 2px;
50
51
  background: #7EA08E;
51
52
  margin: auto;
52
53
  opacity: 0.5;
53
54
  margin: 0px 10px;
54
55
  }
55
- .component-position[data-v-3c8586f4] {
56
+ .component-position[data-v-f42f3be5] {
56
57
  position: absolute;
57
58
  right: 300px;
58
59
  }
@@ -2,12 +2,12 @@ export declare const Identify: import('../../utils').WithInstall<{
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
3
  map: import('ym-gis-2d/mapView/Map').default;
4
4
  selectLayers?: import('ym-gis-2d/entity').IMapService[];
5
- pointStyle?: import('ym-gis-2d/entity/IStyle').default;
6
- cancePointStyle?: import('ym-gis-2d/entity/IStyle').default;
7
- lineStyle?: import('ym-gis-2d/entity/IStyle').default;
8
- canceLineStyle?: import('ym-gis-2d/entity/IStyle').default;
9
- polygonStyle?: import('ym-gis-2d/entity/IStyle').default;
10
- cancePolygonStyle?: import('ym-gis-2d/entity/IStyle').default;
5
+ pointStyle?: IStyle;
6
+ cancePointStyle?: IStyle;
7
+ lineStyle?: IStyle;
8
+ canceLineStyle?: IStyle;
9
+ polygonStyle?: IStyle;
10
+ cancePolygonStyle?: IStyle;
11
11
  }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
12
12
  P: {};
13
13
  B: {};
@@ -18,12 +18,12 @@ export declare const Identify: import('../../utils').WithInstall<{
18
18
  }, Readonly<{
19
19
  map: import('ym-gis-2d/mapView/Map').default;
20
20
  selectLayers?: import('ym-gis-2d/entity').IMapService[];
21
- pointStyle?: import('ym-gis-2d/entity/IStyle').default;
22
- cancePointStyle?: import('ym-gis-2d/entity/IStyle').default;
23
- lineStyle?: import('ym-gis-2d/entity/IStyle').default;
24
- canceLineStyle?: import('ym-gis-2d/entity/IStyle').default;
25
- polygonStyle?: import('ym-gis-2d/entity/IStyle').default;
26
- cancePolygonStyle?: import('ym-gis-2d/entity/IStyle').default;
21
+ pointStyle?: IStyle;
22
+ cancePointStyle?: IStyle;
23
+ lineStyle?: IStyle;
24
+ canceLineStyle?: IStyle;
25
+ polygonStyle?: IStyle;
26
+ cancePolygonStyle?: IStyle;
27
27
  }> & Readonly<{}>, {}, {}, {}, {}, {}>;
28
28
  __isFragment?: never;
29
29
  __isTeleport?: never;
@@ -31,12 +31,12 @@ export declare const Identify: import('../../utils').WithInstall<{
31
31
  } & import('vue').ComponentOptionsBase<Readonly<{
32
32
  map: import('ym-gis-2d/mapView/Map').default;
33
33
  selectLayers?: import('ym-gis-2d/entity').IMapService[];
34
- pointStyle?: import('ym-gis-2d/entity/IStyle').default;
35
- cancePointStyle?: import('ym-gis-2d/entity/IStyle').default;
36
- lineStyle?: import('ym-gis-2d/entity/IStyle').default;
37
- canceLineStyle?: import('ym-gis-2d/entity/IStyle').default;
38
- polygonStyle?: import('ym-gis-2d/entity/IStyle').default;
39
- cancePolygonStyle?: import('ym-gis-2d/entity/IStyle').default;
34
+ pointStyle?: IStyle;
35
+ cancePointStyle?: IStyle;
36
+ lineStyle?: IStyle;
37
+ canceLineStyle?: IStyle;
38
+ polygonStyle?: IStyle;
39
+ cancePolygonStyle?: IStyle;
40
40
  }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
41
41
  $slots: {
42
42
  footer?(_: {
@@ -391,8 +391,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
391
391
  resetViewProjection: (projection: string) => void;
392
392
  sortTemLayer: () => void;
393
393
  getExtent: () => import('ol/extent').Extent;
394
- addWKT: (wkt: string, proj: string, tag?: string, location?: boolean, properties?: any, style?: import('ym-gis-2d/entity/IStyle').default) => import('ym-gis-2d/entity/Feature').default | undefined;
395
- addWKTs: (wkts: string[], proj: string, tag?: string, location?: boolean, style?: import('ym-gis-2d/entity/IStyle').default, properties?: any) => import('ym-gis-2d/entity/Feature').default[] | undefined;
394
+ addWKT: (wkt: string, proj: string, tag?: string, location?: boolean, properties?: any, style?: import('ym-gis-2d/entity/style/IStyle').default) => import('ym-gis-2d/entity/Feature').default | undefined;
395
+ addWKTs: (wkts: string[], proj: string, tag?: string, location?: boolean, style?: import('ym-gis-2d/entity/style/IStyle').default, properties?: any) => import('ym-gis-2d/entity/Feature').default[] | undefined;
396
396
  locationWKT: (wkt: string, proj?: string, ratio?: number, isFlash?: boolean) => void;
397
397
  locationWKTs: (wkts: string[], proj?: string, ratio?: number, isFlash?: boolean) => void;
398
398
  locationGeometry: (geometry: import('ol/geom').Geometry, proj?: string, ratio?: number, isFlash?: boolean) => void;
@@ -390,8 +390,8 @@ export declare const MapView: import('../../utils').WithInstall<import('vue').De
390
390
  resetViewProjection: (projection: string) => void;
391
391
  sortTemLayer: () => void;
392
392
  getExtent: () => import('ol/extent').Extent;
393
- addWKT: (wkt: string, proj: string, tag?: string, location?: boolean, properties?: any, style?: import('ym-gis-2d/entity/IStyle').default) => import('ym-gis-2d/entity/Feature').default | undefined;
394
- addWKTs: (wkts: string[], proj: string, tag?: string, location?: boolean, style?: import('ym-gis-2d/entity/IStyle').default, properties?: any) => import('ym-gis-2d/entity/Feature').default[] | undefined;
393
+ addWKT: (wkt: string, proj: string, tag?: string, location?: boolean, properties?: any, style?: import('ym-gis-2d/entity/style/IStyle').default) => import('ym-gis-2d/entity/Feature').default | undefined;
394
+ addWKTs: (wkts: string[], proj: string, tag?: string, location?: boolean, style?: import('ym-gis-2d/entity/style/IStyle').default, properties?: any) => import('ym-gis-2d/entity/Feature').default[] | undefined;
395
395
  locationWKT: (wkt: string, proj?: string, ratio?: number, isFlash?: boolean) => void;
396
396
  locationWKTs: (wkts: string[], proj?: string, ratio?: number, isFlash?: boolean) => void;
397
397
  locationGeometry: (geometry: import('ol/geom').Geometry, proj?: string, ratio?: number, isFlash?: boolean) => void;
@@ -397,8 +397,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
397
397
  resetViewProjection: (projection: string) => void;
398
398
  sortTemLayer: () => void;
399
399
  getExtent: () => import('ol/extent').Extent;
400
- addWKT: (wkt: string, proj: string, tag?: string, location?: boolean, properties?: any, style?: import('ym-gis-2d/entity/IStyle').default) => import('ym-gis-2d/entity/Feature').default | undefined;
401
- addWKTs: (wkts: string[], proj: string, tag?: string, location?: boolean, style?: import('ym-gis-2d/entity/IStyle').default, properties?: any) => import('ym-gis-2d/entity/Feature').default[] | undefined;
400
+ addWKT: (wkt: string, proj: string, tag?: string, location?: boolean, properties?: any, style?: import('ym-gis-2d/entity/style/IStyle').default) => import('ym-gis-2d/entity/Feature').default | undefined;
401
+ addWKTs: (wkts: string[], proj: string, tag?: string, location?: boolean, style?: import('ym-gis-2d/entity/style/IStyle').default, properties?: any) => import('ym-gis-2d/entity/Feature').default[] | undefined;
402
402
  locationWKT: (wkt: string, proj?: string, ratio?: number, isFlash?: boolean) => void;
403
403
  locationWKTs: (wkts: string[], proj?: string, ratio?: number, isFlash?: boolean) => void;
404
404
  locationGeometry: (geometry: import('ol/geom').Geometry, proj?: string, ratio?: number, isFlash?: boolean) => void;
@@ -393,8 +393,8 @@ export declare const MultiScreen: import('../../utils').WithInstall<import('vue'
393
393
  resetViewProjection: (projection: string) => void;
394
394
  sortTemLayer: () => void;
395
395
  getExtent: () => import('ol/extent').Extent;
396
- addWKT: (wkt: string, proj: string, tag?: string, location?: boolean, properties?: any, style?: import('ym-gis-2d/entity/IStyle').default) => import('ym-gis-2d/entity/Feature').default | undefined;
397
- addWKTs: (wkts: string[], proj: string, tag?: string, location?: boolean, style?: import('ym-gis-2d/entity/IStyle').default, properties?: any) => import('ym-gis-2d/entity/Feature').default[] | undefined;
396
+ addWKT: (wkt: string, proj: string, tag?: string, location?: boolean, properties?: any, style?: import('ym-gis-2d/entity/style/IStyle').default) => import('ym-gis-2d/entity/Feature').default | undefined;
397
+ addWKTs: (wkts: string[], proj: string, tag?: string, location?: boolean, style?: import('ym-gis-2d/entity/style/IStyle').default, properties?: any) => import('ym-gis-2d/entity/Feature').default[] | undefined;
398
398
  locationWKT: (wkt: string, proj?: string, ratio?: number, isFlash?: boolean) => void;
399
399
  locationWKTs: (wkts: string[], proj?: string, ratio?: number, isFlash?: boolean) => void;
400
400
  locationGeometry: (geometry: import('ol/geom').Geometry, proj?: string, ratio?: number, isFlash?: boolean) => void;
@@ -16,7 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  cancePolygonStyle: {},
17
17
  selectLayers: {},
18
18
  showLoading: { type: Boolean, default: true },
19
- selectType: { default: "point" }
19
+ selectType: { default: "rectangle" }
20
20
  },
21
21
  setup(__props, { expose: __expose }) {
22
22
  const props = __props;
@@ -1,11 +1,11 @@
1
1
  export declare const Select: import('../../utils').WithInstall<import('vue').DefineComponent<{
2
2
  map: import('ym-gis-2d/mapView/Map').default;
3
- pointStyle?: import('ym-gis-2d/entity/IStyle').default;
4
- cancePointStyle?: import('ym-gis-2d/entity/IStyle').default;
5
- lineStyle?: import('ym-gis-2d/entity/IStyle').default;
6
- canceLineStyle?: import('ym-gis-2d/entity/IStyle').default;
7
- polygonStyle?: import('ym-gis-2d/entity/IStyle').default;
8
- cancePolygonStyle?: import('ym-gis-2d/entity/IStyle').default;
3
+ pointStyle?: IStyle;
4
+ cancePointStyle?: IStyle;
5
+ lineStyle?: IStyle;
6
+ canceLineStyle?: IStyle;
7
+ polygonStyle?: IStyle;
8
+ cancePolygonStyle?: IStyle;
9
9
  selectLayers?: import('ym-gis-2d/entity').IMapService[];
10
10
  showLoading?: boolean;
11
11
  selectType?: "point" | "pointermove" | "polyline" | "polygon" | "rectangle" | "circle";
@@ -135,12 +135,12 @@ export declare const Select: import('../../utils').WithInstall<import('vue').Def
135
135
  }[] | undefined;
136
136
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
137
137
  map: import('ym-gis-2d/mapView/Map').default;
138
- pointStyle?: import('ym-gis-2d/entity/IStyle').default;
139
- cancePointStyle?: import('ym-gis-2d/entity/IStyle').default;
140
- lineStyle?: import('ym-gis-2d/entity/IStyle').default;
141
- canceLineStyle?: import('ym-gis-2d/entity/IStyle').default;
142
- polygonStyle?: import('ym-gis-2d/entity/IStyle').default;
143
- cancePolygonStyle?: import('ym-gis-2d/entity/IStyle').default;
138
+ pointStyle?: IStyle;
139
+ cancePointStyle?: IStyle;
140
+ lineStyle?: IStyle;
141
+ canceLineStyle?: IStyle;
142
+ polygonStyle?: IStyle;
143
+ cancePolygonStyle?: IStyle;
144
144
  selectLayers?: import('ym-gis-2d/entity').IMapService[];
145
145
  showLoading?: boolean;
146
146
  selectType?: "point" | "pointermove" | "polyline" | "polygon" | "rectangle" | "circle";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ym-giswidget-2d",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
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.26"
13
+ "ym-gis-2d": "1.0.27"
14
14
  }
15
15
  }