gisviewer-vue3-arcgis 1.0.85

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 (138) hide show
  1. package/README.md +103 -0
  2. package/es/index.d.ts +8 -0
  3. package/es/index.mjs +16 -0
  4. package/es/src/components.d.ts +9 -0
  5. package/es/src/gis-map/gis-map.vue.d.ts +91 -0
  6. package/es/src/gis-map/gis-map.vue.mjs +124 -0
  7. package/es/src/gis-map/gis-map.vue2.mjs +4 -0
  8. package/es/src/gis-map/index.d.ts +81 -0
  9. package/es/src/gis-map/index.mjs +7 -0
  10. package/es/src/gis-map/stores/appData.d.ts +3 -0
  11. package/es/src/gis-map/stores/appData.mjs +9 -0
  12. package/es/src/gis-map/stores/index.d.ts +7 -0
  13. package/es/src/gis-map/stores/index.mjs +10 -0
  14. package/es/src/gis-map/style/index.css +13 -0
  15. package/es/src/gis-map/utils/FlyToPoints.d.ts +37 -0
  16. package/es/src/gis-map/utils/FlyToPoints.mjs +67 -0
  17. package/es/src/gis-map/utils/GreenWaveline.mjs +193 -0
  18. package/es/src/gis-map/utils/Layers.d.ts +31 -0
  19. package/es/src/gis-map/utils/Layers.mjs +99 -0
  20. package/es/src/gis-map/utils/common-utils.d.ts +65 -0
  21. package/es/src/gis-map/utils/common-utils.mjs +159 -0
  22. package/es/src/gis-map/utils/holo-flow/index.d.ts +15 -0
  23. package/es/src/gis-map/utils/holo-flow/index.mjs +50 -0
  24. package/es/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +40 -0
  25. package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +209 -0
  26. package/es/src/gis-map/utils/holo-flow/trace-external-renderer.d.ts +69 -0
  27. package/es/src/gis-map/utils/holo-flow/trace-external-renderer.mjs +316 -0
  28. package/es/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +18 -0
  29. package/es/src/gis-map/utils/holo-flow/trace-holo-flow.mjs +75 -0
  30. package/es/src/gis-map/utils/holo-flow/trace-layer-renderer.d.ts +35 -0
  31. package/es/src/gis-map/utils/holo-flow/trace-layer-renderer.mjs +286 -0
  32. package/es/src/gis-map/utils/index.d.ts +21 -0
  33. package/es/src/gis-map/utils/index.mjs +23 -0
  34. package/es/src/gis-map/utils/map-initializer.d.ts +50 -0
  35. package/es/src/gis-map/utils/map-initializer.mjs +248 -0
  36. package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +9 -0
  37. package/es/src/gis-map/utils/open-drive-renderer/index.mjs +271 -0
  38. package/es/src/gis-map/utils/overlay.d.ts +83 -0
  39. package/es/src/gis-map/utils/overlay.mjs +149 -0
  40. package/es/src/gis-map/utils/queue-length.d.ts +14 -0
  41. package/es/src/gis-map/utils/queue-length.mjs +83 -0
  42. package/es/src/gis-map/utils/renderer/greenWaveline.d.ts +2 -0
  43. package/es/src/gis-map/utils/renderer/greenWaveline.mjs +169 -0
  44. package/es/src/gis-map/utils/road-config-tool/cross.d.ts +51 -0
  45. package/es/src/gis-map/utils/road-config-tool/cross.mjs +127 -0
  46. package/es/src/gis-map/utils/road-config-tool/entrance.d.ts +24 -0
  47. package/es/src/gis-map/utils/road-config-tool/entrance.mjs +79 -0
  48. package/es/src/gis-map/utils/road-config-tool/exit.d.ts +18 -0
  49. package/es/src/gis-map/utils/road-config-tool/exit.mjs +86 -0
  50. package/es/src/gis-map/utils/road-config-tool/index.d.ts +44 -0
  51. package/es/src/gis-map/utils/road-config-tool/index.mjs +112 -0
  52. package/es/src/gis-map/utils/road-config-tool/indicator-area.d.ts +22 -0
  53. package/es/src/gis-map/utils/road-config-tool/indicator-area.mjs +44 -0
  54. package/es/src/gis-map/utils/road-config-tool/lane.d.ts +21 -0
  55. package/es/src/gis-map/utils/road-config-tool/lane.mjs +35 -0
  56. package/es/src/gis-map/utils/road-config-tool/search-nearby-lanes.d.ts +62 -0
  57. package/es/src/gis-map/utils/road-config-tool/search-nearby-lanes.mjs +265 -0
  58. package/es/src/gis-map/utils/sketchView.d.ts +209 -0
  59. package/es/src/gis-map/utils/sketchView.mjs +516 -0
  60. package/es/src/gis-map/utils/sketchViewTool.d.ts +259 -0
  61. package/es/src/gis-map/utils/sketchViewTool.mjs +503 -0
  62. package/es/src/gis-map/utils/syncMapView.d.ts +43 -0
  63. package/es/src/gis-map/utils/syncMapView.mjs +64 -0
  64. package/es/src/gis-map/utils/traffic-flow.d.ts +66 -0
  65. package/es/src/gis-map/utils/traffic-flow.mjs +308 -0
  66. package/es/src/index.d.ts +1 -0
  67. package/es/src/index.mjs +4 -0
  68. package/es/src/types/index.d.ts +142 -0
  69. package/es/src/types/index.mjs +5 -0
  70. package/lib/index.d.ts +8 -0
  71. package/lib/index.js +1 -0
  72. package/lib/src/components.d.ts +9 -0
  73. package/lib/src/gis-map/gis-map.vue.d.ts +91 -0
  74. package/lib/src/gis-map/gis-map.vue.js +1 -0
  75. package/lib/src/gis-map/gis-map.vue2.js +1 -0
  76. package/lib/src/gis-map/index.d.ts +81 -0
  77. package/lib/src/gis-map/index.js +1 -0
  78. package/lib/src/gis-map/stores/appData.d.ts +3 -0
  79. package/lib/src/gis-map/stores/appData.js +1 -0
  80. package/lib/src/gis-map/stores/index.d.ts +7 -0
  81. package/lib/src/gis-map/stores/index.js +1 -0
  82. package/lib/src/gis-map/style/index.css +13 -0
  83. package/lib/src/gis-map/utils/FlyToPoints.d.ts +37 -0
  84. package/lib/src/gis-map/utils/FlyToPoints.js +1 -0
  85. package/lib/src/gis-map/utils/GreenWaveline.js +1 -0
  86. package/lib/src/gis-map/utils/Layers.d.ts +31 -0
  87. package/lib/src/gis-map/utils/Layers.js +1 -0
  88. package/lib/src/gis-map/utils/common-utils.d.ts +65 -0
  89. package/lib/src/gis-map/utils/common-utils.js +1 -0
  90. package/lib/src/gis-map/utils/holo-flow/index.d.ts +15 -0
  91. package/lib/src/gis-map/utils/holo-flow/index.js +1 -0
  92. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +40 -0
  93. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -0
  94. package/lib/src/gis-map/utils/holo-flow/trace-external-renderer.d.ts +69 -0
  95. package/lib/src/gis-map/utils/holo-flow/trace-external-renderer.js +1 -0
  96. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +18 -0
  97. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +1 -0
  98. package/lib/src/gis-map/utils/holo-flow/trace-layer-renderer.d.ts +35 -0
  99. package/lib/src/gis-map/utils/holo-flow/trace-layer-renderer.js +1 -0
  100. package/lib/src/gis-map/utils/index.d.ts +21 -0
  101. package/lib/src/gis-map/utils/index.js +1 -0
  102. package/lib/src/gis-map/utils/map-initializer.d.ts +50 -0
  103. package/lib/src/gis-map/utils/map-initializer.js +1 -0
  104. package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +9 -0
  105. package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -0
  106. package/lib/src/gis-map/utils/overlay.d.ts +83 -0
  107. package/lib/src/gis-map/utils/overlay.js +1 -0
  108. package/lib/src/gis-map/utils/queue-length.d.ts +14 -0
  109. package/lib/src/gis-map/utils/queue-length.js +1 -0
  110. package/lib/src/gis-map/utils/renderer/greenWaveline.d.ts +2 -0
  111. package/lib/src/gis-map/utils/renderer/greenWaveline.js +43 -0
  112. package/lib/src/gis-map/utils/road-config-tool/cross.d.ts +51 -0
  113. package/lib/src/gis-map/utils/road-config-tool/cross.js +1 -0
  114. package/lib/src/gis-map/utils/road-config-tool/entrance.d.ts +24 -0
  115. package/lib/src/gis-map/utils/road-config-tool/entrance.js +1 -0
  116. package/lib/src/gis-map/utils/road-config-tool/exit.d.ts +18 -0
  117. package/lib/src/gis-map/utils/road-config-tool/exit.js +1 -0
  118. package/lib/src/gis-map/utils/road-config-tool/index.d.ts +44 -0
  119. package/lib/src/gis-map/utils/road-config-tool/index.js +1 -0
  120. package/lib/src/gis-map/utils/road-config-tool/indicator-area.d.ts +22 -0
  121. package/lib/src/gis-map/utils/road-config-tool/indicator-area.js +1 -0
  122. package/lib/src/gis-map/utils/road-config-tool/lane.d.ts +21 -0
  123. package/lib/src/gis-map/utils/road-config-tool/lane.js +1 -0
  124. package/lib/src/gis-map/utils/road-config-tool/search-nearby-lanes.d.ts +62 -0
  125. package/lib/src/gis-map/utils/road-config-tool/search-nearby-lanes.js +1 -0
  126. package/lib/src/gis-map/utils/sketchView.d.ts +209 -0
  127. package/lib/src/gis-map/utils/sketchView.js +1 -0
  128. package/lib/src/gis-map/utils/sketchViewTool.d.ts +259 -0
  129. package/lib/src/gis-map/utils/sketchViewTool.js +1 -0
  130. package/lib/src/gis-map/utils/syncMapView.d.ts +43 -0
  131. package/lib/src/gis-map/utils/syncMapView.js +1 -0
  132. package/lib/src/gis-map/utils/traffic-flow.d.ts +66 -0
  133. package/lib/src/gis-map/utils/traffic-flow.js +1 -0
  134. package/lib/src/index.d.ts +1 -0
  135. package/lib/src/index.js +1 -0
  136. package/lib/src/types/index.d.ts +142 -0
  137. package/lib/src/types/index.js +1 -0
  138. package/package.json +41 -0
