mirage2d 1.2.2 → 1.2.3

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 (73) hide show
  1. package/dist/Enum/typeEnum.d.ts +63 -56
  2. package/dist/Layer/XMap.d.ts +146 -108
  3. package/dist/Layer/graphicLayer/ArcGisFeatureServiceLayer.d.ts +7 -7
  4. package/dist/Layer/graphicLayer/ClusterImageLayer.d.ts +9 -0
  5. package/dist/Layer/graphicLayer/ClusterLayer.d.ts +7 -0
  6. package/dist/Layer/graphicLayer/DayNightLayer.d.ts +7 -0
  7. package/dist/Layer/graphicLayer/DivLayer.d.ts +7 -0
  8. package/dist/Layer/graphicLayer/GraphicImageLayer.d.ts +7 -0
  9. package/dist/Layer/graphicLayer/GraphicLayer.d.ts +2 -2
  10. package/dist/Layer/graphicLayer/HeatmapLayer.d.ts +7 -0
  11. package/dist/Layer/graphicLayer/ImageCanvasLayer.d.ts +1 -1
  12. package/dist/Layer/graphicLayer/KmlLayer.d.ts +7 -0
  13. package/dist/Layer/graphicLayer/PathLayer.d.ts +44 -41
  14. package/dist/Layer/graphicLayer/WfsLayer.d.ts +18 -12
  15. package/dist/Layer/index.d.ts +10 -0
  16. package/dist/Layer/tileLayer/ArcGisMapServerLayer.d.ts +2 -1
  17. package/dist/Layer/tileLayer/ArcGisTileXyzLayer.d.ts +3 -3
  18. package/dist/Layer/tileLayer/GeoImageLayer.d.ts +17 -9
  19. package/dist/Layer/tileLayer/PbfLayer.d.ts +1 -1
  20. package/dist/Layer/tileLayer/TifLayer.d.ts +7 -0
  21. package/dist/Layer/tileLayer/TileBaiDuLayer.d.ts +3 -3
  22. package/dist/Layer/tileLayer/TileGroupLayer.d.ts +13 -2
  23. package/dist/Layer/tileLayer/TileTencentLayer.d.ts +10 -3
  24. package/dist/Layer/tileLayer/TileXyzLayer.d.ts +11 -4
  25. package/dist/Layer/tileLayer/WmsLayer.d.ts +8 -0
  26. package/dist/Layer/tileLayer/WmtsLayer.d.ts +8 -0
  27. package/dist/Layer/tileLayer/imageLayer.d.ts +7 -0
  28. package/dist/MirageHttp.es.js.map +205 -1
  29. package/dist/MirageHttp.umd.js.map +1263 -1
  30. package/dist/Tools/SpatialAnalysis.d.ts +235 -215
  31. package/dist/Tools/defaultStyle.d.ts +7 -0
  32. package/dist/Tools/measure.d.ts +7 -0
  33. package/dist/Tools/secret.d.ts +12 -6
  34. package/dist/Tools/toolbox.d.ts +2 -3
  35. package/dist/Tools/util/format.d.ts +21 -1
  36. package/dist/Tools/util/index.d.ts +10 -0
  37. package/dist/Tools/util/isutil.d.ts +27 -17
  38. package/dist/Tools/util/tools.d.ts +10 -0
  39. package/dist/base/EventType.d.ts +7 -0
  40. package/dist/base/FeatureEventType.d.ts +7 -0
  41. package/dist/base/LayerEventType.d.ts +7 -0
  42. package/dist/base/MapEventType.d.ts +7 -0
  43. package/dist/base/base.d.ts +30 -3
  44. package/dist/base/baseClass.d.ts +22 -5
  45. package/dist/base/baseGraphicLayer.d.ts +93 -77
  46. package/dist/base/baseLayer.d.ts +7 -0
  47. package/dist/base/baseMap.d.ts +7 -0
  48. package/dist/base/baseOptionType.d.ts +15 -5
  49. package/dist/base/baseTileLayer.d.ts +10 -0
  50. package/dist/base/eventTarget.d.ts +10 -0
  51. package/dist/extend/Control/baseLayerSwitch.d.ts +15 -1
  52. package/dist/extend/Control/drawText.d.ts +11 -1
  53. package/dist/extend/Control/imageHJ.d.ts +10 -3
  54. package/dist/extend/Control/index.d.ts +14 -4
  55. package/dist/extend/Control/locationbar.d.ts +10 -3
  56. package/dist/extend/Control/swipe.d.ts +16 -5
  57. package/dist/extend/interaction/SelectTransform.d.ts +4 -5
  58. package/dist/extend/tykg.d.ts +5 -5
  59. package/dist/graphic/Curve.d.ts +10 -0
  60. package/dist/graphic/DivGraphic.d.ts +13 -4
  61. package/dist/graphic/baseGraphic.d.ts +63 -60
  62. package/dist/graphic/index.d.ts +10 -0
  63. package/dist/index.d.ts +7 -0
  64. package/dist/lib/includeLibs.js +23 -24
  65. package/dist/mirage2d.cjs.js +37 -37
  66. package/dist/mirage2d.umd.js +37 -37
  67. package/dist/proj4/proj.d.ts +22 -10
  68. package/dist/query/GaodePOI.d.ts +10 -0
  69. package/dist/query/GaodeRoute.d.ts +17 -0
  70. package/dist/query/baseGaode.d.ts +7 -0
  71. package/dist/query/index.d.ts +10 -0
  72. package/package.json +26 -7
  73. package/readme.md +12 -12
