ym-giswidget-2d 1.0.74 → 1.0.76

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.
@@ -18,6 +18,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
18
18
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
19
  onActiveInteraction?: ((...args: any[]) => any) | undefined;
20
20
  }>, {
21
+ font: IFont;
21
22
  precision: number;
22
23
  showLabel: boolean;
23
24
  spheroid: boolean;
@@ -22,7 +22,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
22
  outlineColor: {},
23
23
  outlineOpacity: {},
24
24
  outlineWidth: {},
25
- font: {},
25
+ font: { default: {
26
+ haloColor: "#ffffff"
27
+ } },
26
28
  unit: {},
27
29
  precision: { default: 2 },
28
30
  showLabel: { type: Boolean, default: true },
@@ -27,6 +27,7 @@ export declare const AreaMeasurement: import('../../utils').WithInstall<import('
27
27
  }> & Readonly<{
28
28
  onActiveInteraction?: ((...args: any[]) => any) | undefined;
29
29
  }>, {
30
+ font: import('ym-gis-2d/entity/IFont').default;
30
31
  precision: number;
31
32
  showLabel: boolean;
32
33
  spheroid: boolean;
@@ -18,6 +18,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
18
18
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
19
  onActiveInteraction?: ((...args: any[]) => any) | undefined;
20
20
  }>, {
21
+ font: IFont;
21
22
  precision: number;
22
23
  showLabel: boolean;
23
24
  spheroid: boolean;
@@ -19,7 +19,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
19
19
  outlineColor: {},
20
20
  outlineOpacity: {},
21
21
  outlineWidth: {},
22
- font: {},
22
+ font: { default: {
23
+ haloColor: "#ffffff"
24
+ } },
23
25
  unit: {},
24
26
  precision: { default: 2 },
25
27
  showLabel: { type: Boolean, default: true },
@@ -27,6 +27,7 @@ export declare const DistanceMeasurement: import('../../utils').WithInstall<impo
27
27
  }> & Readonly<{
28
28
  onActiveInteraction?: ((...args: any[]) => any) | undefined;
29
29
  }>, {
30
+ font: import('ym-gis-2d/entity/IFont').default;
30
31
  precision: number;
31
32
  showLabel: boolean;
32
33
  spheroid: boolean;
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./Location.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const _Location = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bc1c2409"]]);
4
+ const _Location = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ff2a8d85"]]);
5
5
  export {
6
6
  _Location as default
7
7
  };
@@ -7,7 +7,7 @@ import "element-plus/es/components/radio-group/style/css";
7
7
  import "element-plus/es/components/radio/style/css";
8
8
  import { defineComponent, reactive, onMounted, onUnmounted, withDirectives, createBlock, openBlock, withCtx, createVNode, unref, createTextVNode, createElementBlock, createCommentVNode, Fragment, createElementVNode, vShow } from "vue";
9
9
  import DraggablePanel from "../../panel/DraggablePanel.vue.js";
10
- import { getSpheroidProjection } from "ym-gis-2d/utils/RegisterProjUtil";
10
+ import { isSpheroid, getSpheroidProjection } from "ym-gis-2d/utils/RegisterProjUtil";
11
11
  import dw from "../../assets/img/dw.png.js";
12
12
  import FeatureManager from "ym-gis-2d/feature/FeatureManager";
13
13
  import { ElMessage } from "element-plus";
@@ -32,9 +32,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
32
  currentType: "dfm"
33
33
  });
34
34
  onMounted(() => {
35
+ props.map.on("click", clickHandler);
35
36
  });
36
37
  onUnmounted(() => {
37
38
  reactiveValue.visible = false;
39
+ props.map.un("click", clickHandler);
38
40
  });
39
41
  function handleClose() {
40
42
  const featureManager = new FeatureManager(props.map);
@@ -76,6 +78,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76
78
  }
77
79
  props.map.addWKT(`POINT(${x} ${y})`, prj, featureTag, true, null, { imgurl: dw });
