ym-giswidget-2d 1.0.47 → 1.0.49

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,8 +1,27 @@
1
1
  import { default as OLMap } from 'ym-gis-2d/mapView/Map';
2
+ import { default as IFont } from 'ym-gis-2d/entity/IFont';
2
3
  type __VLS_Props = {
3
4
  map: OLMap;
5
+ color?: Array<number> | string;
6
+ opacity?: number;
7
+ outlineColor?: Array<number> | string;
8
+ outlineOpacity?: number;
9
+ outlineWidth?: number;
10
+ font?: IFont;
11
+ unit?: "square-meters" | "square-kilometers" | "mu" | "hectare";
12
+ precision?: number;
13
+ showLabel?: boolean;
14
+ spheroid?: boolean;
4
15
  };
5
- 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, {
16
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ activeInteraction: (...args: any[]) => void;
18
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ onActiveInteraction?: ((...args: any[]) => any) | undefined;
20
+ }>, {
21
+ precision: number;
22
+ showLabel: boolean;
23
+ spheroid: boolean;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
6
25
  areaMeasureDom: ({
7
26
  $: import('vue').ComponentInternalInstance;
8
27
  $data: {};
@@ -4,9 +4,11 @@ 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, computed, onMounted, toRaw, 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
- import Draw from "ym-gis-2d/interaction/Draw";
9
+ import AreaMeasure from "ym-gis-2d/interaction/AreaMeasure";
10
+ import measureUnits from "ym-gis-2d/entity/measure/AreaMeasureUnits";
11
+ import { polygonToLines, getLength } from "ym-gis-2d/utils/GeometryUtil";
10
12
  const _hoisted_1 = { class: "el-current-value" };
11
13
  const _hoisted_2 = { class: "el-current-unit" };
12
14
  const _hoisted_3 = { class: "el-current-value" };
@@ -14,65 +16,93 @@ const _hoisted_4 = { class: "el-current-unit" };
14
16
  const _sfc_main = /* @__PURE__ */ defineComponent({
15
17
  __name: "AreaMeasurement",
16
18
  props: {
17
- map: {}
19
+ map: {},
20
+ color: {},
21
+ opacity: {},
22
+ outlineColor: {},
23
+ outlineOpacity: {},
24
+ outlineWidth: {},
25
+ font: {},
26
+ unit: {},
27
+ precision: { default: 2 },
28
+ showLabel: { type: Boolean, default: true },
29
+ spheroid: { type: Boolean, default: false }
18
30
  },
19
- setup(__props) {
31
+ emits: ["activeInteraction"],
32
+ setup(__props, { emit: __emit }) {
33
+ const emit = __emit;
20
34
  const props = __props;
21
35
  let reactiveValue = reactive({
22
36
  visible: true,
23
37
  allArea: 0,
24
38
  allPerimeter: 0,
25
- measureTypes: [
26
- {
27
- type: "square-meters",
28
- label: "平方米",
29
- persimeterLabel: "米"
30
- },
31
- {
32
- type: "square-kilometers",
33
- label: "平方公里",
34
- persimeterLabel: "千米"
35
- },
36
- {
37
- type: "mu",
38
- label: "亩",
39
- persimeterLabel: "米"
40
- },
41
- {
42
- type: "hectare",
43
- label: "公顷",
44
- persimeterLabel: "千米"
45
- }
46
- ]
39
+ hasArea: 0,
40
+ hasPerimeter: 0
47
41
  });
48
- reactiveValue.currentType = reactiveValue.measureTypes[0];
49
- onMounted(() => {
50
- const tempLayer = props.map.getPolygonTempLayer();
51
- let source = void 0;
52
- const layersource = tempLayer == null ? void 0 : tempLayer.getSource();
53
- if (layersource) {
54
- source = layersource;
42
+ reactiveValue.currentType = measureUnits[0];
43
+ const measureData = computed(() => {
44
+ var _a;
45
+ switch ((_a = reactiveValue.currentType) == null ? void 0 : _a.type) {
46
+ case "square-meters":
47
+ return {
48
+ area: `${reactiveValue.allArea.toFixed(props.precision)}`,
49
+ perimeter: `${reactiveValue.allPerimeter.toFixed(props.precision)}`
50
+ };
51
+ case "square-kilometers":
52
+ return {
53
+ area: `${(reactiveValue.allArea * 1e-6).toFixed(props.precision)}`,
54
+ perimeter: `${(reactiveValue.allPerimeter * 1e-3).toFixed(props.precision)}`
55
+ };
56
+ case "mu":
57
+ return {
58
+ area: `${(reactiveValue.allArea * 15e-4).toFixed(props.precision)}`,
59
+ perimeter: `${reactiveValue.allPerimeter.toFixed(props.precision)}`
60
+ };
61
+ case "hectare":
62
+ return {
63
+ area: `${(reactiveValue.allArea * 1e-4).toFixed(props.precision)}`,
64
+ perimeter: `${(reactiveValue.allPerimeter * 1e-3).toFixed(props.precision)}`
65
+ };
66
+ default:
67
+ return {
68
+ area: `${reactiveValue.allArea.toFixed(props.precision)} `,
69
+ perimeter: `${reactiveValue.allPerimeter.toFixed(props.precision)} `
70
+ };
55
71
  }
56
- const draw = new Draw("polygon", {
57
- source,
58
- tipText: "点击开始测量,双击结束测量"
72
+ });
73
+ onMounted(() => {
74
+ let { map, ...options } = toRaw(props);
75
+ const areaMeasure = new AreaMeasure(options);
76
+ props.map.interactionManager.addInteraction("areaMeasure", areaMeasure);
77
+ areaMeasure.on("measureMoving", (e) => {
78
+ reactiveValue.allArea = reactiveValue.hasArea + e.area;
79
+ const lines = polygonToLines(e.geom);
80
+ if (lines) {
81
+ reactiveValue.allPerimeter = reactiveValue.hasPerimeter + getLength(lines[0], props.map.getView().getProjection());
82
+ }
59
83
  });
60
- props.map.interactionManager.addInteraction("areaMeasure", draw);
61
- draw.on("drawend", (event) => {
62
- const features = event.feature;
63
- if (features) {
64
- features.isSelected = true;
65
- features.tempLayer = tempLayer;
66
- features.fromType = "draw";
84
+ areaMeasure.on("measureEnd", (e) => {
85
+ reactiveValue.hasArea += e.area;
86
+ const lines = polygonToLines(e.geom);
87
+ if (lines) {
88
+ reactiveValue.hasPerimeter += getLength(lines[0], props.map.getView().getProjection());
67
89
  }
68
90
  });
69
91
  });
70
92
  onUnmounted(() => {
71
93
  reactiveValue.visible = false;
94
+ const areaMeasure = props.map.interactionManager.getInteraction("areaMeasure");
95
+ areaMeasure.clearMeasure();
72
96
  props.map.interactionManager.removeInteraction("areaMeasure");
73
97
  });
74
98
  function handleClose() {
75
- reactiveValue.visible = false;
99
+ emit("activeInteraction", { success: false, message: "" });
100
+ }
101
+ function changeUnit() {
102
+ const areaMeasure = props.map.interactionManager.getInteraction("areaMeasure");
103
+ if (reactiveValue.currentType && areaMeasure) {
104
+ areaMeasure.setUnit(reactiveValue.currentType.type);
105
+ }
76
106
  }
77
107
  return (_ctx, _cache) => {
78
108
  const _component_el_option = ElOption;
@@ -82,12 +112,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
82
112
  return withDirectives((openBlock(), createBlock(DraggablePanel, {
83
113
  ref: "areaMeasureDom",
84
114
  class: "el-current",
85
- title: "面积量测",
115
+ title: "面积测量",
86
116
  drag: true,
87
117
  width: 300,
88
- height: 267,
118
+ height: 268,
89
119
  showMaximize: false,
90
- showOk: true,
120
+ showOk: false,
121
+ "show-cancel": true,
122
+ "cancel-text": "关闭",
91
123
  onClose: handleClose
92
124
  }, {
93
125
  default: withCtx(() => [
@@ -112,10 +144,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
112
144
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(reactiveValue).currentType = $event),
113
145
  "value-key": "type",
114
146
  class: "el-current",
115
- "popper-class": "el-current"
147
+ "popper-class": "el-current",
148
+ onChange: changeUnit
116
149
  }, {
117
150
  default: withCtx(() => [
118
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(reactiveValue).measureTypes, (item) => {
151
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(measureUnits), (item) => {
119
152
  return openBlock(), createBlock(_component_el_option, {
120
153
  key: item.type,
121
154
  label: item.label,
@@ -128,32 +161,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
128
161
  ]),
129
162
  _: 1
130
163
  }),
131
- createVNode(_component_el_form_item, {
164
+ unref(reactiveValue).allArea > 0 ? (openBlock(), createBlock(_component_el_form_item, {
165
+ key: 0,
132
166
  label: "面积",
133
167
  prop: "allArea"
134
168
  }, {
135
169
  default: withCtx(() => {
136
170
  var _a;
137
171
  return [
138
- createElementVNode("span", _hoisted_1, toDisplayString(unref(reactiveValue).allArea), 1),
172
+ createElementVNode("span", _hoisted_1, toDisplayString(measureData.value.area), 1),
139
173
  createElementVNode("span", _hoisted_2, toDisplayString((_a = unref(reactiveValue).currentType) == null ? void 0 : _a.label), 1)
140
174
  ];
141
175
  }),
142
176
  _: 1
143
- }),
144
- createVNode(_component_el_form_item, {
177
+ })) : createCommentVNode("", true),
178
+ unref(reactiveValue).allPerimeter > 0 ? (openBlock(), createBlock(_component_el_form_item, {
179
+ key: 1,
145
180
  label: "周长",
146
181
  prop: "allArea"
147
182
  }, {
148
183
  default: withCtx(() => {
149
184
  var _a;
150
185
  return [
151
- createElementVNode("span", _hoisted_3, toDisplayString(unref(reactiveValue).allPerimeter), 1),
186
+ createElementVNode("span", _hoisted_3, toDisplayString(measureData.value.perimeter), 1),
152
187
  createElementVNode("span", _hoisted_4, toDisplayString((_a = unref(reactiveValue).currentType) == null ? void 0 : _a.persimeterLabel), 1)
153
188
  ];
154
189
  }),
155
190
  _: 1
156
- })
191
+ })) : createCommentVNode("", true)
157
192
  ]),
158
193
  _: 1
159
194
  }, 8, ["model"])
@@ -1,8 +1,36 @@
1
1
  export declare const AreaMeasurement: import('../../utils').WithInstall<import('vue').DefineComponent<{
2
2
  map: import('ym-gis-2d/mapView/Map').default;
3
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
3
+ color?: Array<number> | string;
4
+ opacity?: number;
5
+ outlineColor?: Array<number> | string;
6
+ outlineOpacity?: number;
7
+ outlineWidth?: number;
8
+ font?: import('ym-gis-2d/entity/IFont').default;
9
+ unit?: "square-meters" | "square-kilometers" | "mu" | "hectare";
10
+ precision?: number;
11
+ showLabel?: boolean;
12
+ spheroid?: boolean;
13
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ activeInteraction: (...args: any[]) => void;
15
+ }, string, import('vue').PublicProps, Readonly<{
4
16
  map: import('ym-gis-2d/mapView/Map').default;
5
- }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
17
+ color?: Array<number> | string;
18
+ opacity?: number;
19
+ outlineColor?: Array<number> | string;
20
+ outlineOpacity?: number;
21
+ outlineWidth?: number;
22
+ font?: import('ym-gis-2d/entity/IFont').default;
23
+ unit?: "square-meters" | "square-kilometers" | "mu" | "hectare";
24
+ precision?: number;
25
+ showLabel?: boolean;
26
+ spheroid?: boolean;
27
+ }> & Readonly<{
28
+ onActiveInteraction?: ((...args: any[]) => any) | undefined;
29
+ }>, {
30
+ precision: number;
31
+ showLabel: boolean;
32
+ spheroid: boolean;
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
6
34
  areaMeasureDom: ({
7
35
  $: import('vue').ComponentInternalInstance;
8
36
  $data: {};
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./Export.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const _Export = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-11975a70"]]);
4
+ const _Export = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e716c04f"]]);
5
5
  export {
6
6
  _Export as default
7
7
  };
@@ -1,3 +1,3 @@
1
- .panel-content[data-v-11975a70] .el-form-item {
1
+ .panel-content[data-v-e716c04f] .el-form-item {
2
2
  margin-bottom: 10px;
3
3
  }
@@ -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-75b81512"]]);
5
5
  export {
6
6
  _HorizontallyTopToolbar as default
7
7
  };
@@ -192,7 +192,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
192
192
  }
193
193
  function handleActiveInteraction(event, tool) {
194
194
  if (!event.success) {
195
- ElMessage.error(event.message);
195
+ if (event.message) {
196
+ ElMessage.error(event.message);
197
+ }
196
198
  tool.component = void 0;
197
199
  const find = reactiveValue.activeIds.findIndex((t) => t == tool.id);
198
200
  if (find > -1) {
@@ -1,4 +1,4 @@
1
- .toolbar-contain[data-v-3c8586f4] {
1
+ .toolbar-contain[data-v-75b81512] {
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-75b81512] {
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-75b81512] {
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-75b81512] {
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-75b81512] {
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-75b81512] {
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-75b81512] {
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-75b81512] {
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-75b81512] {
56
57
  position: absolute;
57
58
  right: 300px;
58
59
  }
@@ -1,5 +1,5 @@
1
1
  import { default as OLMap } from 'ym-gis-2d/mapView/Map';
2
- import { default as IStyle } from 'ym-gis-2d/entity/IStyle';
2
+ import { default as IStyle } from 'ym-gis-2d/entity/style/IStyle';
3
3
  import { IMapService } from 'ym-gis-2d/entity';
4
4
  type __VLS_Props = {
5
5
  map: OLMap;
@@ -17,7 +17,7 @@ declare function __VLS_template(): {
17
17
  footer?(_: {
18
18
  feature: {
19
19
  isSelected?: boolean | undefined;
20
- fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | undefined;
20
+ fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | "measure" | undefined;
21
21
  layerId?: string | undefined;
22
22
  tag?: string | undefined;
23
23
  tempLayer?: {
@@ -35,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
35
  });
36
36
  props.map.interactionManager.addInteraction("identify", select);
37
37
  let loadingInstance = null;
38
- select.on("selectstart", (event) => {
38
+ select.on("selectStart", (event) => {
39
39
  loadingInstance = ElLoading.service({ text: "正在查询...", background: "rgba(0, 0, 0, 0.5)", target: props.map.getTarget() });
40
40
  });
41
41
  select.on("selected", (event) => {
@@ -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?: import('ym-gis-2d/entity/style/IStyle').default;
6
+ cancePointStyle?: import('ym-gis-2d/entity/style/IStyle').default;
7
+ lineStyle?: import('ym-gis-2d/entity/style/IStyle').default;
8
+ canceLineStyle?: import('ym-gis-2d/entity/style/IStyle').default;
9
+ polygonStyle?: import('ym-gis-2d/entity/style/IStyle').default;
10
+ cancePolygonStyle?: import('ym-gis-2d/entity/style/IStyle').default;
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?: import('ym-gis-2d/entity/style/IStyle').default;
22
+ cancePointStyle?: import('ym-gis-2d/entity/style/IStyle').default;
23
+ lineStyle?: import('ym-gis-2d/entity/style/IStyle').default;
24
+ canceLineStyle?: import('ym-gis-2d/entity/style/IStyle').default;
25
+ polygonStyle?: import('ym-gis-2d/entity/style/IStyle').default;
26
+ cancePolygonStyle?: import('ym-gis-2d/entity/style/IStyle').default;
27
27
  }> & Readonly<{}>, {}, {}, {}, {}, {}>;
28
28
  __isFragment?: never;
29
29
  __isTeleport?: never;
@@ -31,18 +31,18 @@ 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?: import('ym-gis-2d/entity/style/IStyle').default;
35
+ cancePointStyle?: import('ym-gis-2d/entity/style/IStyle').default;
36
+ lineStyle?: import('ym-gis-2d/entity/style/IStyle').default;
37
+ canceLineStyle?: import('ym-gis-2d/entity/style/IStyle').default;
38
+ polygonStyle?: import('ym-gis-2d/entity/style/IStyle').default;
39
+ cancePolygonStyle?: import('ym-gis-2d/entity/style/IStyle').default;
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?(_: {
43
43
  feature: {
44
44
  isSelected?: boolean | undefined;
45
- fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | undefined;
45
+ fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | "measure" | undefined;
46
46
  layerId?: string | undefined;
47
47
  tag?: string | undefined;
48
48
  tempLayer?: {
@@ -101,6 +101,17 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
101
101
  "fill-opacity": string;
102
102
  }[];
103
103
  } | undefined;
104
+ Raster?: {
105
+ colormap: {
106
+ entries: {
107
+ color: string;
108
+ label: string;
109
+ quantity: number;
110
+ }[];
111
+ type: string;
112
+ };
113
+ opacity: number;
114
+ } | undefined;
104
115
  imgUrl?: string | undefined;
105
116
  }[];
106
117
  }[];
@@ -391,8 +402,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
391
402
  resetViewProjection: (projection: string) => void;
392
403
  sortTemLayer: () => void;
393
404
  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;
405
+ 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;
406
+ 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
407
  locationWKT: (wkt: string, proj?: string, ratio?: number, isFlash?: boolean) => void;
397
408
  locationWKTs: (wkts: string[], proj?: string, ratio?: number, isFlash?: boolean) => void;
398
409
  locationGeometry: (geometry: import('ol/geom').Geometry, proj?: string, ratio?: number, isFlash?: boolean) => void;
@@ -100,6 +100,17 @@ export declare const MapView: import('../../utils').WithInstall<import('vue').De
100
100
  "fill-opacity": string;
101
101
  }[];
102
102
  } | undefined;
103
+ Raster?: {
104
+ colormap: {
105
+ entries: {
106
+ color: string;
107
+ label: string;
108
+ quantity: number;
109
+ }[];
110
+ type: string;
111
+ };
112
+ opacity: number;
113
+ } | undefined;
103
114
  imgUrl?: string | undefined;
104
115
  }[];
105
116
  }[];
@@ -390,8 +401,8 @@ export declare const MapView: import('../../utils').WithInstall<import('vue').De
390
401
  resetViewProjection: (projection: string) => void;
391
402
  sortTemLayer: () => void;
392
403
  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;
404
+ 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;
405
+ 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
406
  locationWKT: (wkt: string, proj?: string, ratio?: number, isFlash?: boolean) => void;
396
407
  locationWKTs: (wkts: string[], proj?: string, ratio?: number, isFlash?: boolean) => void;
397
408
  locationGeometry: (geometry: import('ol/geom').Geometry, proj?: string, ratio?: number, isFlash?: boolean) => void;
@@ -107,6 +107,17 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
107
107
  "fill-opacity": string;
108
108
  }[];
109
109
  } | undefined;
110
+ Raster?: {
111
+ colormap: {
112
+ entries: {
113
+ color: string;
114
+ label: string;
115
+ quantity: number;
116
+ }[];
117
+ type: string;
118
+ };
119
+ opacity: number;
120
+ } | undefined;
110
121
  imgUrl?: string | undefined;
111
122
  }[];
112
123
  }[];
@@ -397,8 +408,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
397
408
  resetViewProjection: (projection: string) => void;
398
409
  sortTemLayer: () => void;
399
410
  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;
411
+ 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;
412
+ 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
413
  locationWKT: (wkt: string, proj?: string, ratio?: number, isFlash?: boolean) => void;
403
414
  locationWKTs: (wkts: string[], proj?: string, ratio?: number, isFlash?: boolean) => void;
404
415
  locationGeometry: (geometry: import('ol/geom').Geometry, proj?: string, ratio?: number, isFlash?: boolean) => void;
@@ -103,6 +103,17 @@ export declare const MultiScreen: import('../../utils').WithInstall<import('vue'
103
103
  "fill-opacity": string;
104
104
  }[];
105
105
  } | undefined;
106
+ Raster?: {
107
+ colormap: {
108
+ entries: {
109
+ color: string;
110
+ label: string;
111
+ quantity: number;
112
+ }[];
113
+ type: string;
114
+ };
115
+ opacity: number;
116
+ } | undefined;
106
117
  imgUrl?: string | undefined;
107
118
  }[];
108
119
  }[];
@@ -393,8 +404,8 @@ export declare const MultiScreen: import('../../utils').WithInstall<import('vue'
393
404
  resetViewProjection: (projection: string) => void;
394
405
  sortTemLayer: () => void;
395
406
  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;
407
+ 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;
408
+ 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
409
  locationWKT: (wkt: string, proj?: string, ratio?: number, isFlash?: boolean) => void;
399
410
  locationWKTs: (wkts: string[], proj?: string, ratio?: number, isFlash?: boolean) => void;
400
411
  locationGeometry: (geometry: import('ol/geom').Geometry, proj?: string, ratio?: number, isFlash?: boolean) => void;
@@ -14,7 +14,7 @@ declare function __VLS_template(): {
14
14
  footer?(_: {
15
15
  feature: {
16
16
  isSelected?: boolean | undefined;
17
- fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | undefined;
17
+ fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | "measure" | undefined;
18
18
  layerId?: string | undefined;
19
19
  tag?: string | undefined;
20
20
  tempLayer?: {
@@ -184,7 +184,7 @@ export declare const Popup: import('../../utils').WithInstall<{
184
184
  footer?(_: {
185
185
  feature: {
186
186
  isSelected?: boolean | undefined;
187
- fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | undefined;
187
+ fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | "measure" | undefined;
188
188
  layerId?: string | undefined;
189
189
  tag?: string | undefined;
190
190
  tempLayer?: {
@@ -19,7 +19,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
19
19
  setSelectLayers: typeof setSelectLayers;
20
20
  features: {
21
21
  isSelected?: boolean | undefined;
22
- fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | undefined;
22
+ fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | "measure" | undefined;
23
23
  layerId?: string | undefined;
24
24
  tag?: string | undefined;
25
25
  tempLayer?: {
@@ -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;
@@ -45,7 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
45
  });
46
46
  props.map.interactionManager.addInteraction("select", toRaw(reactiveData.selectTool));
47
47
  let loadingInstance;
48
- reactiveData.selectTool.on("selectstart", (event) => {
48
+ reactiveData.selectTool.on("selectStart", (event) => {
49
49
  if (props.showLoading) {
50
50
  loadingInstance = ElLoading.service({ text: "正在查询...", background: "rgba(0, 0, 0, 0.5)", target: props.map.getTarget() });
51
51
  }
@@ -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";
@@ -13,7 +13,7 @@ export declare const Select: import('../../utils').WithInstall<import('vue').Def
13
13
  setSelectLayers: (layers: import('ym-gis-2d/entity').IMapService[]) => void;
14
14
  features: {
15
15
  isSelected?: boolean | undefined;
16
- fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | undefined;
16
+ fromType?: "draw" | "import" | "cut" | "copy" | "union" | "identify" | "measure" | undefined;
17
17
  layerId?: string | undefined;
18
18
  tag?: string | undefined;
19
19
  tempLayer?: {
@@ -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.49",
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.28"
14
14
  }
15
15
  }