@@ -1,208 +1,211 @@
1
1
  import * as turf from "@turf/turf";
2
2
  import { Feature } from "ol";
3
3
  import { Geometry } from "ol/geom";
4
- import * as olExtent from 'ol/extent';
4
+ import * as olExtent from "ol/extent";
5
5
  import { GraphicLayer } from "src/Layer";
6
6
  export declare class SpatialAnalysis {
7
7
  /**
8
- * @description: 创建给定半径和中心点的圆的一个扇形,位于(顺时针)bearing1和bearing2之间;0方位为中心点以北,顺时针正。
9
- * @param {Feature<Geometry>} center 中心点
10
- * @param {number} radius 圆的半径,单位km
11
- * @param {number} antBearing 扇区第一个半径的角度,以十进制为单位
12
- * @param {number} rotation 扇形第二半径的角度,以十进制度数表示
13
- * @return {Feature <Geometry>}
14
- */
8
+ * : 创建给定半径和中心点的圆的一个扇形,位于(顺时针)bearing1和bearing2之间;0方位为中心点以北,顺时针正。
9
+ * @param {Feature<Geometry>} center 中心点
10
+ * @param {number} radius 圆的半径,单位km
11
+ * @param {number} antBearing 扇区第一个半径的角度,以十进制为单位
12
+ * @param {number} rotation 扇形第二半径的角度,以十进制度数表示
13
+ * @returns {Feature <Geometry>}
14
+ */
15
15
  static sector(center: any, radius: any, antBearing: any, rotation: any): Feature<Geometry>;
16
16
  /**
17
- * @description: 获取一个参考点和一个具有点几何特征的FeatureCollection,并从FeatureCollection最接近的参考点返回点。这个计算是测地线的。
17
+ * : 获取一个参考点和一个具有点几何特征的FeatureCollection,并从FeatureCollection最接近的参考点返回点。这个计算是测地线的。
18
18
  * @param {Feature<Geometry>} targetPoint
19
19
  * @param {Array<Feature<Geometry>>} points
20
- * @return {Feature <Geometry>} Point
20
+ * @returns {Feature <Geometry>} Point
21
21
  */
22
22
  static nearestPoint(targetPoint: Feature<Geometry>, points: Array<Feature<Geometry>>): Feature<Geometry>;
23
23
  /**
24
- * @description: 获取一条直线应用 贝塞尔算法 (opens new window)返回一个贝塞尔曲线。
25
- * @param {Feature<Geometry>} line
26
- * @param {any} options resolution 点之间的时间(毫秒)sharpness 样条曲线之间的路径弯曲度的度量
27
- * @return {Feature <Geometry>} lineData
28
- */
24
+ * : 获取一条直线应用 贝塞尔算法 (opens new window)返回一个贝塞尔曲线。
25
+ * @param {Feature<Geometry>} line
26
+ * @param {object} options
27
+ * @param {number} options.resolution 点之间的时间(毫秒)默认值 10000
28
+ * @param {number} options.sharpness 样条曲线之间的路径弯曲度的度量 默认值 0.85
29
+ * @returns {Feature <Geometry>} lineData
30
+ */
29
31
  static bezierSpline(line: Feature<Geometry> | turf.helpers.LineString, options: {
30
32
  resolution: 10000;
31
33
  sharpness: 0.85;
32
34
  }): Feature<Geometry>;
33
35
  /**
34
- * @description: 获取一个点和一个多边形或多个多边形,并确定该点是否位于该多边形内部。多边形可以是凸的,也可以是凹的。
35
- * @param {Feature<Geometry>[]} point
36
- * @param {Feature<Geometry>} poly
37
- * @return {Feature <Geometry>[]}
38
- */
36
+ * : 获取一个点和一个多边形或多个多边形,并确定该点是否位于该多边形内部。多边形可以是凸的,也可以是凹的。
37
+ * @param {Feature<Geometry>[]} point
38
+ * @param {Feature<Geometry>} poly
39
+ * @returns {Feature <Geometry>[]}
40
+ */
39
41
  static pointsWithinPolygon(point: Feature<Geometry>[], poly: Feature<Geometry> | any): Feature<Geometry>[];
40
42
  /**
41
- * @description: 获取一条线并返回具有指定距离偏移量的线。。
42
- * @param {Feature<Geometry>} line
43
- * @param {unitsNum} unitsNum 偏移线的距离 米(可以为负值)
44
- * @return {Feature <Geometry>} lineData
45
- */
43
+ * : 获取一条线并返回具有指定距离偏移量的线。。
44
+ * @param {Feature<Geometry>} line
45
+ * @param {unitsNum} unitsNum 偏移线的距离 米(可以为负值)
46
+ * @returns {Feature <Geometry>} lineData
47
+ */
46
48
  static lineOffset(line: Feature<Geometry>, unitsNum?: number): Feature<Geometry>;
47
49
  /**
48
- * @description: 获取一个点和一个LineString,并计算(多)LineString上最近的点。
50
+ * : 获取一个点和一个LineString,并计算(多)LineString上最近的点。
49
51
  * @param { Feature<Geometry>} point
50
52
  * @param { Feature<Geometry>} line
51
- * @return {*}
53
+ * @returns {*}
52
54
  */
53
55
  static nearestPointOnLine(point: Feature<Geometry>, line: Feature<Geometry>): Feature<Geometry>;
54
56
  /**
55
- * @description: 获取一个点和一个LineString,并计算(多)LineString上最近的点。
56
- * @param { Feature<Geometry>} point
57
- * @param { Feature<Geometry>} line
58
- * @return {*}
59
- */
57
+ * : 获取一个点和一个LineString,并计算(多)LineString上最近的点。
58
+ * @param { Feature<Geometry>} point
59
+ * @param { Feature<Geometry>} line
60
+ * @returns {*}
61
+ */
60
62
  static nearestPointOnLines(point: any, line: any): Feature<Geometry>;
61
63
  /**
62
- * @description: 比较相同维度的两个几何图形,如果它们的交集集产生的几何图形与两个几何图形不同,但维度相同,则返回true
64
+ * : 比较相同维度的两个几何图形,如果它们的交集集产生的几何图形与两个几何图形不同,但维度相同,则返回true
63
65
  * @param {Feature} f1
64
66
  * @param {Feature} f2
65
- * @return {*}
67
+ * @returns {*}
66
68
  */
67
69
  static booleanOverlap(f1: Feature<Geometry>, f2: Feature<Geometry>): boolean;
68
70
  /**
69
- * @description: 获取一个点和一个多边形或多个多边形,并确定该点是否位于该多边形内部。多边形可以是凸的,也可以是凹的。
70
- * @param {Feature} f1
71
- * @param {Feature} f2
72
- * @return {*}
73
- */
71
+ * : 获取一个点和一个多边形或多个多边形,并确定该点是否位于该多边形内部。多边形可以是凸的,也可以是凹的。
72
+ * @param {Feature} f1
73
+ * @param {Feature} f2
74
+ * @returns {*}
75
+ */
74
76
  static booleanPointInPolygon(f1: Feature<Geometry>, f2: Feature<Geometry>): boolean;
75
77
  /**
76
- * @description: 缓冲区分析
78
+ * : 缓冲区分析
77
79
  * @param {Feature<Geometry>} feature
78
80
  * @param {number}[distance=5] distance 缓冲距离,单位米
79
- * @return {Feature<Geometry>}
81
+ * @returns {Feature<Geometry>}
80
82
  */
81
83
  static buffer(feature: any, distance?: number): Feature<Geometry>;
82
84
  /**
83
- * @description: 通过从第一个多边形剪裁第二个多边形来查找两个多边形之间的差异。
84
- * @param {Feature<Geometry>} feature1
85
- * @param {Feature <Geometry>} feature2
86
- * @return {Feature <Geometry>} feature
87
- */
85
+ * : 通过从第一个多边形剪裁第二个多边形来查找两个多边形之间的差异。
86
+ * @param {Feature<Geometry>} feature1
87
+ * @param {Feature <Geometry>} feature2
88
+ * @returns {Feature <Geometry>} feature
89
+ */
88
90
  static difference(feature1: Feature<Geometry>, feature2: Feature<Geometry>): Feature<Geometry>;
89
91
  /**
90
- * @description: 取两个多边形并找到它们的交点。如果它们共享一个边界,返回边界;如果它们不相交,返回undefined。。
91
- * @param {Feature<Geometry>} feature1
92
- * @param {Feature <Geometry>} feature2
93
- * @return {Feature <Geometry>} feature
94
- */
92
+ * : 取两个多边形并找到它们的交点。如果它们共享一个边界,返回边界;如果它们不相交,返回undefined。。
93
+ * @param {Feature<Geometry>} feature1
94
+ * @param {Feature <Geometry>} feature2
95
+ * @returns {Feature <Geometry>} feature
96
+ */
95
97
  static intersect(feature1: Feature<Geometry>, feature2: Feature<Geometry>): Feature<Geometry>;
96
98
  /**
97
- * @description: 包含,feature包含featureList中的要素
99
+ * 包含,feature包含featureList中的要素
98
100
  * @param {*} feature 范围
99
101
  * @param {*} featureList 查询的数据列表
100
- * @return {*} 包含的featureList
102
+ * @returns {*} 包含的featureList
101
103
  */
102
104
  static booleanContains(feature: any, featureList: Feature<Geometry>[] | any): any[];
103
105
  /**
104
- * @description: 创建泰森多边形
105
- * @param {string} type 范围pointToPolygonType.voronoi tin convex
106
- * @param {Array<Feature<Geometry>>} featureList 参与运算的点数据数组
107
- * @param {string} strokecolor 可选 边框色
108
- * @param {string} fillcolor 可选 填充色
109
- * @return {*} 包含的featureList
110
- */
111
- static createPolygon(type: string, featureList: Array<Feature<Geometry>>, strokecolor?: string, fillcolor?: string): any[] | Feature<Geometry>;
112
- /**
113
- * @description: 创建多边形网格
114
- * @param {string} type 范围datagridType.point hex square triangle
115
- * @param {*} option { box: [0, 0, 0, 0], cellSide: 50 } box 生成四角范围【minLng,minLat,maxLng,maxLat】 cellSide km单位 默认50
116
- * @return {*} 要素数组
117
- */
106
+ * : 创建泰森多边形
107
+ * @param {string} type 范围pointToPolygonType.voronoi tin convex
108
+ * @param {Array<Feature<Geometry>>} featureList 参与运算的点数据数组
109
+ * @param {string} strokecolor 可选 边框色
110
+ * @param {string} fillcolor 可选 填充色
111
+ * @returns {*} 包含的featureList
112
+ */
113
+ static createPolygon(type: string, featureList: Array<Feature<Geometry>>, strokecolor?: string, fillcolor?: string): any[];
114
+ /**
115
+ * : 创建多边形网格
116
+ * @param {string} type 范围datagridType.point hex square triangle
117
+ * @param {*} option { box: [0, 0, 0, 0], cellSide: 50 } box 生成四角范围【minLng,minLat,maxLng,maxLat】 cellSide km单位 默认50
118
+ * @returns {*} 要素数组
119
+ */
118
120
  static createGrid(type: any, option?: {
119
121
  box: number[];
120
122
  cellSide: number;
121
123
  }): any[];
122
124
  /**
123
- * @description: 等值面
124
- * @param {FeatureCollection <Point>} points 点数据数组
125
- * @param {number[]} breaks 级别数组 示例 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
126
- * @param {string} zProperty 分组属性字段名
127
- * @return {*} 要素数组
128
- */
125
+ * :等值面
126
+ * @param {any} points 点数据数组 FeatureCollection<Point>
127
+ * @param {number[]} breaks 级别数组 示例 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
128
+ * @param {string} zProperty 分组属性字段名
129
+ * @returns {*} 要素数组
130
+ */
129
131
  static isobands(points: any, breaks: any, zProperty: any): Feature<Geometry>[];
130
132
  /**
131
- * @description: 采用带有z值的点特征的网格FeatureCollection和一组断点值并生成等值线。
132
- * @param {FeatureCollection<Point>} points 点数据数组
133
- * @param {number[]} breaks 级别数组 示例 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
134
- * @param {string} zProperty 分组属性字段名
135
- * @return {*} 要素数组
136
- */
133
+ * 采用带有z值的点特征的网格FeatureCollection和一组断点值并生成等值线。
134
+ * @param {any} points 点数据数组 FeatureCollection<Point>
135
+ * @param {number[]} breaks 级别数组 示例 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
136
+ * @param {string} zProperty 分组属性字段名
137
+ * @returns {*} 要素数组
138
+ */
137
139
  static isolines(points: any, breaks: any, zProperty: any): Feature<Geometry>[];
138
140
  /**
139
- * @description: 随机面,随机节点数 最小3最大10
140
- * @param {FeatureCollection <Point>} box 生成四角范围【minLng,minLat,maxLng,maxLat】
141
- * @param {number} maxRadialLength 顶点可以到达多边形中心以外的纬度或经度的最大十进制度数。默认0.0111
142
- * @param {number} maxNum 最大数量
143
- * @return {*} 要素数组
144
- */
141
+ * 随机面,随机节点数 最小3最大10
142
+ * @param {any} box 生成四角范围【minLng,minLat,maxLng,maxLat】
143
+ * @param {number} maxRadialLength 顶点可以到达多边形中心以外的纬度或经度的最大十进制度数。默认0.0111
144
+ * @param {number} maxNum 最大数量
145
+ * @returns {*} 要素数组
146
+ */
145
147
  static randomPolygons(box: any, maxRadialLength?: number, maxNum?: number): any[];
146
148
  /**
147
- * @description: 随机线,随机节点数 最小3最大10
148
- * @param {FeatureCollection <Point>} box 生成四角范围【minLng,minLat,maxLng,maxLat】
149
- * @param {number} maxlength 是顶点可以与其前一个顶点相距的最大小数度数。默认0.0111
150
- * @param {number} maxNum 最大数量
151
- * @return {*} 要素数组
152
- */
149
+ * : 随机线,随机节点数 最小3最大10
150
+ * @param {any} box 生成四角范围【minLng,minLat,maxLng,maxLat】
151
+ * @param {number} maxlength 是顶点可以与其前一个顶点相距的最大小数度数。默认0.0111
152
+ * @param {number} maxNum 最大数量
153
+ * @returns {*} 要素数组
154
+ */
153
155
  static randomPolylines(box: any, maxlength?: number, maxNum?: number): any[];
154
156
  /**
155
- * @description: 随机点,随机节点数 最小3最大10
156
- * @param {FeatureCollection <Point>} box 生成四角范围【minLng,minLat,maxLng,maxLat】
157
- * @param {number} maxNum 最大数量
158
- * @return {*} 要素数组
159
- */
157
+ * : 随机点,随机节点数 最小3最大10
158
+ * @param {any} box 生成四角范围【minLng,minLat,maxLng,maxLat】
159
+ * @param {number} maxNum 最大数量
160
+ * @returns {*} 要素数组
161
+ */
160
162
  static randomPoints(box: any, maxNum?: number): any[];
161
163
  /**
162
- * @description: 计算多边形面积
163
- * @param {Feature<Geometry>} polygon
164
- * @return {*} 计算后结果
165
- */
164
+ * 计算多边形面积
165
+ * @param {Feature<Geometry>} polygon
166
+ * @param {boolean} returnNumber
167
+ * @returns {*} 计算后结果
168
+ */
166
169
  static formatArea(polygon: any, returnNumber?: boolean): any;
167
170
  /**
168
- * @description: 转化范围4326to3857
169
- * @param {Extent} box
170
- * @return {*} 计算后结果
171
- */
171
+ * 转化范围4326to3857
172
+ * @param {number[]} box 四角范围【minLng,minLat,maxLng,maxLat】
173
+ * @returns {*} 计算后结果
174
+ */
172
175
  static transTo3857(box: any): olExtent.Extent;
173
176
  /**
174
- * @description: 获取要素范围
175
- * @param {Feature<Geometry>} 要素Feature
176
- * @return {Extent} 计算后结果[x1,y1,x2,y2]
177
- */
177
+ * 获取要素范围
178
+ * @param {Feature<Geometry>} feature 要素
179
+ * @returns {number[]}} 计算后结果[x1,y1,x2,y2]
180
+ */
178
181
  static getFeatureExtent(feature: Feature<Geometry>): olExtent.Extent;
