hj-gis-sdk 1.0.0 → 1.0.2

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 (194) hide show
  1. package/README.md +50 -59
  2. package/dev-dist/animation.esm.js +152 -0
  3. package/dev-dist/animation.esm.js.map +1 -0
  4. package/dev-dist/animation.js +154 -0
  5. package/dev-dist/animation.js.map +1 -0
  6. package/dev-dist/building.esm.js +85 -0
  7. package/dev-dist/building.esm.js.map +1 -0
  8. package/dev-dist/building.js +87 -0
  9. package/dev-dist/building.js.map +1 -0
  10. package/dev-dist/common.esm.js +16159 -0
  11. package/dev-dist/common.esm.js.map +1 -0
  12. package/dev-dist/common.js +16163 -0
  13. package/dev-dist/common.js.map +1 -0
  14. package/dev-dist/fence.esm.js +100 -0
  15. package/dev-dist/fence.esm.js.map +1 -0
  16. package/dev-dist/fence.js +102 -0
  17. package/dev-dist/fence.js.map +1 -0
  18. package/dev-dist/ghost.esm.js +53 -0
  19. package/dev-dist/ghost.esm.js.map +1 -0
  20. package/dev-dist/ghost.js +55 -0
  21. package/dev-dist/ghost.js.map +1 -0
  22. package/dev-dist/heatmap.esm.js +103 -0
  23. package/dev-dist/heatmap.esm.js.map +1 -0
  24. package/dev-dist/heatmap.js +105 -0
  25. package/dev-dist/heatmap.js.map +1 -0
  26. package/dev-dist/index.esm.js +21 -0
  27. package/dev-dist/index.esm.js.map +1 -0
  28. package/dev-dist/index.esm2.js +4272 -0
  29. package/dev-dist/index.esm2.js.map +1 -0
  30. package/dev-dist/index.js +26 -0
  31. package/dev-dist/index.js.map +1 -0
  32. package/dev-dist/index2.js +4280 -0
  33. package/dev-dist/index2.js.map +1 -0
  34. package/dev-dist/keyframe.esm.js +95 -0
  35. package/dev-dist/keyframe.esm.js.map +1 -0
  36. package/dev-dist/keyframe.js +97 -0
  37. package/dev-dist/keyframe.js.map +1 -0
  38. package/dev-dist/measurement.esm.js +57 -0
  39. package/dev-dist/measurement.esm.js.map +1 -0
  40. package/dev-dist/measurement.js +59 -0
  41. package/dev-dist/measurement.js.map +1 -0
  42. package/dev-dist/scatter.esm.js +85 -0
  43. package/dev-dist/scatter.esm.js.map +1 -0
  44. package/dev-dist/scatter.js +87 -0
  45. package/dev-dist/scatter.js.map +1 -0
  46. package/dev-dist/src.esm.js +289 -0
  47. package/dev-dist/src.esm.js.map +1 -0
  48. package/dev-dist/src.js +291 -0
  49. package/dev-dist/src.js.map +1 -0
  50. package/dev-dist/types/hj-gis-sdk/addons/animation/animate-clip.d.ts +39 -0
  51. package/dev-dist/types/hj-gis-sdk/addons/animation/animate-clip.d.ts.map +1 -0
  52. package/dev-dist/types/hj-gis-sdk/addons/animation/animation-action.d.ts +31 -0
  53. package/dev-dist/types/hj-gis-sdk/addons/animation/animation-action.d.ts.map +1 -0
  54. package/dev-dist/types/hj-gis-sdk/addons/animation/animation-mixer.d.ts +18 -0
  55. package/dev-dist/types/hj-gis-sdk/addons/animation/animation-mixer.d.ts.map +1 -0
  56. package/dev-dist/types/hj-gis-sdk/addons/animation/index.d.ts +5 -0
  57. package/dev-dist/types/hj-gis-sdk/addons/animation/index.d.ts.map +1 -0
  58. package/dev-dist/types/hj-gis-sdk/addons/camera.d.ts +59 -0
  59. package/dev-dist/types/hj-gis-sdk/addons/camera.d.ts.map +1 -0
  60. package/dev-dist/types/hj-gis-sdk/addons/clock.d.ts +40 -0
  61. package/dev-dist/types/hj-gis-sdk/addons/clock.d.ts.map +1 -0
  62. package/dev-dist/types/hj-gis-sdk/addons/commander/context.d.ts +24 -0
  63. package/dev-dist/types/hj-gis-sdk/addons/commander/context.d.ts.map +1 -0
  64. package/dev-dist/types/hj-gis-sdk/addons/commander/dispatcher.d.ts +43 -0
  65. package/dev-dist/types/hj-gis-sdk/addons/commander/dispatcher.d.ts.map +1 -0
  66. package/dev-dist/types/hj-gis-sdk/addons/commander/excutor/base.d.ts +22 -0
  67. package/dev-dist/types/hj-gis-sdk/addons/commander/excutor/base.d.ts.map +1 -0
  68. package/dev-dist/types/hj-gis-sdk/addons/loader/index.d.ts +6 -0
  69. package/dev-dist/types/hj-gis-sdk/addons/loader/index.d.ts.map +1 -0
  70. package/dev-dist/types/hj-gis-sdk/addons/loader/loader.d.ts +4 -0
  71. package/dev-dist/types/hj-gis-sdk/addons/loader/loader.d.ts.map +1 -0
  72. package/dev-dist/types/hj-gis-sdk/addons/node/base.d.ts +63 -0
  73. package/dev-dist/types/hj-gis-sdk/addons/node/base.d.ts.map +1 -0
  74. package/dev-dist/types/hj-gis-sdk/addons/node/ue-node.d.ts +82 -0
  75. package/dev-dist/types/hj-gis-sdk/addons/node/ue-node.d.ts.map +1 -0
  76. package/dev-dist/types/hj-gis-sdk/addons/proxy.d.ts +83 -0
  77. package/dev-dist/types/hj-gis-sdk/addons/proxy.d.ts.map +1 -0
  78. package/dev-dist/types/hj-gis-sdk/addons/tools/base.d.ts +7 -0
  79. package/dev-dist/types/hj-gis-sdk/addons/tools/base.d.ts.map +1 -0
  80. package/dev-dist/types/hj-gis-sdk/addons/tools/building.d.ts +36 -0
  81. package/dev-dist/types/hj-gis-sdk/addons/tools/building.d.ts.map +1 -0
  82. package/dev-dist/types/hj-gis-sdk/addons/tools/daytime.d.ts +7 -0
  83. package/dev-dist/types/hj-gis-sdk/addons/tools/daytime.d.ts.map +1 -0
  84. package/dev-dist/types/hj-gis-sdk/addons/tools/fence.d.ts +61 -0
  85. package/dev-dist/types/hj-gis-sdk/addons/tools/fence.d.ts.map +1 -0
  86. package/dev-dist/types/hj-gis-sdk/addons/tools/ghost.d.ts +14 -0
  87. package/dev-dist/types/hj-gis-sdk/addons/tools/ghost.d.ts.map +1 -0
  88. package/dev-dist/types/hj-gis-sdk/addons/tools/heat-map.d.ts +65 -0
  89. package/dev-dist/types/hj-gis-sdk/addons/tools/heat-map.d.ts.map +1 -0
  90. package/dev-dist/types/hj-gis-sdk/addons/tools/index.d.ts +26 -0
  91. package/dev-dist/types/hj-gis-sdk/addons/tools/index.d.ts.map +1 -0
  92. package/dev-dist/types/hj-gis-sdk/addons/tools/match-view.d.ts +7 -0
  93. package/dev-dist/types/hj-gis-sdk/addons/tools/match-view.d.ts.map +1 -0
  94. package/dev-dist/types/hj-gis-sdk/addons/tools/measurement.d.ts +13 -0
  95. package/dev-dist/types/hj-gis-sdk/addons/tools/measurement.d.ts.map +1 -0
  96. package/dev-dist/types/hj-gis-sdk/addons/tools/pick-cast.d.ts +26 -0
  97. package/dev-dist/types/hj-gis-sdk/addons/tools/pick-cast.d.ts.map +1 -0
  98. package/dev-dist/types/hj-gis-sdk/addons/tools/scatter.d.ts +57 -0
  99. package/dev-dist/types/hj-gis-sdk/addons/tools/scatter.d.ts.map +1 -0
  100. package/dev-dist/types/hj-gis-sdk/addons/tools/weather.d.ts +31 -0
  101. package/dev-dist/types/hj-gis-sdk/addons/tools/weather.d.ts.map +1 -0
  102. package/dev-dist/types/hj-gis-sdk/addons/transform.d.ts +91 -0
  103. package/dev-dist/types/hj-gis-sdk/addons/transform.d.ts.map +1 -0
  104. package/dev-dist/types/hj-gis-sdk/addons/world.d.ts +76 -0
  105. package/dev-dist/types/hj-gis-sdk/addons/world.d.ts.map +1 -0
  106. package/dev-dist/types/hj-gis-sdk/core/ue-rpc.d.ts +54 -0
  107. package/dev-dist/types/hj-gis-sdk/core/ue-rpc.d.ts.map +1 -0
  108. package/dev-dist/types/hj-gis-sdk/index.d.ts +27 -0
  109. package/dev-dist/types/hj-gis-sdk/index.d.ts.map +1 -0
  110. package/dev-dist/types/hj-gis-sdk/utils.d.ts +16 -0
  111. package/dev-dist/types/hj-gis-sdk/utils.d.ts.map +1 -0
  112. package/dev-dist/types/src/animation.d.ts +2 -0
  113. package/dev-dist/types/src/animation.d.ts.map +1 -0
  114. package/dev-dist/types/src/building.d.ts +2 -0
  115. package/dev-dist/types/src/building.d.ts.map +1 -0
  116. package/dev-dist/types/src/common.d.ts +5 -0
  117. package/dev-dist/types/src/common.d.ts.map +1 -0
  118. package/dev-dist/types/src/fence.d.ts +2 -0
  119. package/dev-dist/types/src/fence.d.ts.map +1 -0
  120. package/dev-dist/types/src/ghost.d.ts +2 -0
  121. package/dev-dist/types/src/ghost.d.ts.map +1 -0
  122. package/dev-dist/types/src/heatmap.d.ts +2 -0
  123. package/dev-dist/types/src/heatmap.d.ts.map +1 -0
  124. package/dev-dist/types/src/index.d.ts +2 -0
  125. package/dev-dist/types/src/index.d.ts.map +1 -0
  126. package/dev-dist/types/src/keyframe.d.ts +2 -0
  127. package/dev-dist/types/src/keyframe.d.ts.map +1 -0
  128. package/dev-dist/types/src/measurement.d.ts +2 -0
  129. package/dev-dist/types/src/measurement.d.ts.map +1 -0
  130. package/dev-dist/types/src/scatter.d.ts +2 -0
  131. package/dev-dist/types/src/scatter.d.ts.map +1 -0
  132. package/dev-dist/types/src/weather.d.ts +2 -0
  133. package/dev-dist/types/src/weather.d.ts.map +1 -0
  134. package/dev-dist/weather.esm.js +68 -0
  135. package/dev-dist/weather.esm.js.map +1 -0
  136. package/dev-dist/weather.js +70 -0
  137. package/dev-dist/weather.js.map +1 -0
  138. package/dist/sdk.esm.js +19 -6
  139. package/dist/sdk.esm.js.map +1 -1
  140. package/dist/sdk.js +19 -6
  141. package/dist/sdk.js.map +1 -1
  142. package/dist/sdk.umd.js +1 -1
  143. package/dist/sdk.umd.js.map +1 -1
  144. package/dist/types/hj-gis-sdk/addons/tools/scatter.d.ts.map +1 -1
  145. package/dist/types/src/common.d.ts.map +1 -1
  146. package/hj-gis-sdk/addons/animation/animate-clip.ts +93 -0
  147. package/hj-gis-sdk/addons/animation/animation-action.ts +93 -0
  148. package/hj-gis-sdk/addons/animation/animation-mixer.ts +51 -0
  149. package/hj-gis-sdk/addons/animation/index.ts +17 -0
  150. package/hj-gis-sdk/addons/camera.ts +173 -0
  151. package/hj-gis-sdk/addons/clock.ts +85 -0
  152. package/hj-gis-sdk/addons/commander/context.ts +70 -0
  153. package/hj-gis-sdk/addons/commander/dispatcher.ts +68 -0
  154. package/hj-gis-sdk/addons/commander/excutor/base.ts +26 -0
  155. package/hj-gis-sdk/addons/loader/index.ts +7 -0
  156. package/hj-gis-sdk/addons/loader/loader.ts +3 -0
  157. package/hj-gis-sdk/addons/node/base.ts +131 -0
  158. package/hj-gis-sdk/addons/node/ue-node.ts +147 -0
  159. package/hj-gis-sdk/addons/proxy.ts +200 -0
  160. package/hj-gis-sdk/addons/tools/base.ts +11 -0
  161. package/hj-gis-sdk/addons/tools/building.ts +84 -0
  162. package/hj-gis-sdk/addons/tools/daytime.ts +14 -0
  163. package/hj-gis-sdk/addons/tools/fence.ts +105 -0
  164. package/hj-gis-sdk/addons/tools/ghost.ts +31 -0
  165. package/hj-gis-sdk/addons/tools/heat-map.ts +95 -0
  166. package/hj-gis-sdk/addons/tools/index.ts +25 -0
  167. package/hj-gis-sdk/addons/tools/match-view.ts +35 -0
  168. package/hj-gis-sdk/addons/tools/measurement.ts +25 -0
  169. package/hj-gis-sdk/addons/tools/pick-cast.ts +67 -0
  170. package/hj-gis-sdk/addons/tools/scatter.ts +230 -0
  171. package/hj-gis-sdk/addons/tools/weather.ts +40 -0
  172. package/hj-gis-sdk/addons/transform.ts +126 -0
  173. package/hj-gis-sdk/addons/world.ts +173 -0
  174. package/hj-gis-sdk/core/ue-rpc.ts +234 -0
  175. package/hj-gis-sdk/index.ts +26 -0
  176. package/hj-gis-sdk/utils.ts +52 -0
  177. package/index.html +48 -0
  178. package/package-lock.json +7368 -0
  179. package/package.json +17 -4
  180. package/rollup.config.dev.js +107 -0
  181. package/rollup.config.js +52 -0
  182. package/src/animation.ts +175 -0
  183. package/src/building.ts +114 -0
  184. package/src/common.ts +47 -0
  185. package/src/fence.ts +131 -0
  186. package/src/ghost.ts +70 -0
  187. package/src/heatmap.ts +125 -0
  188. package/src/index.ts +350 -0
  189. package/src/keyframe.ts +113 -0
  190. package/src/measurement.ts +80 -0
  191. package/src/scatter.ts +105 -0
  192. package/src/weather.ts +86 -0
  193. package/tsconfig.json +30 -0
  194. package/yarn.lock +3108 -0
