gisviewer-vue3-arcgis 1.0.122 → 1.0.124

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.
Files changed (27) hide show
  1. package/es/src/gis-map/gis-map.vue.d.ts +5 -0
  2. package/es/src/gis-map/gis-map.vue.mjs +103 -97
  3. package/es/src/gis-map/index.d.ts +4 -0
  4. package/es/src/gis-map/style/index.css +1 -1
  5. package/es/src/gis-map/utils/custom-layer/custom-wmts-layer.d.ts +6 -0
  6. package/es/src/gis-map/utils/custom-layer/custom-wmts-layer.mjs +21 -0
  7. package/es/src/gis-map/utils/map-initializer.mjs +43 -33
  8. package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +1 -0
  9. package/es/src/gis-map/utils/open-drive-renderer/index.mjs +128 -116
  10. package/es/src/gis-map/utils/signal-control-area-controller/district-controller.d.ts +20 -0
  11. package/es/src/gis-map/utils/signal-control-area-controller/district-controller.mjs +34 -0
  12. package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +15 -0
  13. package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +171 -0
  14. package/lib/src/gis-map/gis-map.vue.d.ts +5 -0
  15. package/lib/src/gis-map/gis-map.vue.js +1 -1
  16. package/lib/src/gis-map/index.d.ts +4 -0
  17. package/lib/src/gis-map/style/index.css +1 -1
  18. package/lib/src/gis-map/utils/custom-layer/custom-wmts-layer.d.ts +6 -0
  19. package/lib/src/gis-map/utils/custom-layer/custom-wmts-layer.js +1 -0
  20. package/lib/src/gis-map/utils/map-initializer.js +1 -1
  21. package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +1 -0
  22. package/lib/src/gis-map/utils/open-drive-renderer/index.js +4 -2
  23. package/lib/src/gis-map/utils/signal-control-area-controller/district-controller.d.ts +20 -0
  24. package/lib/src/gis-map/utils/signal-control-area-controller/district-controller.js +1 -0
  25. package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +15 -0
  26. package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -0
  27. package/package.json +3 -1
@@ -7,6 +7,7 @@ import OpenDriveRenderer from './utils/open-drive-renderer';
7
7
  import Overlay from './utils/overlay';
8
8
  import QueueLength from './utils/queue-length';
9
9
  import RoadConfigTool from './utils/road-config-tool';
10
+ import SignalControlAreaController from './utils/signal-control-area-controller';
10
11
  import TrafficFlow from './utils/traffic-flow';
