gisviewer-vue3-arcgis 1.0.142 → 1.0.143

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,13 @@
1
- import { defineComponent as ke, ref as y, onMounted as Te, getCurrentInstance as Ae, onUnmounted as De, computed as Ie, openBlock as C, createElementBlock as Le, createElementVNode as p, withDirectives as be, vShow as _e, createBlock as He, unref as xe, createCommentVNode as Me } from "vue";
2
- import O, { registerStore as Ve } from "./stores/index.mjs";
1
+ import { defineComponent as ke, ref as h, onMounted as Te, getCurrentInstance as Ae, onUnmounted as De, computed as Ie, openBlock as O, createElementBlock as Le, createElementVNode as p, withDirectives as be, vShow as _e, createBlock as He, unref as xe, createCommentVNode as Me } from "vue";
2
+ import k, { registerStore as Ve } from "./stores/index.mjs";
3
3
  import "./style/index.css";
4
4
  import Be from "./utils/components/sketch-tool.vue.mjs";
5
5
  import Ne from "./utils/holo-flow/index.mjs";
6
6
  import ze from "./utils/map-initializer.mjs";
7
- import k from "./utils/open-drive-renderer/index.mjs";
7
+ import T from "./utils/open-drive-renderer/index.mjs";
8
8
  import Qe from "./utils/overlay.mjs";
9
9
  import je from "./utils/queue-length.mjs";
10
- import T from "./utils/road-config-tool/index.mjs";
10
+ import A from "./utils/road-config-tool/index.mjs";
11
11
  import Pe from "./utils/signal-control-area-controller/index.mjs";
12
12
  import Ee from "./utils/traffic-flow.mjs";