179
182
  /**
180
- * @description: 获取要素坐标
181
- * @param {Feature<Geometry>} 要素Feature
182
- * @return {Coordinates} 计算后结果[x1,y1]
183
- */
183
+ * 获取要素坐标
184
+ * @param {Feature<Geometry>} feature 要素
185
+ * @returns {number[]} 计算后结果Coordinates[x1,y1]
186
+ */
184
187
  static getFeatureCoord(feature: Feature<Geometry>): any;
185
188
  /**
186
- * @description: 取区域内的随机点,默认在中国范围内
187
- * @param {Extent} box
188
- * @return {*} 计算后结果
189
- */
189
+ * 取区域内的随机点,默认在中国范围内
190
+ * @param {number[]} box Extent
191
+ * @returns {number} 计算后结果
192
+ */
190
193
  static randomLatLng(box: any): {
191
194
  lnglat: number[];
192
195
  box: olExtent.Extent;
193
196
  };
194
197
  /**
195
- * @description: 最短路径
196
- * @param {Feature<Geometry>} startPoint
197
- * @param {Feature<Geometry>} endPoint
198
- * @param {*} options?: {
199
- obstacles?: Feature<Geometry>[];障碍面
200
- minDistance?: number;最短路径与障碍物之间的最小距离
201
- units?: string; 分辨率和最小距离将以表示的单位;可以是度、弧度、英里、公里
202
- resolution?: number;计算路径的矩阵点之间的距离
198
+ * 最短路径
199
+ * @param {Feature<Geometry>} startPoint -起点
200
+ * @param {Feature<Geometry>} endPoint -终点
201
+ * @param {object} options 参数
202
+ * @param {Feature<Geometry>[]} options.obstacles 障碍面
203
+ * @param {number} options.minDistance 最短路径与障碍物之间的最小距离
204
+ * @param {object} options.units 分辨率和最小距离将以表示的单位;可以是度、弧度、英里、公里
205
+ * @param {number} options.resolution 计算路径的矩阵点之间的距离
203
206
  }
204
- * @return {Feature<Geometry>} 计算后结果line
205
- */
207
+ * @returns {Feature<Geometry>} 计算后结果line
208
+ */
206
209
  static shortestPath(startPoint: Feature<Geometry>, endPoint: Feature<Geometry>, options?: {
207
210
  obstacles?: Feature<Geometry>[];
208
211
  minDistance?: number;
@@ -210,29 +213,28 @@ export declare class SpatialAnalysis {
210
213
  resolution?: number;
211
214
  }): Feature<Geometry>;
212
215
  /**
213
- * @description: 多线段合并成单线段
214
- * @param {Feature<Geometry>[]} Features
215
- * @param {number} distance 指定长度 默认1 单位km
216
- * @return {Feature<Geometry>} 计算后结果line
217
- */
216
+ * : 多线段合并成单线段
217
+ * @param {Feature<Geometry>[]} Features
218
+ * @param {number} distance 指定长度 默认1 单位km
219
+ * @returns {Feature<Geometry>} 计算后结果line
220
+ */
218
221
  static lineMerger(Features: Feature<Geometry>[], distance?: number): {
219
222
  line: Feature<Geometry>;
220
223
  nodeData: any[];
221
224
  coordinates: any[];
222
225
  };
223
226
  /**
224
- * @description: 按线坐标指定长度返回数组
225
- * @param {Feature<Geometry>[]} 线的坐标点
226
- * @param {number} distance 指定长度 默认1 单位km
227
- * @return {Feature<Geometry>[]} 点数组
228
- */
227
+ * : 按线坐标指定长度返回数组
228
+ * @param {Feature<Geometry>[]} coord 线的坐标点
229
+ * @param {number} distance 指定长度 默认1 单位km
230
+ * @returns {Feature<Geometry>[]} 点数组
231
+ */
229
232
  private static along;
230
233
  /**
231
- * @description: 线坐标分段距离
232
- * @param {Feature<Geometry>[]} coords 线的坐标点
233
- * @param {number} distance 指定长度 默认1 单位km
234
- * @return {Feature<Geometry>[]} 点数组
235
- */
234
+ * 线坐标分段距离
235
+ * @param {Feature<Geometry>[]} coords 线的坐标点
236
+ * @returns {Feature<Geometry>[]} 点数组
237
+ */
236
238
  private static lineAttr;
237
239
  static movePointContain(geoMarkerCircle: any, attr: any): {
238
240
  coordIndex: number;
@@ -242,125 +244,130 @@ export declare class SpatialAnalysis {
242
244
  };
243
245
  /**
244
246
  * 二维数组去重
245
- * @param {*} arr
247
+ * @param {any} arr
248
+ * @returns {any[]} 去重后的数组
246
249
  */
247
250
  static arrayDup(arr: any): any[];
248
251
  /**
249
-
250
- * @description: 对传入的路径集合 进行去重并分段添加虚拟点处理后返回
251
- * @param {*} path
252
- * @param {*} segmentLength
253
- * @returns
254
- */
252
+ * 对传入的路径集合 进行去重并分段添加虚拟点处理后返回
253
+ * @param {*} path 路径数组
254
+ * @param {*} segmentLength 分割长度
255
+ * @returns {*}
256
+ */
255
257
  static decoratePath(path: any, segmentLength: any): any;
256
258
  /**
257
- * @description:线分割,按起始点分割线段
258
- * @param {*} path
259
- * @param {*} segmentLength
260
- * @returns
261
- */
259
+ * 线分割,按起始点分割线段
260
+ * @param {Feature<Geometry>}_startPoint
261
+ * @param {Feature<Geometry>}_stopPoint
262
+ * @param {Feature<Geometry>}_line
263
+ * @returns {Feature<Geometry>} 3857坐标的数据
264
+ */
262
265
  static lineSlice(_startPoint: Feature<Geometry>, _stopPoint: Feature<Geometry>, _line: Feature<Geometry>): Feature<Geometry>;
263
266
  /**
264
- * @description:判断点是否在线上
265
- * @param {*} _point
266
- * @param {*} _line
267
- * @returns
268
- */
267
+ * 判断点是否在线上
268
+ * @param {Feature<Geometry>} _point
269
+ * @param { Feature<Geometry>} _line
270
+ * @returns {boolean}
271
+ */
269
272
  static booleanPointOnLine(_point: Feature<Geometry>, _line: Feature<Geometry>): boolean;
270
273
  /**
271
- * @description:判断线线是否相交
272
- * @param {*} _line1
273
- * @param {*} _line2
274
- * @returns
275
- */
274
+ * 判断线线是否相交
275
+ * @param {Feature<Geometry>} _line1
276
+ * @param {Feature<Geometry>} _line2
277
+ * @returns {boolean}
278
+ */
276
279
  static booleanCrosses(_line1: Feature<Geometry>, _line2: Feature<Geometry>): boolean;
277
280
  /**
278
- * @description:获取任何LineString或PolygonGeoJSON,并返回相交点
279
- * @param {*} _line1
280
- * @param {*} _line2
281
- * @returns
282
- */
281
+ * 获取任何LineString或PolygonGeoJSON,并返回相交点
282
+ * @param { Feature<Geometry>} _line1
283
+ * @param { Feature<Geometry>} _line2
284
+ * @returns { Feature<Geometry>[]}
285
+ */
283
286
  static lineIntersect(_line1: Feature<Geometry>, _line2: Feature<Geometry>): Feature<Geometry>[];
284
287
  /**
285
- * @description:通过另一个Feature分割一个LineString。
286
- * @param {*} _line1
287
- * @param {*} _feature
288
- * @returns {Feature<Geometry>[]} 分割后的要素集合
289
- */
288
+ * 通过另一个Feature分割一个LineString。
289
+ * @param {Feature<Geometry>} _line1
290
+ * @param {Feature<Geometry>} _feature
291
+ * @returns {Feature<Geometry>[]} 分割后的要素集合
292
+ */
290
293
  static lineSplit(_line1: Feature<Geometry>, _feature: Feature<Geometry>): Feature<Geometry>;
291
294
  /**
292
- * @description:线线是否相交打断
293
- * @param {layer} layer GraphicLayer 图层
294
- * @param {Array<Feature<Geometry>>} lineList 线数组
295
- * @param {Function} callback 回调函数 返回 Feature, 及原properties
296
- * @returns 不返回值 通过回调函数获取打断后数据
297
- */
295
+ * 线线是否相交打断
296
+ * @param {layer} layer GraphicLayer 图层
297
+ * @param {Array<Feature<Geometry>>} lineList 线数组
298
+ * @param {Function} callback 回调函数 返回 Feature, 及原properties
299
+ */
298
300
  static lineCrossesSplit(layer: GraphicLayer, lineList: Array<Feature<Geometry>>, callback: Function): void;
299
301
  /**
300
- * @description:擦除线
301
- * @param {layer} layer GraphicLayer 图层
302
- * @param {number[]} coordinate 擦除点位置
303
- * @param {number} bufferExtent 点缓冲大小,以中心点辐射一个圆形,单位km
304
- * @param {Array<Feature<Geometry>>} lineList 线数组
305
- * @param {Function} callback 回调函数 返回 Feature, 及原properties
306
- * @returns 不返回值 通过回调函数获取打断后数据
307
- */
302
+ * 擦除线
303
+ * @param {layer} layer GraphicLayer 图层
304
+ * @param {number[]} coordinate 擦除点位置
305
+ * @param {number} bufferExtent 点缓冲大小,以中心点辐射一个圆形,单位km
306
+ * @param {Array<Feature<Geometry>>} lineList 线数组
307
+ * @param {Function} callback 回调函数 返回 Feature, 及原properties
308
+ * @returns {Function} 不返回值 通过回调函数获取打断后数据
309
+ */
308
310
  static lineErase(layer: GraphicLayer, coordinate: number[], bufferExtent: number, lineList: Array<Feature<Geometry>>, callback: Function): void;
309
311
  /**
310
- * @description 转为geoJson格式,不改变坐标系
311
- * @param {Feature<Geometry>} Feature
312
- * @returns
313
- */
312
+ * 转为geoJson格式,不改变坐标系
313
+ * @param {Feature<Geometry>} Feature
314
+ * @returns {any} 返回的是个json Feature<Geometry, { [name: string]: any;}
315
+ */
314
316
  static featureToJson(Feature: Feature<Geometry>): import("geojson").Feature<import("geojson").Geometry, {
315
317
  [name: string]: any;
316
318
  }>;
317
319
  /**
318
- * @description:转为geoJson格式,元数据为3857转为4326
319
- * @param {Feature<Geometry>} Feature
320
- * @return {GeoJSONFeature} "EPSG:4326" Object.
321
- */
320
+ * :转为geoJson格式,元数据为3857转为4326
321
+ * @param {Feature<Geometry>} Feature
322
+ * @returns {any} 返回的是个json Feature<Geometry, { [name: string]: any;} "EPSG:4326" Object.
323
+ */
322
324
  static featureTo4326(Feature: Feature<Geometry>): any;
323
325
  /**
324
- * @description 转为geoJson数组格式,适用于数组转换
325
- * @param {Feature<Geometry>[]} Feature
326
- * @return {GeoJSONFeature} "EPSG:4326" Object.
327
- */
326
+ * 转为geoJson数组格式,适用于数组转换
327
+ * @param {Feature<Geometry>[]} Feature
328
+ * @returns {any} 返回的是个json Feature<Geometry, { [name: string]: any;} "EPSG:4326" Object.
329
+ */
328
330
  static featuresTo4326(Feature: Feature<Geometry>[]): import("geojson").FeatureCollection<import("geojson").Geometry, {
329
331
  [name: string]: any;
330
332
  }>;
331
333
  /**
332
- * @description 获取中心点坐标
333
- * @param {Feature<Geometry>[]} Feature
334
- * @return {Coordinate} "EPSG:4326" Object.
335
- */
334
+ * 获取中心点坐标
335
+ * @param {Feature<Geometry> | Geometry} feature -传入一个要素
336
+ * @returns {number[]} Coordinate
337
+ */
336
338
  static getCenter(feature: Feature<Geometry> | Geometry): import("ol/coordinate").Coordinate;
337
339
  /**
338
- * @description 转为geoJson数组格式,4326转3857
339
- * @param {Feature<Geometry>[]} Feature
340
- * @return {GeoJSONFeature} "EPSG:4326" Object.
341
- */
342
- static to3857(Feature: any): Feature<Geometry>;
340
+ * 转为geoJson数组格式,4326转3857
341
+ * @param {any} feature
342
+ * @returns { Feature<Geometry>} 返回的是个 Feature<Geometry>.
343
+ */
344
+ static to3857(feature: any): Feature<Geometry>;
343
345
  /**
344
- * @description 转为geoJson数组格式,适用于数组转换
345
- * @param {Feature<Geometry>[]} Feature
346
- * @return {GeoJSONFeature} "EPSG:4326" Object.
347
- */
346
+ * 转为geoJson数组格式,适用于数组转换
347
+ * @param {any} Features
348
+ * @returns { Feature<Geometry>[]} "EPSG:4326" Object.
349
+ */
348
350
  static to3857_featureList(Features: any): Feature<Geometry>[];
349
351
  static lineClipPolygon(clipLine: Feature<Geometry>, polygonList: Feature<Geometry>[], callback: Function, errCallback: Function): void;
350
352
  static formatJsonTo3857(GeoJson: any): any;
351
353
  /**
352
- * geoJson数据处理模块(需要引入turf.js)
353
- * 输入输出数据均为标准geoJson格式
354
- */
354
+ * geoJson数据处理模块(需要引入turf.js)
355
+ * 输入输出数据均为标准geoJson格式
356
+ */
355
357
  static geoUtil: {
356
358
  /**
357
359
  * 合并多边形
360
+ * @param {any} polygons
361
+ * @returns {any} polygon
358
362
  */
359
363
  unionPolygon: (polygons: any) => any;
360
364
  /**
361
365
  * 线分割面
362
366
  * 面类型只能是polygon 但可以是环
363
367
  * 注:线与多边形必须有两个交点
368
+ * @param {any} polygon
369
+ * @param {any} clipLine
370
+ * @returns {any} polygon
364
371
  */
365
372
  polygonClipByLine: (polygon: any, clipLine: any) => any;
366
373
  _singlePolygonClip: (polyLine: any, clipLine: any) => turf.helpers.FeatureCollection<turf.helpers.Polygon, {
@@ -372,6 +379,9 @@ export declare class SpatialAnalysis {
372
379
  /**
373
380
  * 连接两条线
374
381
  * 方法会将两条线段最近的一段直接连接
382
+ * @param {any} line1
383
+ * @param {any} line2
384
+ * @returns {any}
375
385
  */
376
386
  connectLine: (line1: any, line2: any) => turf.helpers.Feature<turf.helpers.LineString, {
377
387
  [name: string]: any;
@@ -379,21 +389,31 @@ export declare class SpatialAnalysis {
379
389
  /**
380
390
  * 判断点是否在线里面
381
391
  * 注:线组成的坐标对比
392
+ * @param {any} point
393
+ * @param {any} line
394
+ * @returns {any}
382
395
  */
383
396
  isOnLine: (point: any, line: any) => boolean;
384
397
  /**
385
398
  * 获得两条线交点
399
+ * @param {any} line1
400
+ * @param {any} line2
401
+ * @returns {any}
386
402
  */
387
403
  getIntersectPoints: (line1: any, line2: any) => turf.helpers.FeatureCollection<turf.helpers.Point, {
388
404
  [name: string]: any;
389
405
  }>;
390
406
  /**
391
407
  * multiPolygon转polygons,不涉及属性
408
+ * @param {any} multiPolygon
409
+ * @returns {any}
392
410
  */
393
411
  multiPolygon2polygons: (multiPolygon: any) => any[];
394
412
  /**
395
413
  * polygons转multiPolygon,不涉及属性,只输出属性为{}
396
414
  * 考虑polygons中就存在多面的情况
415
+ * @param {any} geoJson
416
+ * @returns {any}
397
417
  */
398
418
  polygons2MultiPolygon: (geoJson: any) => {
399
419
  type: string;
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @author: xd
3
+ * @Date: 2022-01-02 12:08:17
4
+ * @LastEditors: xd
5
+ * @LastEditTime: 2023-06-02 11:20:33
6
+ * @Description: 功能
7
+ */
1
8
  import { Style } from "ol/style";
2
9
  import { IPolylineOption } from "src/base/baseOptionType";
3
10
  export declare class MirageDefaultStyle {