@@ -0,0 +1,259 @@
1
+ import GraphicsLayer from '@arcgis/core/layers/GraphicsLayer';
2
+ import MapView from '@arcgis/core/views/MapView';
3
+ import SceneView from '@arcgis/core/views/SceneView';
4
+ import SketchViewModel from '@arcgis/core/widgets/Sketch/SketchViewModel';
5
+ import Sketch from '@arcgis/core/widgets/Sketch';
6
+ import Graphic from '@arcgis/core/Graphic.js';
7
+ import * as turf from '@turf/turf';
8
+ interface sketchViewOptions {
9
+ /**
10
+ * 最大允许绘制的图形数量
11
+ */
12
+ maxAllowedGraphics?: number;
13
+ /**
14
+ * 图形图层配置
15
+ */
16
+ GraphicsLayer?: {};
17
+ /**
18
+ * 绘制工具显示的元素
19
+ */
20
+ sketchvisibleElements?: {};
21
+ /**
22
+ * 绘制工具显示的位置
23
+ */
24
+ sketchPosition?: string;
25
+ /**
26
+ * 绘制工具默认是否显示
27
+ *
28
+ * @type {boolean}
29
+ * @memberof sketchViewOptions
30
+ */
31
+ defaultsketchVisible?: boolean;
32
+ sketchViewModelItemSymbol?: {
33
+ polylineSymbol?: any;
34
+ polygonSymbol?: any;
35
+ pointSymbol?: any;
36
+ };
37
+ }
38
+ interface ITPoint {
39
+ x: number;
40
+ y: number;
41
+ }
42
+ declare type LinearUnits = 'meters' | 'feet' | 'kilometers' | 'miles' | 'nautical-miles' | 'yards' | number;
43
+ declare type Direction = 'north' | 'east' | 'south' | 'west';
44
+ declare type dimensionTypeFace = 'distance' | 'area' | 'angle' | null;
45
+ export default class sketchViewTool {
46
+ private viewer;
47
+ graphicsLayer: GraphicsLayer;
48
+ TextgraphicsLayer: GraphicsLayer;
49
+ sketchViewModel: SketchViewModel;
50
+ sketch: Sketch;
51
+ options: sketchViewOptions;
52
+ /**
53
+ * 是否正在绘制
54
+ *
55
+ * @type {boolean}
56
+ * @memberof sketchViewTool
57
+ */
58
+ isDraw: boolean;
59
+ /**
60
+ * 当前绘制的图形
61
+ */
62
+ drawStartGraphic: __esri.Geometry | null;
63
+ /**
64
+ * 当前绘制的图形的id
65
+ *
66
+ * @type {(string | null)}
67
+ * @memberof sketchViewTool
68
+ */
69
+ drawStartGraphicId: string | null;
70
+ /**
71
+ * 绘制的提示dom
72
+ *
73
+ * @type {(HTMLElement | null)}
74
+ * @memberof sketchViewTool
75
+ */
76
+ tipsDom: HTMLElement | null;
77
+ drawPointGraphic: Map<string, Graphic>;
78
+ dimensionType: dimensionTypeFace;
79
+ constructor(view: MapView | SceneView, options?: sketchViewOptions);
80
+ init(): void;
81
+ on(callcack?: (type: string, state: string, event: any) => void): void;
82
+ onCreate(event: __esri.SketchCreateEvent, callcack?: (type: string, state: string, event?: any) => void): void;
83
+ onCreateToCancel(): void;
84
+ onUpdate(event: __esri.SketchUpdateEvent, callcack?: (type: string, state: string, event?: any) => void): void;
85
+ onDelete(event: __esri.SketchDeleteEvent, callcack?: (type: string, state: string, event: any) => void): void;
86
+ addpolyline(paths: number[][][]): void;
87
+ createPolylineGraphic(paths: number[][], lineSymbol: any, attributes: any): Graphic;
88
+ createDom(): HTMLDivElement | undefined;
89
+ removeDom(): void;
90
+ /**
91
+ * 开始绘制
92
+ * @param tool 'point' | 'polyline' | 'polygon' | 'rectangle' | 'circle'
93
+ * @param createOptions
94
+ */
95
+ sketchCreate(tool: 'point' | 'polyline' | 'polygon' | 'rectangle' | 'circle', createOptions?: __esri.SketchViewModelCreateCreateOptions): void;
96
+ /**
97
+ * 退出绘制
98
+ *
99
+ * @memberof sketchViewTool
100
+ */
101
+ sketchCancel(): void;
102
+ /**
103
+ * 获取所有的图形得长度
104
+ * @param offsetUnit 距离单位
105
+ * @returns
106
+ */
107
+ getCalculateDistance(offsetUnit?: LinearUnits): (string | number)[];
108
+ /**
109
+ * 获取所有的图形得航向角
110
+ *
111
+ * @returns
112
+ * @memberof sketchViewTool
113
+ */
114
+ getCalculateHeading(direction?: Direction): (string | number)[];
115
+ /**
116
+ * 获取所有的线段的路径和长度
117
+ *
118
+ * @returns
119
+ * @memberof sketchViewTool
120
+ */
121
+ getAllPolylineGraphicPath(offsetUnit?: LinearUnits): {
122
+ paths: number[][];
123
+ distance: number;
124
+ }[];
125
+ close(): void;
126
+ show(): void;
127
+ removeAll(): void;
128
+ calculateDistance(geometry: __esri.Geometry, offsetUnit?: LinearUnits): number;
129
+ /**
130
+ * 计算geometry的航向角
131
+ *
132
+ * @param {__esri.Geometry} geometry
133
+ * @param {string} [direction='north']
134
+ * @returns
135
+ * @memberof sketchViewTool
136
+ */
137
+ calculateHeading(geometry: __esri.Geometry, direction?: string): number;
138
+ /**
139
+ * 计算路径的航向角
140
+ *
141
+ * @param {number[][]} path 路径
142
+ * @param {string} [direction='north'] 方向
143
+ * @returns
144
+ * @memberof sketchViewTool
145
+ */
146
+ calculatePointHeading(path: number[][], direction?: string): number;
147
+ drawPolylinePoint(drawStartGraphic: __esri.Geometry, parentId: string, actions?: string): void;
148
+ updatePpolylinePoint(drawStartGraphic: Graphic[]): void;
149
+ delPpolylinePoint(drawStartGraphic: Graphic[]): void;
150
+ /**
151
+ * 添加或者更新标记点
152
+ *
153
+ * @param {string} text 标记点的文本
154
+ * @param {ITPoint} point 标记点的坐标
155
+ * @param {string} id 标记点的id
156
+ * @param {*} [attributes={}] 标记点的属性
157
+ * @returns
158
+ * @memberof sketchViewTool
159
+ */
160
+ addOrUpdateMarkPoint(text: string, point: ITPoint, id: string, attributes?: any): void;
161
+ /**
162
+ * 获取图形的点位
163
+ *
164
+ * @param {__esri.Geometry} geometry
165
+ * @returns
166
+ * @memberof sketchViewTool
167
+ */
168
+ getGeometryXY(geometry: __esri.Geometry, index?: number): {
169
+ x: number;
170
+ y: number;
171
+ };
172
+ /**
173
+ * 创建文本图形
174
+ *
175
+ * @param {string} text 文本
176
+ * @param {{ x: number; y: number }} point 坐标
177
+ * @param {*} [attributes={}] 属性
178
+ * @returns
179
+ * @memberof sketchViewTool
180
+ */
181
+ createTextGraphic(text: string, point: {
182
+ x: number;
183
+ y: number;
184
+ }, attributes?: any): Graphic;
185
+ /**
186
+ * 获取当前绘制的图形的长度
187
+ * @returns
188
+ */
189
+ getDrawgraphicLength(): string | 0;
190
+ /**
191
+ * 获取两点的角度
192
+ *
193
+ * @param {ITPoint} startPoint
194
+ * @param {ITPoint} endPoint
195
+ * @returns
196
+ * @memberof SketchView
197
+ */
198
+ getAngle(startPoint: ITPoint, endPoint: ITPoint): number;
199
+ /**
200
+ * 获取两点的方位角
201
+ *
202
+ * @param {ITPoint} startPoint
203
+ * @param {ITPoint} endPoint
204
+ * @returns
205
+ * @memberof sketchViewTool
206
+ */
207
+ getbearing(startPoint: ITPoint, endPoint: ITPoint): number;
208
+ /**
209
+ * 获取两点的距离
210
+ * @param startPoint
211
+ * @param endPoint
212
+ * @param units
213
+ * @returns
214
+ */
215
+ getPointLength(paths: number[][], units?: LinearUnits): number;
216
+ /**
217
+ * 获取多个点的中心点
218
+ *
219
+ * @param {ITPoint[]} points
220
+ * @returns
221
+ * @memberof sketchViewTool
222
+ */
223
+ featureCollection(points: ITPoint[]): turf.helpers.Feature<turf.helpers.Point, turf.helpers.Properties>;
224
+ /**
225
+ * 获取两点的中心点
226
+ *
227
+ * @param {ITPoint} startPoint
228
+ * @param {ITPoint} endPoint
229
+ * @returns
230
+ * @memberof sketchViewTool
231
+ */
232
+ midpoint(startPoint: ITPoint, endPoint: ITPoint): turf.helpers.Feature<turf.helpers.Point, turf.helpers.Properties>;
233
+ /**
234
+ * 获取方向
235
+ *
236
+ * @param {ITPoint} startPoint 起点
237
+ * @param {ITPoint} endPoint 终点
238
+ * @returns
239
+ * @memberof SketchView
240
+ */
241
+ getDirection(startPoint: ITPoint, endPoint: ITPoint): 0 | 1 | 3 | 2;
242
+ findLayerById(id: string): __esri.Layer;
243
+ /**
244
+ * 开启图层捕捉
245
+ */
246
+ turnonlayerSnap(): void;
247
+ /**
248
+ * 关闭图层捕捉
249
+ */
250
+ turnofflayerSnap(): void;
251
+ setDimensionType(Type: dimensionTypeFace): void;
252
+ /**
253
+ * 删除指定的图形
254
+ * @param graphic 删除指定的图形
255
+ */
256
+ remove(graphic: any): void;
257
+ destroy(): void;
258
+ }
259
+ export {};