ym-giswidget-2d 1.0.48 → 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,10 +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, createCommentVNode, 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";
10
- import { getArea } from "ym-gis-2d/utils/GeometryUtil";
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";
11
12
  const _hoisted_1 = { class: "el-current-value" };
12
13
  const _hoisted_2 = { class: "el-current-unit" };
13
14
  const _hoisted_3 = { class: "el-current-value" };
@@ -15,82 +16,93 @@ const _hoisted_4 = { class: "el-current-unit" };
15
16
  const _sfc_main = /* @__PURE__ */ defineComponent({
16
17
  __name: "AreaMeasurement",
17
18
  props: {
18
- 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 }
19
30
  },
20
- setup(__props) {
31
+ emits: ["activeInteraction"],
32
+ setup(__props, { emit: __emit }) {
33
+ const emit = __emit;
21
34
  const props = __props;
22
35
  let reactiveValue = reactive({
23
36
  visible: true,
24
37
  allArea: 0,
25
38
  allPerimeter: 0,
26
- measureTypes: [
27
- {
28
- type: "square-meters",
29
- label: "平方米",
30
- persimeterLabel: "米"
31
- },
32
- {
33
- type: "square-kilometers",
34
- label: "平方公里",
35
- persimeterLabel: "千米"
36
- },
37
- {
38
- type: "mu",
39
- label: "亩",
40
- persimeterLabel: "米"
41
- },
42
- {
43
- type: "hectare",
44
- label: "公顷",
45
- persimeterLabel: "千米"
46
- }
47
- ]
39
+ hasArea: 0,
40
+ hasPerimeter: 0
48
41
  });
49
- reactiveValue.currentType = reactiveValue.measureTypes[0];
50
- onMounted(() => {
51
- const tempLayer = props.map.getPolygonTempLayer();
52
- let source = void 0;
53
- const layersource = tempLayer == null ? void 0 : tempLayer.getSource();
54
- if (layersource) {
55
- 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
+ };
56
71
  }
57
- const draw = new Draw("polygon", {
58
- source,
59
- tipText: "点击开始测量,双击结束测量"
60
- });
61
- props.map.interactionManager.addInteraction("areaMeasure", draw);
62
- draw.on("drawend", (event) => {
63
- const features = event.feature;
64
- if (features) {
65
- features.isSelected = true;
66
- features.tempLayer = tempLayer;
67
- features.fromType = "draw";
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";
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());
76
82
  }
77
83
  });
78
- draw.on("drawmoving", (event) => {
79
- var _a;
80
- if (!event.coordinates || event.coordinates.length < 2) {
81
- return;
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());
82
89
  }
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
90
  });
87
91
  });
88
92
  onUnmounted(() => {
89
93
  reactiveValue.visible = false;
94
+ const areaMeasure = props.map.interactionManager.getInteraction("areaMeasure");
95
+ areaMeasure.clearMeasure();
90
96
  props.map.interactionManager.removeInteraction("areaMeasure");
91
97
  });
92
98
  function handleClose() {
93
- 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
+ }
94
106
  }
95
107
  return (_ctx, _cache) => {
96
108
  const _component_el_option = ElOption;
@@ -132,10 +144,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
132
144
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(reactiveValue).currentType = $event),
133
145
  "value-key": "type",
134
146
  class: "el-current",
135
- "popper-class": "el-current"
147
+ "popper-class": "el-current",
148
+ onChange: changeUnit
136
149
  }, {
137
150
  default: withCtx(() => [
138
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(reactiveValue).measureTypes, (item) => {
151
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(measureUnits), (item) => {
139
152
  return openBlock(), createBlock(_component_el_option, {
140
153
  key: item.type,
141
154
  label: item.label,
@@ -156,7 +169,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
156
169
  default: withCtx(() => {
157
170
  var _a;
158
171
  return [
159
- createElementVNode("span", _hoisted_1, toDisplayString(unref(reactiveValue).allArea), 1),
172
+ createElementVNode("span", _hoisted_1, toDisplayString(measureData.value.area), 1),
160
173
  createElementVNode("span", _hoisted_2, toDisplayString((_a = unref(reactiveValue).currentType) == null ? void 0 : _a.label), 1)
161
174
  ];
162
175
  }),
@@ -170,7 +183,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
170
183
  default: withCtx(() => {
171
184
  var _a;
172
185
  return [
173
- createElementVNode("span", _hoisted_3, toDisplayString(unref(reactiveValue).allPerimeter), 1),
186
+ createElementVNode("span", _hoisted_3, toDisplayString(measureData.value.perimeter), 1),
174
187
  createElementVNode("span", _hoisted_4, toDisplayString((_a = unref(reactiveValue).currentType) == null ? void 0 : _a.persimeterLabel), 1)
175
188
  ];
176
189
  }),
@@ -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-f42f3be5"]]);
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-f42f3be5] {
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-f42f3be5] {
12
+ .toolbar-contain .toolbar-item-contain[data-v-75b81512] {
13
13
  height: 43px;
14
14
  line-height: 43px;
15
15
  display: flex;
@@ -18,17 +18,17 @@
18
18
  align-items: center;
19
19
  cursor: pointer;
20
20
  }
21
- .toolbar-contain .toolbar-item-contain .toolbar-item[data-v-f42f3be5] {
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-f42f3be5] {
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-f42f3be5] {
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);
@@ -36,24 +36,24 @@
36
36
  border-radius: 3px;
37
37
  margin: 0px -1px;
38
38
  }
39
- .toolbar-contain .active[data-v-f42f3be5] {
39
+ .toolbar-contain .active[data-v-75b81512] {
40
40
  color: var(--system-primary-text-active-color);
41
41
  }
42
- .toolbar-contain .toolbar-split[data-v-f42f3be5] {
42
+ .toolbar-contain .toolbar-split[data-v-75b81512] {
43
43
  width: 2px;
44
44
  height: 20px;
45
45
  background: #7EA08E;
46
46
  margin: auto;
47
47
  opacity: 0.5;
48
48
  }
49
- .toolbar-contain .toolbar-h-split[data-v-f42f3be5] {
49
+ .toolbar-contain .toolbar-h-split[data-v-75b81512] {
50
50
  height: 2px;
51
51
  background: #7EA08E;
52
52
  margin: auto;
53
53
  opacity: 0.5;
54
54
  margin: 0px 10px;
55
55
  }
56
- .component-position[data-v-f42f3be5] {
56
+ .component-position[data-v-75b81512] {
57
57
  position: absolute;
58
58
  right: 300px;
59
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?: IStyle;
6
- cancePointStyle?: IStyle;
7
- lineStyle?: IStyle;
8
- canceLineStyle?: IStyle;
9
- polygonStyle?: IStyle;
10
- cancePolygonStyle?: IStyle;
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?: IStyle;
22
- cancePointStyle?: IStyle;
23
- lineStyle?: IStyle;
24
- canceLineStyle?: IStyle;
25
- polygonStyle?: IStyle;
26
- cancePolygonStyle?: IStyle;
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?: IStyle;
35
- cancePointStyle?: IStyle;
36
- lineStyle?: IStyle;
37
- canceLineStyle?: IStyle;
38
- polygonStyle?: IStyle;
39
- cancePolygonStyle?: IStyle;
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
  }[];
@@ -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
  }[];
@@ -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
  }[];
@@ -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
  }[];
@@ -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?: {
@@ -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
  }
@@ -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?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ym-giswidget-2d",
3
- "version": "1.0.48",
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.27"
13
+ "ym-gis-2d": "1.0.28"
14
14
  }
15
15
  }