78
80
  }
81
+ function clickHandler(evt) {
82
+ const isQ = isSpheroid(props.map.getView().getProjection());
83
+ if (isQ) {
84
+ reactiveValue.currentType = "jwd";
85
+ } else {
86
+ reactiveValue.currentType = "xy";
87
+ }
88
+ reactiveValue.x = evt.coordinate[0];
89
+ reactiveValue.y = evt.coordinate[1];
90
+ }
79
91
  return (_ctx, _cache) => {
80
92
  const _component_el_radio = ElRadio;
81
93
  const _component_el_radio_group = ElRadioGroup;
@@ -1,16 +1,16 @@
1
- .dfm[data-v-bc1c2409] {
1
+ .dfm[data-v-ff2a8d85] {
2
2
  display: flex;
3
3
  gap: 5px;
4
4
  }
5
- .dfm .el-input[data-v-bc1c2409] {
5
+ .dfm .el-input[data-v-ff2a8d85] {
6
6
  width: 70px;
7
7
  }
8
- .dfm .el-input[data-v-bc1c2409] .el-input-group__append {
8
+ .dfm .el-input[data-v-ff2a8d85] .el-input-group__append {
9
9
  padding: 0 5px;
10
10
  }
11
- .input .el-input[data-v-bc1c2409] {
11
+ .input .el-input[data-v-ff2a8d85] {
12
12
  width: 220px;
13
13
  }
14
- .el-radio-group[data-v-bc1c2409] {
14
+ .el-radio-group[data-v-ff2a8d85] {
15
15
  margin-bottom: 10px;
16
16
  }
@@ -405,6 +405,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
405
405
  getLayerByLayerTag: (layerTag: string) => import('ol/layer/Base').default | undefined;
406
406
  getLayersByIds: (ids: string[]) => import('ol/layer/Base').default[];
407
407
  getTempLayerById: (id: string) => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
408
+ createOverlay: (id: string, element?: HTMLElement) => import('ol').Overlay;
408
409
  getPointTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
409
410
  getLineTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
410
411
  getPolygonTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
@@ -400,6 +400,7 @@ export declare const MapView: import('../../utils').WithInstall<import('vue').De
400
400
  getLayerByLayerTag: (layerTag: string) => import('ol/layer/Base').default | undefined;
401
401
  getLayersByIds: (ids: string[]) => import('ol/layer/Base').default[];
402
402
  getTempLayerById: (id: string) => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
403
+ createOverlay: (id: string, element?: HTMLElement) => import('ol').Overlay;
403
404
  getPointTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
404
405
  getLineTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
405
406
  getPolygonTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
@@ -407,6 +407,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
407
407
  getLayerByLayerTag: (layerTag: string) => import('ol/layer/Base').default | undefined;
408
408
  getLayersByIds: (ids: string[]) => import('ol/layer/Base').default[];
409
409
  getTempLayerById: (id: string) => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
410
+ createOverlay: (id: string, element?: HTMLElement) => import('ol').Overlay;
410
411
  getPointTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
411
412
  getLineTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
412
413
  getPolygonTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
@@ -403,6 +403,7 @@ export declare const MultiScreen: import('../../utils').WithInstall<import('vue'
403
403
  getLayerByLayerTag: (layerTag: string) => import('ol/layer/Base').default | undefined;
404
404
  getLayersByIds: (ids: string[]) => import('ol/layer/Base').default[];
405
405
  getTempLayerById: (id: string) => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
406
+ createOverlay: (id: string, element?: HTMLElement) => import('ol').Overlay;
406
407
  getPointTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
407
408
  getLineTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
408
409
  getPolygonTempLayer: () => import('ol/layer').Vector<import('ym-gis-2d/entity/Feature').default>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ym-giswidget-2d",
3
- "version": "1.0.74",
3
+ "version": "1.0.76",
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.47"
13
+ "ym-gis-2d": "1.0.48"
14
14
  }
15
15
  }