11
12
  declare const _sfc_main: import("vue").DefineComponent<{
12
13
  config: {
@@ -27,6 +28,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
27
28
  overlay: Overlay;
28
29
  queueLength: QueueLength;
29
30
  openDriveRenderer: OpenDriveRenderer;
31
+ signalControlAreaController: SignalControlAreaController;
30
32
  showLogDiv: import("vue").Ref<boolean>;
31
33
  mapViewer: import("vue").ComputedRef<MapView | SceneView>;
32
34
  startSaveTrackLog: () => void;
@@ -72,6 +74,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
72
74
  clearOpenDrive: () => Promise<void>;
73
75
  findSumoInOpenDrive: (params: IFindSumoParams) => Promise<import("../types").IResult>;
74
76
  splitOpenDriveLane: (params: ISplitOpenDriveLaneParams) => Promise<import("../types").IResult>;
77
+ showSignalControlArea: (params: any) => import("../types").IResult;
78
+ clearSignalControlArea: () => void;
79
+ locateSignalControlArea: (params: any) => import("../types").IResult;
75
80
  props: any;
76
81
  emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
77
82
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("mapLoaded" | "markerClick" | "mapClick")[], "mapLoaded" | "markerClick" | "mapClick", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1,146 +1,152 @@
1
- import { defineComponent as ue, ref as h, onMounted as fe, getCurrentInstance as ge, computed as we, openBlock as de, createElementBlock as ve, createElementVNode as p, withDirectives as ye, vShow as he } from "vue";
2
- import C, { registerStore as Ce } from "./stores/index.mjs";
1
+ import { defineComponent as de, ref as h, onMounted as ve, getCurrentInstance as ye, computed as Ce, openBlock as he, createElementBlock as Oe, createElementVNode as u, withDirectives as ke, vShow as Se } from "vue";
2
+ import O, { registerStore as Te } from "./stores/index.mjs";
3
3
  import "./style/index.css";
4
- import Oe from "./utils/holo-flow/index.mjs";
5
- import ke from "./utils/map-initializer.mjs";
6
- import O from "./utils/open-drive-renderer/index.mjs";
7
- import Te from "./utils/overlay.mjs";
8
- import Le from "./utils/queue-length.mjs";
9
- import k from "./utils/road-config-tool/index.mjs";
10
- import De from "./utils/traffic-flow.mjs";
11
- const Se = { class: "gis-viewer" }, be = { style: { position: "absolute", bottom: "10px", left: "10px" } }, Ne = /* @__PURE__ */ ue({
4
+ import Le from "./utils/holo-flow/index.mjs";
5
+ import Ae from "./utils/map-initializer.mjs";
6
+ import k from "./utils/open-drive-renderer/index.mjs";
7
+ import De from "./utils/overlay.mjs";
8
+ import be from "./utils/queue-length.mjs";
9
+ import S from "./utils/road-config-tool/index.mjs";
10
+ import Ie from "./utils/signal-control-area-controller/index.mjs";
11
+ import _e from "./utils/traffic-flow.mjs";
12
+ const xe = { class: "gis-viewer" }, Me = { style: { position: "absolute", bottom: "10px", left: "10px" } }, Ze = /* @__PURE__ */ de({
12
13
  __name: "gis-map",
13
14
  props: {
14
15
  config: {},
15
16
  assetsRoot: {}
16
17
  },
17
18
  emits: ["mapLoaded", "markerClick", "mapClick"],
18
- setup(T, { expose: L, emit: D }) {
19
- const u = h(null);
20
- let s, i, o, n, r, a, l, t;
19
+ setup(T, { expose: L, emit: A }) {
20
+ const g = h(null);
21
+ let s, i, o, n, r, a, m, t, c;
21
22
  const f = h(!1);
22
- fe(async () => {
23
- if (Ce(), !u.value)
23
+ ve(async () => {
24
+ if (Te(), !g.value)
24
25
  return;
25
- document.addEventListener("keydown", (m) => {
26
- m.ctrlKey && m.key === "i" && (f.value = !f.value);
26
+ document.addEventListener("keydown", (p) => {
27
+ p.ctrlKey && p.key === "i" && (f.value = !f.value);
27
28
  });
28
- const e = ge(), { $gisviewerAssetsRoot: c } = e.appContext.config.globalProperties, y = await (await fetch(v.config)).json();
29
- y.assetsRoot = v.assetsRoot || c;
30
- const me = C.useAppDataStore;
31
- me.mapConfig = y, i = new ke(), s = await i.initialize({
32
- container: u.value,
33
- markerClickCallback: (m, w, d, pe) => {
34
- g("markerClick", m, w, d, pe);
29
+ const e = ye(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, C = await (await fetch(y.config)).json();
30
+ C.assetsRoot = y.assetsRoot || l;
31
+ const fe = O.useAppDataStore;
32
+ fe.mapConfig = C, i = new Ae(), s = await i.initialize({
33
+ container: g.value,
34
+ markerClickCallback: (p, d, v, we) => {
35
+ w("markerClick", p, d, v, we);
35
36
  },
36
- mapClickCallback: (m, w, d) => {
37
- g("mapClick", m, w, d);
37
+ mapClickCallback: (p, d, v) => {
38
+ w("mapClick", p, d, v);
38
39
  }
39
- }), r = new Oe(s), await r.init(), g("mapLoaded");
40
+ }), r = new Le(s), await r.init(), w("mapLoaded");
40
41
  });
41
- const S = we(() => s), b = () => {
42
- const e = C.useAppDataStore;
42
+ const D = Ce(() => s), b = () => {
43
+ const e = O.useAppDataStore;
43
44
  e.saveTrackLog = !0;
44
45
  }, I = () => {
45
46
  r.downloadTrackLog();
46
- }, A = async (e) => await i.setMapCenter(e), _ = async (e) => await i.setMapCamera(e), x = async (e) => await i.lookAt(e), M = (e) => i.setLayerVisibility(e), F = (e, c) => i.requestCoordinateTransform(e, c), V = (e) => {
47
+ }, _ = async (e) => await i.setMapCenter(e), x = async (e) => await i.setMapCamera(e), M = async (e) => await i.lookAt(e), F = (e) => i.setLayerVisibility(e), V = (e, l) => i.requestCoordinateTransform(e, l), B = (e) => {
47
48
  i.cancelCoordinateTransform(e);
48
- }, B = (e) => {
49
+ }, H = (e) => {
49
50
  i.setMapZoomRange(e);
50
- }, H = (e) => (o || (o = new k(s)), o.showLaneNumber(e)), z = () => {
51
+ }, z = (e) => (o || (o = new S(s)), o.showLaneNumber(e)), N = () => {
51
52
  o == null || o.clearLaneNumber();
52
- }, N = async (e) => (o || (o = new k(s)), await o.initializeSearch(e)), Q = async () => o == null ? void 0 : o.calCrossIndicatorArea(), j = async () => {
53
- }, P = async (e, c) => {
54
- n || (n = new De(s)), n.connectTrafficFlow(e, c);
55
- }, R = () => {
53
+ }, Q = async (e) => (o || (o = new S(s)), await o.initializeSearch(e)), j = async () => o == null ? void 0 : o.calCrossIndicatorArea(), P = async () => {
54
+ }, R = async (e, l) => {
55
+ n || (n = new _e(s)), n.connectTrafficFlow(e, l);
56
+ }, E = () => {
56
57
  n == null || n.disconnectTrafficFlow();
57
- }, E = (e) => {
58
+ }, Z = (e) => {
58
59
  r.handleVehicleTraceData(e);
59
- }, Z = () => {
60
+ }, q = () => {
60
61
  r.clearHoloTrace();
61
- }, q = (e) => {
62
+ }, K = (e) => {
62
63
  r.setInterpolate(e);
63
- }, K = async (e) => {
64
+ }, $ = async (e) => {
64
65
  await r.handleSignalData(e);
65
- }, $ = () => {
66
+ }, G = () => {
66
67
  r.clearHoloSignal();
67
- }, G = (e) => {
68
- n == null || n.toggleTrafficInfo(e), r.toggleTrafficInfo(e);
69
68
  }, J = (e) => {
70
- r.togglePause(e);
69
+ n == null || n.toggleTrafficInfo(e), r.toggleTrafficInfo(e);
71
70
  }, U = (e) => {
72
- n == null || n.toggleTrafficObject(e), r.toggleTrafficObject(e);
71
+ r.togglePause(e);
73
72
  }, W = (e) => {
73
+ n == null || n.toggleTrafficObject(e), r.toggleTrafficObject(e);
74
+ }, X = (e) => {
74
75
  r.updatePanelContent(e);
75
- }, X = async (e) => (a || (a = new Te(s)), a.addOverlays(e)), Y = (e) => a == null ? void 0 : a.removeOverlaysByType(e), ee = (e) => a == null ? void 0 : a.removeOverlaysById(e), te = () => a == null ? void 0 : a.removeAllOverlays(), ae = () => {
76
+ }, Y = async (e) => (a || (a = new De(s)), a.addOverlays(e)), ee = (e) => a == null ? void 0 : a.removeOverlaysByType(e), te = (e) => a == null ? void 0 : a.removeOverlaysById(e), ae = () => a == null ? void 0 : a.removeAllOverlays(), oe = () => {
76
77
  a == null || a.showAllOverlays();
77
- }, oe = (e) => {
78
- l || (l = new Le(s)), l.updateQueueLength(e);
79
- }, ne = () => {
80
- l == null || l.removeQueueLength();
81
- }, re = async (e, c) => (t || (t = new O(s)), await t.showOpenDriveFromServer(e, c)), se = async (e) => (t || (t = new O(s)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), ie = async () => await (t == null ? void 0 : t.clearOpenDrive()), ce = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
78
+ }, ne = (e) => {
79
+ m || (m = new be(s)), m.updateQueueLength(e);
80
+ }, re = () => {
81
+ m == null || m.removeQueueLength();
82
+ }, se = async (e, l) => (t || (t = new k(s)), await t.showOpenDriveFromServer(e, l)), ie = async (e) => (t || (t = new k(s)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), ce = async () => await (t == null ? void 0 : t.clearOpenDrive()), le = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
82
83
  status: -1,
83
84
  message: "未加载OpenDrive地图"
84
- }, le = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
85
+ }, me = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
85
86
  status: -1,
86
87
  message: "未加载OpenDrive地图"
87
- }, v = T, g = D;
88
+ }, pe = (e) => (c || (c = new Ie(s)), c.showSignalControlArea(e)), ue = () => {
89
+ c == null || c.clearSignalControlArea();
90
+ }, ge = (e) => c ? c.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, y = T, w = A;
88
91
  return L({
89
- mapViewer: S,
90
- setLayerVisibility: M,
91
- setMapCenter: A,
92
- lookAt: x,
93
- setMapCamera: _,
94
- setMapZoomRange: B,
95
- requestCoordinateTransform: F,
96
- cancelCoordinateTransform: V,
97
- addOverlays: X,
98
- showAllOverlays: ae,
99
- removeOverlaysByType: Y,
100
- removeOverlaysById: ee,
101
- removeAllOverlays: te,
102
- showLaneNumber: H,
103
- clearLaneNumber: z,
104
- initializeAreaTool: N,
105
- calCrossIndicatorArea: Q,
106
- calRoadIndicatorArea: j,
107
- connectCarFlow: P,
108
- disconnectCarFlow: R,
109
- handleHoloVehicleTraceData: E,
110
- clearHoloTrace: Z,
111
- handleHoloSignalData: K,
112
- clearHoloSignal: $,
113
- setInterpolate: q,
114
- toggleTrafficInfo: G,
115
- toggleTrafficObject: U,
116
- toggleVehicleInfo: W,
117
- togglePause: J,
118
- updateQueueLength: oe,
119
- removeQueueLength: ne,
120
- showOpenDriveFromServer: re,
121
- showOpenDriveFromFile: se,
122
- clearOpenDrive: ie,
123
- findSumoInOpenDrive: ce,
124
- splitOpenDriveLane: le
125
- }), (e, c) => (de(), ve("div", Se, [
126
- p("div", {
92
+ mapViewer: D,
93
+ setLayerVisibility: F,
94
+ setMapCenter: _,
95
+ lookAt: M,
96
+ setMapCamera: x,
97
+ setMapZoomRange: H,
98
+ requestCoordinateTransform: V,
99
+ cancelCoordinateTransform: B,
100
+ addOverlays: Y,
101
+ showAllOverlays: oe,
102
+ removeOverlaysByType: ee,
103
+ removeOverlaysById: te,
104
+ removeAllOverlays: ae,
105
+ showLaneNumber: z,
106
+ clearLaneNumber: N,
107
+ initializeAreaTool: Q,
108
+ calCrossIndicatorArea: j,
109
+ calRoadIndicatorArea: P,
110
+ connectCarFlow: R,
111
+ disconnectCarFlow: E,
112
+ handleHoloVehicleTraceData: Z,
113
+ clearHoloTrace: q,
114
+ handleHoloSignalData: $,
115
+ clearHoloSignal: G,
116
+ setInterpolate: K,
117
+ toggleTrafficInfo: J,
118
+ toggleTrafficObject: W,
119
+ toggleVehicleInfo: X,
120
+ togglePause: U,
121
+ updateQueueLength: ne,
122
+ removeQueueLength: re,
123
+ showOpenDriveFromServer: se,
124
+ showOpenDriveFromFile: ie,
125
+ clearOpenDrive: ce,
126
+ findSumoInOpenDrive: le,
127
+ splitOpenDriveLane: me,
128
+ showSignalControlArea: pe,
129
+ clearSignalControlArea: ue,
130
+ locateSignalControlArea: ge
131
+ }), (e, l) => (he(), Oe("div", xe, [
132
+ u("div", {
127
133
  class: "gis-viewer-main",
128
134
  ref_key: "mapContainer",
129
- ref: u
135
+ ref: g
130
136
  }, [
131
- ye(p("div", be, [
132
- p("button", {
137
+ ke(u("div", Me, [
138
+ u("button", {
133
139
  style: { "margin-right": "10px" },
134
140
  onClick: b
135
141
  }, " 开始记录 "),
136
- p("button", { onClick: I }, "下载日志")
142
+ u("button", { onClick: I }, "下载日志")
137
143
  ], 512), [
138
- [he, f.value]
144
+ [Se, f.value]
139
145
  ])
140
146
  ], 512)
141
147
  ]));
142
148
  }
143
149
  });
144
150
  export {
145
- Ne as default
151
+ Ze as default
146
152
  };
@@ -17,6 +17,7 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
17
17
  overlay: import("./utils/overlay").default;
18
18
  queueLength: import("./utils/queue-length").default;
19
19
  openDriveRenderer: import("./utils/open-drive-renderer").default;
20
+ signalControlAreaController: import("./utils/signal-control-area-controller").default;
20
21
  showLogDiv: import("vue").Ref<boolean>;
21
22
  mapViewer: import("vue").ComputedRef<__esri.MapView | __esri.SceneView>;
22
23
  startSaveTrackLog: () => void;
@@ -62,6 +63,9 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
62
63
  clearOpenDrive: () => Promise<void>;
63
64
  findSumoInOpenDrive: (params: import("../types").IFindSumoParams) => Promise<import("../types").IResult>;
64
65
  splitOpenDriveLane: (params: import("../types").ISplitOpenDriveLaneParams) => Promise<import("../types").IResult>;
66
+ showSignalControlArea: (params: any) => import("../types").IResult;
67
+ clearSignalControlArea: () => void;
68
+ locateSignalControlArea: (params: any) => import("../types").IResult;
65
69
  props: any;
66
70
  emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
67
71
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("mapLoaded" | "markerClick" | "mapClick")[], "mapLoaded" | "markerClick" | "mapClick", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1,4 +1,4 @@
1
- @import url('@arcgis/core/assets/esri/themes/dark/main.css');
1
+ @import url('@arcgis/core/assets/esri/themes/light/main.css');
2
2
  .gis-viewer {
3
3
  position: relative;
4
4
  width: 100%;
@@ -0,0 +1,6 @@
1
+ import BaseTileLayer from '@arcgis/core/layers/BaseTileLayer.js';
2
+ export default class CustomWMTS extends BaseTileLayer {
3
+ private urlTemplate;
4
+ constructor(params: any);
5
+ getTileUrl(level: number, row: number, col: number): string;
6
+ }
@@ -0,0 +1,21 @@
1
+ import { subclass as a } from "@arcgis/core/core/accessorSupport/decorators";
2
+ import c from "@arcgis/core/layers/BaseTileLayer.js";
3
+ var i = Object.defineProperty, m = Object.getOwnPropertyDescriptor, f = (e, l, t, s) => {
4
+ for (var r = s > 1 ? void 0 : s ? m(l, t) : l, p = e.length - 1, o; p >= 0; p--)
5
+ (o = e[p]) && (r = (s ? o(l, t, r) : o(r)) || r);
6
+ return s && r && i(l, t, r), r;
7
+ };
8
+ let u = class extends c {
9
+ constructor(e) {
10
+ super(e), this.urlTemplate = "", this.urlTemplate = e.urlTemplate;
11
+ }
12
+ getTileUrl(e, l, t) {
13
+ return this.urlTemplate.replace("{level}", String(e)).replace("{col}", String(t)).replace("{row}", String(l));
14
+ }
15
+ };
16
+ u = f([
17
+ a("CustomWMTS")
18
+ ], u);
19
+ export {
20
+ u as default
21
+ };
@@ -1,21 +1,22 @@
1
1
  import b from "@arcgis/core/Basemap";
2
- import u from "@arcgis/core/config";
2
+ import g from "@arcgis/core/config";
3
3
  import * as M from "@arcgis/core/core/reactiveUtils";
4
- import { Polygon as T, Polyline as z, Point as P } from "@arcgis/core/geometry";
4
+ import { Polygon as P, Polyline as W, Point as T } from "@arcgis/core/geometry";
5
5
  import * as f from "@arcgis/core/geometry/support/webMercatorUtils";
6
- import W from "@arcgis/core/layers/GeoJSONLayer";
6
+ import z from "@arcgis/core/layers/GeoJSONLayer";
7
7
  import x from "@arcgis/core/layers/TileLayer";
8
8
  import L from "@arcgis/core/layers/WebTileLayer";
9
9
  import S from "@arcgis/core/Map";
10
10
  import R from "@arcgis/core/views/MapView";
11
- import H from "@arcgis/core/views/SceneView";
12
- import I from "@turf/destination";
13
- import * as O from "@turf/helpers";
14
- import C from "../stores/index.mjs";
15
- function k(h, e) {
16
- return h && (h.startsWith("http://") || h.startsWith("https://") ? h : e + h);
11
+ import C from "@arcgis/core/views/SceneView";
12
+ import H from "@turf/destination";
13
+ import * as I from "@turf/helpers";
14
+ import O from "../stores/index.mjs";
15
+ import G from "./custom-layer/custom-wmts-layer.mjs";
16
+ function k(l, e) {
17
+ return l && (l.startsWith("http://") || l.startsWith("https://") ? l : e + l);
17
18
  }
18
- class Q {
19
+ class F {
19
20
  constructor() {
20
21
  this.mapConfig = {}, this.watchHandleMap = /* @__PURE__ */ new Map(), this.handleIndex = 0, this.zoomWatchHandle = null;
21
22
  }
@@ -25,16 +26,16 @@ class Q {
25
26
  * @returns view
26
27
  */
27
28
  async initialize(e) {
28
- const i = C.useAppDataStore, t = JSON.parse(JSON.stringify(i.mapConfig));
29
+ const i = O.useAppDataStore, t = JSON.parse(JSON.stringify(i.mapConfig));
29
30
  this.mapConfig = t;
30
31
  const { container: a, markerClickCallback: r, mapClickCallback: d } = e;
31
- u.assetsPath = `${t.assetsRoot}/ArcgisAssets`, u.fontsUrl = `${t.assetsRoot}/fonts`, u.apiKey = "AAPKf5a3e1044d7a4faeb3b1ec7060f5c68equIrP2KbRyL-t_b40Kk4GTWUQ1BFCyttvyQPQnWpFmBd7kp9gkrVihjfmcKBwxjW";
32
+ g.assetsPath = `${t.assetsRoot}/ArcgisAssets`, g.fontsUrl = `${t.assetsRoot}/fonts`, g.apiKey = "AAPKf5a3e1044d7a4faeb3b1ec7060f5c68equIrP2KbRyL-t_b40Kk4GTWUQ1BFCyttvyQPQnWpFmBd7kp9gkrVihjfmcKBwxjW";
32
33
  const n = new S();
33
34
  if ((t == null ? void 0 : t.mapOptions.mode.toLowerCase()) === "2d" ? this.view = new R({
34
35
  map: n,
35
36
  container: a,
36
37
  ...t.mapOptions
37
- }) : this.view = new H({
38
+ }) : this.view = new C({
38
39
  map: n,
39
40
  container: a,
40
41
  environment: {
@@ -76,7 +77,8 @@ class Q {
76
77
  o
77
78
  )), console.log({
78
79
  center: o.toJSON(),
79
- zoom: this.view.zoom
80
+ zoom: this.view.zoom,
81
+ scale: this.view.scale
80
82
  });
81
83
  }
82
84
  const c = (v = (await this.view.hitTest(s)).results) == null ? void 0 : v.filter(
@@ -93,11 +95,11 @@ class Q {
93
95
  );
94
96
  });
95
97
  }), t != null && t.baseLayers ? t.baseLayers.forEach((s) => {
96
- const l = k(s.url, t.assetsRoot);
98
+ const h = k(s.url, t.assetsRoot);
97
99
  switch (s.type.toLowerCase()) {
98
100
  case "webTile".toLowerCase(): {
99
101
  const c = new L({
100
- urlTemplate: l,
102
+ urlTemplate: h,
101
103
  ...s.options
102
104
  });
103
105
  n.add(c);
@@ -105,7 +107,15 @@ class Q {
105
107
  }
106
108
  case "tile": {
107
109
  const c = new x({
108
- url: l,
110
+ url: h,
111
+ ...s.options
112
+ });
113
+ n.add(c);
114
+ break;
115
+ }
116
+ case "customWMTS".toLowerCase(): {
117
+ const c = new G({
118
+ urlTemplate: h,
109
119
  ...s.options
110
120
  });
111
121
  n.add(c);
@@ -124,12 +134,12 @@ class Q {
124
134
  }
125
135
  }), t != null && t.hdLayers) {
126
136
  const s = t.hdLayers.map(
127
- (l) => (
137
+ (h) => (
128
138
  // 图层文件为GeoJson格式, renderer和symbol使用autocast配置
129
- new W({
130
- url: k(l.url, t.assetsRoot),
131
- ...l.options,
132
- title: l.options.id
139
+ new z({
140
+ url: k(h.url, t.assetsRoot),
141
+ ...h.options,
142
+ title: h.options.id
133
143
  })
134
144
  )
135
145
  );
@@ -137,23 +147,23 @@ class Q {
137
147
  }
138
148
  this.view.ui.remove("attribution"), this.view.ui.add("compass", "top-left"), await this.view.when();
139
149
  const p = this.mapConfig.camera;
140
- let g;
150
+ let u;
141
151
  if (this.view.type === "2d") {
142
152
  let s = this.view.center;
143
153
  this.view.spatialReference.isWebMercator && (s = f.webMercatorToGeographic(
144
154
  s
145
- )), g = { center: [s.x, s.y], zoom: this.view.zoom };
155
+ )), u = { center: [s.x, s.y], zoom: this.view.zoom };
146
156
  } else {
147
157
  let s = this.view.camera.position;
148
158
  this.view.spatialReference.isWebMercator && (s = f.webMercatorToGeographic(
149
159
  s
150
- )), g = {
160
+ )), u = {
151
161
  position: s,
152
162
  heading: this.view.camera.heading,
153
163
  tilt: this.view.camera.tilt
154
164
  };
155
165
  }
156
- return p ? p.home = g : this.mapConfig.camera = { home: g }, this.view;
166
+ return p ? p.home = u : this.mapConfig.camera = { home: u }, this.view;
157
167
  }
158
168
  setLayerVisibility(e) {
159
169
  const { id: i, visible: t } = e, a = this.view.map.findLayerById(i);
@@ -171,13 +181,13 @@ class Q {
171
181
  if (e.center || e.target) {
172
182
  switch ((i = e.target) == null ? void 0 : i.type) {
173
183
  case "point":
174
- e.target = new P(e.target);
184
+ e.target = new T(e.target);
175
185
  break;
176
186
  case "polyline":
177
- e.target = new z(e.target);
187
+ e.target = new W(e.target);
178
188
  break;
179
189
  case "polygon":
180
- e.target = new T(e.target);
190
+ e.target = new P(e.target);
181
191
  break;
182
192
  }
183
193
  await this.view.goTo(e, { duration: (e.duration || 0) * 1e3 });
@@ -205,8 +215,8 @@ class Q {
205
215
  { duration: (e.duration || 2) * 1e3 }
206
216
  );
207
217
  else {
208
- const a = Math.tan(i * Math.PI / 180) * e.height, r = I(
209
- O.point(e.center),
218
+ const a = Math.tan(i * Math.PI / 180) * e.height, r = H(
219
+ I.point(e.center),
210
220
  a,
211
221
  t + 180,
212
222
  {
@@ -252,7 +262,7 @@ class Q {
252
262
  }
253
263
  transformPoints(e) {
254
264
  return e.map((i) => {
255
- const t = new P({
265
+ const t = new T({
256
266
  x: i[0],
257
267
  y: i[1]
258
268
  }), a = this.view.toScreen(t);
@@ -280,5 +290,5 @@ class Q {
280
290
  }
281
291
  }
282
292
  export {
283
- Q as default
293
+ F as default
284
294
  };
@@ -18,6 +18,7 @@ export default class OpenDriveRenderer {
18
18
  private projectName;
19
19
  private openDriveServer;
20
20
  private openDriveClickCallback;
21
+ private makeMd5FromFile;
21
22
  showOpenDriveFromFile(params: IShowOpenDriveFromFileParams): Promise<IResult>;
22
23
  /**
23
24
  * 从服务器载入OpenDrive文件解析结果并显示