13
13
  const Fe = { class: "gis-viewer" }, Re = { style: { position: "absolute", bottom: "10px", left: "10px" } }, at = /* @__PURE__ */ ke({
@@ -17,33 +17,33 @@ const Fe = { class: "gis-viewer" }, Re = { style: { position: "absolute", bottom
17
17
  assetsRoot: {}
18
18
  },
19
19
  emits: ["mapLoaded", "markerClick", "mapClick"],
20
- setup(A, { expose: D, emit: I }) {
21
- const g = y(null);
22
- let s, c, i, n, a, o, u, t, r;
23
- const f = y(!1), L = y(!1);
20
+ setup(D, { expose: I, emit: L }) {
21
+ const g = h(null);
22
+ let s, c, i, n, a, r, u, t, o;
23
+ const f = h(!1), w = h(!1);
24
24
  Te(async () => {
25
25
  if (Ve(), !g.value)
26
26
  return;
27
27
  document.addEventListener("keydown", (m) => {
28
28
  m.ctrlKey && m.key === "i" && (f.value = !f.value);
29
29
  });
30
- const e = Ae(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, S = await (await fetch(h.config)).json();
31
- S.assetsRoot = h.assetsRoot || l;
32
- const Ce = O.useAppDataStore;
33
- Ce.mapConfig = S, c = new ze(), s = await c.initialize({
30
+ const e = Ae(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, C = await (await fetch(S.config)).json();
31
+ C.assetsRoot = S.assetsRoot || l;
32
+ const Ce = k.useAppDataStore;
33
+ Ce.mapConfig = C, c = new ze(), s = await c.initialize({
34
34
  container: g.value,
35
- markerClickCallback: (m, v, d, Oe) => {
36
- w("markerClick", m, v, d, Oe);
35
+ markerClickCallback: (m, d, y, Oe) => {
36
+ v("markerClick", m, d, y, Oe);
37
37
  },
38
- mapClickCallback: (m, v, d) => {
39
- w("mapClick", m, v, d);
38
+ mapClickCallback: (m, d, y) => {
39
+ v("mapClick", m, d, y);
40
40
  }
41
- }), a = new Ne(s), await a.init(), w("mapLoaded");
41
+ }), a = new Ne(s), await a.init(), v("mapLoaded");
42
42
  }), De(() => {
43
- r == null || r.clearSignalControlArea(), t == null || t.clearOpenDrive(), a == null || a.clearHoloTrace(), a == null || a.clearHoloSignal(), n == null || n.disconnectTrafficFlow();
43
+ o == null || o.clearSignalControlArea(), t == null || t.clearOpenDrive(), a == null || a.clearHoloTrace(), a == null || a.clearHoloSignal(), n == null || n.disconnectTrafficFlow();
44
44
  });
45
45
  const b = Ie(() => s), _ = () => {
46
- const e = O.useAppDataStore;
46
+ const e = k.useAppDataStore;
47
47
  e.saveTrackLog = !0;
48
48
  }, H = () => {
49
49
  a.downloadTrackLog();
@@ -51,9 +51,9 @@ const Fe = { class: "gis-viewer" }, Re = { style: { position: "absolute", bottom
51
51
  c.cancelCoordinateTransform(e);
52
52
  }, Q = (e) => {
53
53
  c.setMapZoomRange(e);
54
- }, j = (e) => (i || (i = new T(s)), i.showLaneNumber(e)), P = () => {
54
+ }, j = (e) => (i || (i = new A(s)), i.showLaneNumber(e)), P = () => {
55
55
  i == null || i.clearLaneNumber();
56
- }, E = async (e) => (i || (i = new T(s)), await i.initializeSearch(e)), F = async () => i == null ? void 0 : i.calCrossIndicatorArea(), R = async () => {
56
+ }, E = async (e) => (i || (i = new A(s)), await i.initializeSearch(e)), F = async () => i == null ? void 0 : i.calCrossIndicatorArea(), R = async () => {
57
57
  }, Z = async (e, l) => {
58
58
  n || (n = new Ee(s)), n.connectTrafficFlow(e, l);
59
59
  }, q = () => {
@@ -76,13 +76,13 @@ const Fe = { class: "gis-viewer" }, Re = { style: { position: "absolute", bottom
76
76
  n == null || n.toggleTrafficObject(e), a.toggleTrafficObject(e);
77
77
  }, ee = (e) => {
78
78
  a.updatePanelContent(e);
79
- }, te = async (e) => (o || (o = new Qe(s)), o.addOverlays(e)), ae = (e) => o == null ? void 0 : o.removeOverlaysByType(e), ne = (e) => o == null ? void 0 : o.removeOverlaysById(e), oe = () => o == null ? void 0 : o.removeAllOverlays(), re = () => {
80
- o == null || o.showAllOverlays();
79
+ }, te = async (e) => (r || (r = new Qe(s)), r.addOverlays(e)), ae = (e) => r == null ? void 0 : r.removeOverlaysByType(e), ne = (e) => r == null ? void 0 : r.removeOverlaysById(e), re = () => r == null ? void 0 : r.removeAllOverlays(), oe = () => {
80
+ r == null || r.showAllOverlays();
81
81
  }, se = (e) => {
82
82
  u || (u = new je(s)), u.updateQueueLength(e);
83
83
  }, ie = () => {
84
84
  u == null || u.removeQueueLength();
85
- }, ce = async (e, l) => (t || (t = new k(s)), await t.showOpenDriveFromServer(e, l)), le = async (e) => (t || (t = new k(s)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), ue = async () => await (t == null ? void 0 : t.clearOpenDrive()), me = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
85
+ }, ce = async (e, l) => (t || (t = new T(s)), await t.showOpenDriveFromServer(e, l)), le = async (e) => (t || (t = new T(s)), await t.clearOpenDrive(), w.value = !0, await t.showOpenDriveFromFile(e)), ue = async () => (w.value = !1, await (t == null ? void 0 : t.clearOpenDrive())), me = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
86
86
  status: -1,
87
87
  message: "未加载OpenDrive地图"
88
88
  }, pe = async (e) => t ? t.selectSumo(e) : {
@@ -97,10 +97,10 @@ const Fe = { class: "gis-viewer" }, Re = { style: { position: "absolute", bottom
97
97
  }, we = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
98
98
  status: -1,
99
99
  message: "未加载OpenDrive地图"
100
- }, ve = (e) => (r || (r = new Pe(s)), r.showSignalControlArea(e)), de = () => {
101
- r == null || r.clearSignalControlArea();
102
- }, ye = async (e) => r ? await r.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, he = async (e) => r ? await r.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, Se = () => r ? r.resetHighlight() : { status: -1, message: "未加载信号控制区" }, h = A, w = I;
103
- return D({
100
+ }, ve = (e) => (o || (o = new Pe(s)), o.showSignalControlArea(e)), de = () => {
101
+ o == null || o.clearSignalControlArea();
102
+ }, ye = async (e) => o ? await o.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, he = async (e) => o ? await o.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, Se = () => o ? o.resetHighlight() : { status: -1, message: "未加载信号控制区" }, S = D, v = L;
103
+ return I({
104
104
  mapViewer: b,
105
105
  setLayerVisibility: B,
106
106
  setMapCenter: x,
@@ -110,10 +110,10 @@ const Fe = { class: "gis-viewer" }, Re = { style: { position: "absolute", bottom
110
110
  requestCoordinateTransform: N,
111
111
  cancelCoordinateTransform: z,
112
112
  addOverlays: te,
113
- showAllOverlays: re,
113
+ showAllOverlays: oe,
114
114
  removeOverlaysByType: ae,
115
115
  removeOverlaysById: ne,
116
- removeAllOverlays: oe,
116
+ removeAllOverlays: re,
117
117
  showLaneNumber: j,
118
118
  clearLaneNumber: P,
119
119
  initializeAreaTool: E,
@@ -145,7 +145,7 @@ const Fe = { class: "gis-viewer" }, Re = { style: { position: "absolute", bottom
145
145
  locateSignalControlArea: ye,
146
146
  highlightSignalControlArea: he,
147
147
  resetHighlightSignalControlArea: Se
148
- }), (e, l) => (C(), Le("div", Fe, [
148
+ }), (e, l) => (O(), Le("div", Fe, [
149
149
  p("div", {
150
150
  class: "gis-viewer-main",
151
151
  ref_key: "mapContainer",
@@ -160,7 +160,7 @@ const Fe = { class: "gis-viewer" }, Re = { style: { position: "absolute", bottom
160
160
  ], 512), [
161
161
  [_e, f.value]
162
162
  ]),
163
- L.value ? (C(), He(Be, {
163
+ w.value ? (O(), He(Be, {
164
164
  key: 0,
165
165
  view: xe(s)
166
166
  }, null, 8, ["view"])) : Me("", !0)
@@ -1,7 +1,7 @@
1
1
  import o from "./sketch-tool.vue2.mjs";
2
2
  import "./sketch-tool.vue3.mjs";
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ac0f5d06"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f302a42f"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as a, onMounted as m, onUnmounted as p, openBlock as u, createElementBlock as d, createElementVNode as n } from "vue";
2
2
  import g from "@arcgis/core/layers/GraphicsLayer";
3
- import k from "@arcgis/core/widgets/Sketch/SketchViewModel";
4
- const y = { class: "gisviewer-sketch-tool gisviewer-sketch-tool-position" }, _ = /* @__PURE__ */ a({
3
+ import y from "@arcgis/core/widgets/Sketch/SketchViewModel";
4
+ const k = { class: "gisviewer-sketch-tool gisviewer-sketch-tool-position" }, _ = /* @__PURE__ */ a({
5
5
  __name: "sketch-tool",
6
6
  props: {
7
7
  view: {}
@@ -11,7 +11,7 @@ const y = { class: "gisviewer-sketch-tool gisviewer-sketch-tool-position" }, _ =
11
11
  let o;
12
12
  m(() => {
13
13
  const e = new g();
14
- c.view.map.add(e), o = new k({
14
+ c.view.map.add(e), o = new y({
15
15
  layer: e,
16
16
  view: c.view
17
17
  });
@@ -19,26 +19,26 @@ const y = { class: "gisviewer-sketch-tool gisviewer-sketch-tool-position" }, _ =
19
19
  o.destroy();
20
20
  });
21
21
  const i = () => {
22
- }, s = (e) => {
23
- var r;
22
+ }, r = (e) => {
23
+ var s;
24
24
  console.log(e);
25
- const t = (r = e.target) == null ? void 0 : r.value;
25
+ const t = (s = e.target) == null ? void 0 : s.value;
26
26
  console.log(t), o.create(t);
27
27
  };
28
- return (e, t) => (u(), d("div", y, [
28
+ return (e, t) => (u(), d("div", k, [
29
29
  n("button", {
30
30
  class: "esri-icon-pan geometry-button",
31
31
  onClick: i
32
32
  }),
33
33
  n("button", {
34
- class: "esri-icon-checkbox-unchecked geometry-button",
34
+ class: "esri-icon-cursor geometry-button",
35
35
  value: "rectangle",
36
- onClick: s
36
+ onClick: r
37
37
  }),
38
38
  n("button", {
39
39
  class: "esri-icon-polygon geometry-button",
40
40
  value: "polygon",
41
- onClick: s
41
+ onClick: r
42
42
  })
43
43
  ]));
44
44
  }
@@ -1,7 +1,7 @@
1
1
  import b from "@arcgis/core/Basemap";
2
2
  import g from "@arcgis/core/config";
3
3
  import * as M from "@arcgis/core/core/reactiveUtils";
4
- import { Polygon as P, Polyline as W, Point as T } from "@arcgis/core/geometry";
4
+ import { Polygon as k, Polyline as W, Point as T } from "@arcgis/core/geometry";
5
5
  import * as f from "@arcgis/core/geometry/support/webMercatorUtils";
6
6
  import z from "@arcgis/core/layers/GeoJSONLayer";
7
7
  import x from "@arcgis/core/layers/TileLayer";
@@ -13,7 +13,7 @@ import H from "@turf/destination";
13
13
  import * as I from "@turf/helpers";
14
14
  import O from "../stores/index.mjs";
15
15
  import G from "./custom-layer/custom-wmts-layer.mjs";
16
- function k(l, e) {
16
+ function P(l, e) {
17
17
  return l && (l.startsWith("http://") || l.startsWith("https://") ? l : e + l);
18
18
  }
19
19
  class F {
@@ -95,7 +95,7 @@ class F {
95
95
  );
96
96
  });
97
97
  }), t != null && t.baseLayers ? t.baseLayers.forEach((s) => {
98
- const h = k(s.url, t.assetsRoot);
98
+ const h = P(s.url, t.assetsRoot);
99
99
  switch (s.type.toLowerCase()) {
100
100
  case "webTile".toLowerCase(): {
101
101
  const c = new L({
@@ -129,7 +129,7 @@ class F {
129
129
  }
130
130
  }) : n.basemap = new b({
131
131
  style: {
132
- id: "arcgis/dark-gray",
132
+ id: "arcgis/light-gray",
133
133
  language: "zh-CN"
134
134
  }
135
135
  }), t != null && t.hdLayers) {
@@ -137,7 +137,7 @@ class F {
137
137
  (h) => (
138
138
  // 图层文件为GeoJson格式, renderer和symbol使用autocast配置
139
139
  new z({
140
- url: k(h.url, t.assetsRoot),
140
+ url: P(h.url, t.assetsRoot),
141
141
  ...h.options,
142
142
  title: h.options.id
143
143
  })
@@ -187,7 +187,7 @@ class F {
187
187
  e.target = new W(e.target);
188
188
  break;
189
189
  case "polygon":
190
- e.target = new P(e.target);
190
+ e.target = new k(e.target);
191
191
  break;
192
192
  }
193
193
  await this.view.goTo(e, { duration: (e.duration || 0) * 1e3 });
@@ -285,7 +285,7 @@ class x {
285
285
  type: "CIMSymbolReference",
286
286
  primitiveOverrides: [
287
287
  {
288
- // 将textGraphic的TextString替换为graphic.attributes.showName
288
+ // 将textGraphic的TextString替换为graphic.attributes.name
289
289
  type: "CIMPrimitiveOverride",
290
290
  primitiveName: "textGraphic",
291
291
  propertyName: "TextString",
@@ -300,7 +300,7 @@ class x {
300
300
  symbol: {
301
301
  type: "CIMPointSymbol",
302
302
  symbolLayers: [
303
- // 车辆号牌
303
+ // 路口名称
304
304
  {
305
305
  type: "CIMVectorMarker",
306
306
  size: 32,
@@ -347,7 +347,7 @@ class x {
347
347
  scaleSymbolsProportionally: !0,
348
348
  respectFrame: !0
349
349
  },
350
- // 车辆图标
350
+ // 路口图标
351
351
  {
352
352
  type: "CIMPictureMarker",
353
353
  enable: !0,
@@ -1,9 +1,9 @@
1
+ import Graphic from '@arcgis/core/Graphic';
1
2
  import GraphicsLayer from '@arcgis/core/layers/GraphicsLayer';
2
3
  import MapView from '@arcgis/core/views/MapView';
3
4
  import SceneView from '@arcgis/core/views/SceneView';
4
- import SketchViewModel from '@arcgis/core/widgets/Sketch/SketchViewModel';
5
5
  import Sketch from '@arcgis/core/widgets/Sketch';
6
- import Graphic from '@arcgis/core/Graphic';
6
+ import SketchViewModel from '@arcgis/core/widgets/Sketch/SketchViewModel';
7
7
  interface sketchViewOptions {
8
8
  /**
9
9
  * 最大允许绘制的图形数量
@@ -16,7 +16,7 @@ interface sketchViewOptions {
16
16
  /**
17
17
  * 绘制工具显示的元素
18
18
  */
19
- sketchvisibleElements?: {};
19
+ sketchVisibleElements?: {};
20
20
  /**
21
21
  * 绘制工具显示的位置
22
22
  */
@@ -27,7 +27,7 @@ interface sketchViewOptions {
27
27
  * @type {boolean}
28
28
  * @memberof sketchViewOptions
29
29
  */
30
- defaultsketchVisible?: boolean;
30
+ defaultSketchVisible?: boolean;
31
31
  sketchViewModelItemSymbol?: {
32
32
  polylineSymbol?: any;
33
33
  polygonSymbol?: any;
@@ -42,7 +42,7 @@ declare type LinearUnits = 'meters' | 'feet' | 'kilometers' | 'miles' | 'nautica
42
42
  export default class SketchView {
43
43
  private viewer;
44
44
  graphicsLayer: GraphicsLayer;
45
- TextgraphicsLayer: GraphicsLayer;
45
+ TextGraphicsLayer: GraphicsLayer;
46
46
  sketchViewModel: SketchViewModel;
47
47
  sketch: Sketch;
48
48
  options: sketchViewOptions;
@@ -74,10 +74,10 @@ export default class SketchView {
74
74
  * @returns
75
75
  * @memberof SketchView
76
76
  */
77
- inintSectionArea(data: any, reverse?: boolean): any;
77
+ initSectionArea(data: any, reverse?: boolean): any;
78
78
  createPolylineGraphic(paths: any, lineSymbol: any, attributes: any): Graphic;
79
79
  createPolygonGraphic(rings: any, lineSymbol: any, attributes: any): Graphic;
80
- on(callcack?: (type: string, points: any, event?: any) => void): void;
80
+ on(callback?: (type: string, points: any, event?: any) => void): void;
81
81
  /**
82
82
  * 获取当前绘制的计算区域
83
83
  * @returns
@@ -105,7 +105,7 @@ export default class SketchView {
105
105
  attributes: any;
106
106
  };
107
107
  };
108
- rawdata: {
108
+ rawData: {
109
109
  point: any;
110
110
  type: string;
111
111
  attributes: any;
@@ -115,7 +115,7 @@ export default class SketchView {
115
115
  * 获取进口道所在的进口道编号
116
116
  *
117
117
  * @param {armData} armData 进口道编号区域
118
- * @param {*} graphicPpolygon 绘制的区域
118
+ * @param {*} graphicPolygon 绘制的区域
119
119
  * @returns
120
120
  * @memberof SketchView
121
121
  */
@@ -126,7 +126,7 @@ export default class SketchView {
126
126
  *
127
127
  * @private
128
128
  * @param {*} geometry
129
- * @param {boolean} [isfilterData=true] 是否过滤首尾相同点数据
129
+ * @param {boolean} [isFilterData=true] 是否过滤首尾相同点数据
130
130
  * @returns
131
131
  * @memberof SketchView
132
132
  */
@@ -152,7 +152,7 @@ export default class SketchView {
152
152
  * @returns
153
153
  * @memberof SketchView
154
154
  */
155
- getshiftLine(lineGeometry: __esri.Geometry, distance: number, offsetUnit?: LinearUnits): __esri.Geometry | __esri.Geometry[];
155
+ getShiftLine(lineGeometry: __esri.Geometry, distance: number, offsetUnit?: LinearUnits): __esri.Geometry | __esri.Geometry[];
156
156
  /**
157
157
  * 设置线的平移
158
158
  *
@@ -161,7 +161,7 @@ export default class SketchView {
161
161
  * @param {*} symbol 线的样式
162
162
  * @memberof SketchView
163
163
  */
164
- setshiftLine(distance: number, offsetUnit?: LinearUnits, symbol?: any): void;
164
+ setShiftLine(distance: number, offsetUnit?: LinearUnits, symbol?: any): void;
165
165
  /**
166
166
  * 移除平移线
167
167
  *
@@ -173,7 +173,7 @@ export default class SketchView {
173
173
  *
174
174
  * @memberof SketchView
175
175
  */
176
- removedraw(): void;
176
+ removeDraw(): void;
177
177
  addGraphic(geometry: any, symbol?: any, attributes?: any): void;
178
178
  /**
179
179
  * 获取方向
@@ -202,7 +202,7 @@ export default class SketchView {
202
202
  * 设置最大允许绘制的图形数量
203
203
  * @param num 数量
204
204
  */
205
- setmaxAllowedGraphics(num: number): void;
205
+ setMaxAllowedGraphics(num: number): void;
206
206
  deepClone(obj: any): void;
207
207
  destroy(): void;
208
208
  }