@@ -0,0 +1,80 @@
1
+ import { Addons } from 'hj-gis-sdk'
2
+
3
+ /// 测量示例
4
+
5
+ import { PerspectiveCamera } from 'hj-gis-sdk/addons/camera'
6
+ import { initializeApp } from './common'
7
+
8
+ import GUI from 'lil-gui'
9
+ import { Logger, LogLevel } from '@epicgames-ps/lib-pixelstreamingcommon-ue5.5'
10
+
11
+ Logger.InitLogging(LogLevel.Info, false)
12
+ const { UERPCNode, MeasurementType } = Addons
13
+
14
+ let world: InstanceType<typeof Addons.World>
15
+ let camera: InstanceType<typeof PerspectiveCamera>
16
+
17
+ let measurementNode: InstanceType<typeof UERPCNode>
18
+
19
+ async function _initializeApp() {
20
+ // const url = `ws://120.27.198.158:9001/player`
21
+ const url = `wss://kdyjs-proxy.metamaker.cn/proxy_gis_sdk`
22
+ const AppElement = document.querySelector('#ue')! as HTMLElement
23
+ let result = await initializeApp(url, AppElement)
24
+ world = result.world
25
+ camera = result.camera
26
+
27
+ // 加载地图 并 调整 camera 的站位
28
+ await world!.loadLevelByName('plgz')
29
+ camera!.transform.rotation.pitch = -12.259792797845645
30
+ camera!.transform.rotation.yaw = 126.9423080594274
31
+ camera!.transform.rotation.roll = 0.00003001662846458654
32
+ camera!.transform.position.set(
33
+ -234809.24784008358,
34
+ -74593.71088085348,
35
+ 13755.085257765979
36
+ )
37
+ }
38
+
39
+ // 判断 window 是否初始化完成
40
+ if (document.readyState === 'loading') {
41
+ // 文档正在加载,等待DOMContentLoaded事件
42
+ document.addEventListener('DOMContentLoaded', _initializeApp)
43
+ } else {
44
+ // 文档已经加载完成,直接初始化应用
45
+ _initializeApp()
46
+ }
47
+
48
+ const MeasurementOptions = {
49
+ 区域: MeasurementType.Area,
50
+ 线段: MeasurementType.Path,
51
+ 高度: MeasurementType.Height
52
+ }
53
+
54
+ const MeasurementConfig = {
55
+ measurement: ''
56
+ }
57
+
58
+ const gui = new GUI()
59
+
60
+ gui.add(MeasurementConfig, 'measurement', MeasurementOptions).name('测量类型')
61
+ gui
62
+ .add(
63
+ {
64
+ measure: () => {
65
+ world!.tools.measurement.draw(MeasurementConfig.measurement)
66
+ }
67
+ },
68
+ 'measure'
69
+ )
70
+ .name('测量开始')
71
+ gui
72
+ .add(
73
+ {
74
+ cancel: () => {
75
+ world!.tools.measurement.clean()
76
+ }
77
+ },
78
+ 'cancel'
79
+ )
80
+ .name('测量取消')
package/src/scatter.ts ADDED
@@ -0,0 +1,105 @@
1
+ /// 散点图
2
+
3
+ import { PerspectiveCamera } from 'hj-gis-sdk/addons/camera'
4
+ import { initializeApp } from './common'
5
+ import { Addons } from 'hj-gis-sdk'
6
+ import GUI from 'lil-gui'
7
+ import { Logger, LogLevel } from '@epicgames-ps/lib-pixelstreamingcommon-ue5.5'
8
+
9
+ Logger.InitLogging(LogLevel.Info, false)
10
+ let world: InstanceType<typeof Addons.World>
11
+ let camera: InstanceType<typeof PerspectiveCamera>
12
+
13
+ async function _initializeApp() {
14
+ // const url = `ws://120.27.198.158:9001/player`
15
+ const url = `wss://kdyjs-proxy.metamaker.cn/proxy_gis_sdk`
16
+ const AppElement = document.querySelector('#ue')! as HTMLElement
17
+ let result = await initializeApp(url, AppElement)
18
+ world = result.world
19
+ camera = result.camera
20
+
21
+ // 加载地图 并 调整 camera 的站位
22
+ await world!.loadLevelByName('plgz')
23
+
24
+ // 设置相机位置
25
+ camera!.transform.position.z = 100
26
+ camera!.transform.position.x = -100
27
+ }
28
+
29
+ // 判断 window 是否初始化完成
30
+ if (document.readyState === 'loading') {
31
+ // 文档正在加载,等待DOMContentLoaded事件
32
+ document.addEventListener('DOMContentLoaded', _initializeApp)
33
+ } else {
34
+ // 文档已经加载完成,直接初始化应用
35
+ _initializeApp()
36
+ }
37
+
38
+ // 散点图处理器类型
39
+ let handler: any
40
+ const gui = new GUI()
41
+
42
+ // GUI 配置参数
43
+ const scatterConfig = {
44
+ // 散点图配置参数
45
+ }
46
+
47
+ // 生成散点图按钮
48
+ gui
49
+ .add(
50
+ {
51
+ generate: async () => {
52
+ // 散点图生成逻辑
53
+ if (handler) {
54
+ await handler.removeAll()
55
+ handler = undefined
56
+ }
57
+
58
+ // 创建示例点集
59
+ const pointParams = [
60
+ {
61
+ location: { X: 10, Y: 10, Z: 0 },
62
+ scale: { X: 1, Y: 1, Z: 1 },
63
+ tag: 'point1',
64
+ textContent: '点1'
65
+ },
66
+ {
67
+ location: { X: 20, Y: 20, Z: 0 },
68
+ scale: { X: 1, Y: 1, Z: 1 },
69
+ tag: 'point2',
70
+ textContent: 'POI_2'
71
+ },
72
+ {
73
+ location: { X: 30, Y: 10, Z: 0 },
74
+ scale: { X: 1, Y: 1, Z: 1 },
75
+ tag: 'point3',
76
+ textContent: 'POI_3'
77
+ }
78
+ ]
79
+
80
+ // 创建散点图
81
+ handler = await world.tools.scatter.create({
82
+ pointParams: pointParams
83
+ })
84
+ console.log('散点图生成成功', handler)
85
+ }
86
+ },
87
+ 'generate'
88
+ )
89
+ .name('生成散点图')
90
+
91
+ // 销毁散点图按钮
92
+ gui
93
+ .add(
94
+ {
95
+ destroy: async () => {
96
+ if (handler) {
97
+ await handler.removeAll()
98
+ handler = undefined
99
+ console.log('散点图已销毁')
100
+ }
101
+ }
102
+ },
103
+ 'destroy'
104
+ )
105
+ .name('销毁散点图')
package/src/weather.ts ADDED
@@ -0,0 +1,86 @@
1
+ import { Addons } from 'hj-gis-sdk'
2
+
3
+ /// 天气示例
4
+
5
+ import { PerspectiveCamera } from 'hj-gis-sdk/addons/camera'
6
+ import { initializeApp } from './common'
7
+
8
+ import GUI from 'lil-gui'
9
+ import { Logger, LogLevel } from '@epicgames-ps/lib-pixelstreamingcommon-ue5.5'
10
+ Logger.InitLogging(LogLevel.Info, false)
11
+ const { UERPCNode, WeatherType } = Addons
12
+
13
+ let world: InstanceType<typeof Addons.World>
14
+ let camera: InstanceType<typeof PerspectiveCamera>
15
+
16
+ let weatherNode: InstanceType<typeof UERPCNode>
17
+
18
+ async function _initializeApp() {
19
+ // const url = `ws://120.27.198.158:9001/player`
20
+ const url = `wss://kdyjs-proxy.metamaker.cn/proxy_gis_sdk`
21
+ const AppElement = document.querySelector('#ue')! as HTMLElement
22
+ let result = await initializeApp(url, AppElement)
23
+ world = result.world
24
+ camera = result.camera
25
+
26
+ // 加载地图 并 调整 camera 的站位
27
+ await world!.loadLevelByName('plgz')
28
+ camera!.transform.rotation.pitch = -12.259792797845645
29
+ camera!.transform.rotation.yaw = 126.9423080594274
30
+ camera!.transform.rotation.roll = 0.00003001662846458654
31
+ camera!.transform.position.set(
32
+ -234809.24784008358,
33
+ -74593.71088085348,
34
+ 13755.085257765979
35
+ )
36
+ }
37
+
38
+ // 判断 window 是否初始化完成
39
+ if (document.readyState === 'loading') {
40
+ // 文档正在加载,等待DOMContentLoaded事件
41
+ document.addEventListener('DOMContentLoaded', _initializeApp)
42
+ } else {
43
+ // 文档已经加载完成,直接初始化应用
44
+ _initializeApp()
45
+ }
46
+
47
+ // 天气处理器类型
48
+ let weatherHandler: any // 实际类型需要根据项目定义
49
+ const gui = new GUI()
50
+
51
+ // 天气配置对象
52
+ const weatherConfig = {
53
+ type: '' // 默认天气类型
54
+ }
55
+
56
+ // 天气类型选项
57
+ const weatherOptions = {
58
+ 晴天: WeatherType.SUNNY,
59
+ 雾天: WeatherType.Foggy,
60
+ 雨天: WeatherType.RAIN,
61
+ 雪天: WeatherType.SNOW
62
+ }
63
+
64
+ // 添加天气类型下拉菜单
65
+ gui
66
+ .add(weatherConfig, 'type', weatherOptions)
67
+ .name('天气类型')
68
+ .onChange(async (value: string) => {
69
+ // 当选择变化时,根据选择的天气类型调用相应的方法
70
+ switch (value) {
71
+ case WeatherType.SUNNY:
72
+ await world.tools.weather.setWeather(WeatherType.SUNNY)
73
+ break
74
+ case WeatherType.Foggy:
75
+ await world.tools.weather.setWeather(WeatherType.Foggy)
76
+ break
77
+ case WeatherType.RAIN:
78
+ await world.tools.weather.setWeather(WeatherType.RAIN)
79
+ break
80
+ case WeatherType.SNOW:
81
+ await world.tools.weather.setWeather(WeatherType.SNOW)
82
+ break
83
+ default:
84
+ console.log('未知的天气类型:', value)
85
+ }
86
+ })
package/tsconfig.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ESNext",
5
+ "lib": ["ES2024", "DOM"],
6
+ "moduleResolution": "node",
7
+ "strict": true,
8
+ "noImplicitAny": true,
9
+ "strictNullChecks": true,
10
+ "strictFunctionTypes": true,
11
+ "strictBindCallApply": true,
12
+ "strictPropertyInitialization": true,
13
+ "noImplicitThis": true,
14
+ "alwaysStrict": true,
15
+ "esModuleInterop": true,
16
+ "skipLibCheck": true,
17
+ "forceConsistentCasingInFileNames": true,
18
+ "noEmit": true,
19
+ "declaration": true,
20
+ "declarationDir": "./dist/types",
21
+ "declarationMap": true,
22
+ "sourceMap": true,
23
+ "rootDir": ".",
24
+ "resolveJsonModule": true,
25
+ "typeRoots": ["./types", "./node_modules/@types"],
26
+ "baseUrl": "."
27
+ },
28
+ "include": ["hj-gis-sdk/**/*", "src/**/*"],
29
+ "exclude": ["node_modules", "dist", "types"]
30
+ }