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.
- package/README.md +103 -0
- package/es/index.d.ts +8 -0
- package/es/index.mjs +16 -0
- package/es/src/components.d.ts +9 -0
- package/es/src/gis-map/gis-map.vue.d.ts +91 -0
- package/es/src/gis-map/gis-map.vue.mjs +124 -0
- package/es/src/gis-map/gis-map.vue2.mjs +4 -0
- package/es/src/gis-map/index.d.ts +81 -0
- package/es/src/gis-map/index.mjs +7 -0
- package/es/src/gis-map/stores/appData.d.ts +3 -0
- package/es/src/gis-map/stores/appData.mjs +9 -0
- package/es/src/gis-map/stores/index.d.ts +7 -0
- package/es/src/gis-map/stores/index.mjs +10 -0
- package/es/src/gis-map/style/index.css +13 -0
- package/es/src/gis-map/utils/FlyToPoints.d.ts +37 -0
- package/es/src/gis-map/utils/FlyToPoints.mjs +67 -0
- package/es/src/gis-map/utils/GreenWaveline.mjs +193 -0
- package/es/src/gis-map/utils/Layers.d.ts +31 -0
- package/es/src/gis-map/utils/Layers.mjs +99 -0
- package/es/src/gis-map/utils/common-utils.d.ts +65 -0
- package/es/src/gis-map/utils/common-utils.mjs +159 -0
- package/es/src/gis-map/utils/holo-flow/index.d.ts +15 -0
- package/es/src/gis-map/utils/holo-flow/index.mjs +50 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +40 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +209 -0
- package/es/src/gis-map/utils/holo-flow/trace-external-renderer.d.ts +69 -0
- package/es/src/gis-map/utils/holo-flow/trace-external-renderer.mjs +316 -0
- package/es/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +18 -0
- package/es/src/gis-map/utils/holo-flow/trace-holo-flow.mjs +75 -0
- package/es/src/gis-map/utils/holo-flow/trace-layer-renderer.d.ts +35 -0
- package/es/src/gis-map/utils/holo-flow/trace-layer-renderer.mjs +286 -0
- package/es/src/gis-map/utils/index.d.ts +21 -0
- package/es/src/gis-map/utils/index.mjs +23 -0
- package/es/src/gis-map/utils/map-initializer.d.ts +50 -0
- package/es/src/gis-map/utils/map-initializer.mjs +248 -0
- package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +9 -0
- package/es/src/gis-map/utils/open-drive-renderer/index.mjs +271 -0
- package/es/src/gis-map/utils/overlay.d.ts +83 -0
- package/es/src/gis-map/utils/overlay.mjs +149 -0
- package/es/src/gis-map/utils/queue-length.d.ts +14 -0
- package/es/src/gis-map/utils/queue-length.mjs +83 -0
- package/es/src/gis-map/utils/renderer/greenWaveline.d.ts +2 -0
- package/es/src/gis-map/utils/renderer/greenWaveline.mjs +169 -0
- package/es/src/gis-map/utils/road-config-tool/cross.d.ts +51 -0
- package/es/src/gis-map/utils/road-config-tool/cross.mjs +127 -0
- package/es/src/gis-map/utils/road-config-tool/entrance.d.ts +24 -0
- package/es/src/gis-map/utils/road-config-tool/entrance.mjs +79 -0
- package/es/src/gis-map/utils/road-config-tool/exit.d.ts +18 -0
- package/es/src/gis-map/utils/road-config-tool/exit.mjs +86 -0
- package/es/src/gis-map/utils/road-config-tool/index.d.ts +44 -0
- package/es/src/gis-map/utils/road-config-tool/index.mjs +112 -0
- package/es/src/gis-map/utils/road-config-tool/indicator-area.d.ts +22 -0
- package/es/src/gis-map/utils/road-config-tool/indicator-area.mjs +44 -0
- package/es/src/gis-map/utils/road-config-tool/lane.d.ts +21 -0
- package/es/src/gis-map/utils/road-config-tool/lane.mjs +35 -0
- package/es/src/gis-map/utils/road-config-tool/search-nearby-lanes.d.ts +62 -0
- package/es/src/gis-map/utils/road-config-tool/search-nearby-lanes.mjs +265 -0
- package/es/src/gis-map/utils/sketchView.d.ts +209 -0
- package/es/src/gis-map/utils/sketchView.mjs +516 -0
- package/es/src/gis-map/utils/sketchViewTool.d.ts +259 -0
- package/es/src/gis-map/utils/sketchViewTool.mjs +503 -0
- package/es/src/gis-map/utils/syncMapView.d.ts +43 -0
- package/es/src/gis-map/utils/syncMapView.mjs +64 -0
- package/es/src/gis-map/utils/traffic-flow.d.ts +66 -0
- package/es/src/gis-map/utils/traffic-flow.mjs +308 -0
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +4 -0
- package/es/src/types/index.d.ts +142 -0
- package/es/src/types/index.mjs +5 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +1 -0
- package/lib/src/components.d.ts +9 -0
- package/lib/src/gis-map/gis-map.vue.d.ts +91 -0
- package/lib/src/gis-map/gis-map.vue.js +1 -0
- package/lib/src/gis-map/gis-map.vue2.js +1 -0
- package/lib/src/gis-map/index.d.ts +81 -0
- package/lib/src/gis-map/index.js +1 -0
- package/lib/src/gis-map/stores/appData.d.ts +3 -0
- package/lib/src/gis-map/stores/appData.js +1 -0
- package/lib/src/gis-map/stores/index.d.ts +7 -0
- package/lib/src/gis-map/stores/index.js +1 -0
- package/lib/src/gis-map/style/index.css +13 -0
- package/lib/src/gis-map/utils/FlyToPoints.d.ts +37 -0
- package/lib/src/gis-map/utils/FlyToPoints.js +1 -0
- package/lib/src/gis-map/utils/GreenWaveline.js +1 -0
- package/lib/src/gis-map/utils/Layers.d.ts +31 -0
- package/lib/src/gis-map/utils/Layers.js +1 -0
- package/lib/src/gis-map/utils/common-utils.d.ts +65 -0
- package/lib/src/gis-map/utils/common-utils.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/index.d.ts +15 -0
- package/lib/src/gis-map/utils/holo-flow/index.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +40 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/trace-external-renderer.d.ts +69 -0
- package/lib/src/gis-map/utils/holo-flow/trace-external-renderer.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +18 -0
- package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/trace-layer-renderer.d.ts +35 -0
- package/lib/src/gis-map/utils/holo-flow/trace-layer-renderer.js +1 -0
- package/lib/src/gis-map/utils/index.d.ts +21 -0
- package/lib/src/gis-map/utils/index.js +1 -0
- package/lib/src/gis-map/utils/map-initializer.d.ts +50 -0
- package/lib/src/gis-map/utils/map-initializer.js +1 -0
- package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +9 -0
- package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -0
- package/lib/src/gis-map/utils/overlay.d.ts +83 -0
- package/lib/src/gis-map/utils/overlay.js +1 -0
- package/lib/src/gis-map/utils/queue-length.d.ts +14 -0
- package/lib/src/gis-map/utils/queue-length.js +1 -0
- package/lib/src/gis-map/utils/renderer/greenWaveline.d.ts +2 -0
- package/lib/src/gis-map/utils/renderer/greenWaveline.js +43 -0
- package/lib/src/gis-map/utils/road-config-tool/cross.d.ts +51 -0
- package/lib/src/gis-map/utils/road-config-tool/cross.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/entrance.d.ts +24 -0
- package/lib/src/gis-map/utils/road-config-tool/entrance.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/exit.d.ts +18 -0
- package/lib/src/gis-map/utils/road-config-tool/exit.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/index.d.ts +44 -0
- package/lib/src/gis-map/utils/road-config-tool/index.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/indicator-area.d.ts +22 -0
- package/lib/src/gis-map/utils/road-config-tool/indicator-area.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/lane.d.ts +21 -0
- package/lib/src/gis-map/utils/road-config-tool/lane.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/search-nearby-lanes.d.ts +62 -0
- package/lib/src/gis-map/utils/road-config-tool/search-nearby-lanes.js +1 -0
- package/lib/src/gis-map/utils/sketchView.d.ts +209 -0
- package/lib/src/gis-map/utils/sketchView.js +1 -0
- package/lib/src/gis-map/utils/sketchViewTool.d.ts +259 -0
- package/lib/src/gis-map/utils/sketchViewTool.js +1 -0
- package/lib/src/gis-map/utils/syncMapView.d.ts +43 -0
- package/lib/src/gis-map/utils/syncMapView.js +1 -0
- package/lib/src/gis-map/utils/traffic-flow.d.ts +66 -0
- package/lib/src/gis-map/utils/traffic-flow.js +1 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -0
- package/lib/src/types/index.d.ts +142 -0
- package/lib/src/types/index.js +1 -0
- 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 {};
|