gis-common 5.1.11 → 5.1.13
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/dist/gis-common.es.js +30 -21
- package/dist/gis-common.umd.js +1 -1
- package/dist/utils/CommUtil.d.ts +1 -1
- package/dist/utils/GeoUtil.d.ts +16 -13
- package/package.json +40 -40
package/dist/utils/CommUtil.d.ts
CHANGED
package/dist/utils/GeoUtil.d.ts
CHANGED
|
@@ -20,13 +20,13 @@ export default class {
|
|
|
20
20
|
*/
|
|
21
21
|
static distance(p1: Coordinate, p2: Coordinate): number;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* 计算两个点之间的距离
|
|
24
24
|
*
|
|
25
|
-
* @param A
|
|
26
|
-
* @param B
|
|
25
|
+
* @param A 点A,包含x和y两个属性
|
|
26
|
+
* @param B 点B,包含x和y两个属性
|
|
27
27
|
* @returns 返回两点之间的距离,单位为米
|
|
28
28
|
*/
|
|
29
|
-
static distanceByPoints(A:
|
|
29
|
+
static distanceByPoints(A: Coordinate, B: Coordinate): number;
|
|
30
30
|
/**
|
|
31
31
|
* 格式化经纬度为度分秒格式
|
|
32
32
|
*
|
|
@@ -120,15 +120,6 @@ export default class {
|
|
|
120
120
|
* @returns 墨卡托坐标对象,包含x和y属性
|
|
121
121
|
*/
|
|
122
122
|
static lonlatToMercator(lng: number, lat: number): Coordinate;
|
|
123
|
-
/**
|
|
124
|
-
* 根据百分比获取坐标
|
|
125
|
-
*
|
|
126
|
-
* @param start 起点坐标
|
|
127
|
-
* @param end 终点坐标
|
|
128
|
-
* @param percent 百分比,取值范围0-1
|
|
129
|
-
* @returns 返回插值后的坐标
|
|
130
|
-
*/
|
|
131
|
-
static interpolate({ x: x1, y: y1, z: z1 }: Coordinate, { x: x2, y: y2, z: z2 }: Coordinate, percent: number): Coordinate;
|
|
132
123
|
/**
|
|
133
124
|
* 计算三角形面积
|
|
134
125
|
*
|
|
@@ -145,4 +136,16 @@ export default class {
|
|
|
145
136
|
* @returns 返回质心坐标,包含x和y属性
|
|
146
137
|
*/
|
|
147
138
|
static getPolygonCentroid(coords: Coordinate[] | LngLat[]): Coordinate;
|
|
139
|
+
/**
|
|
140
|
+
* 根据百分比获取坐标
|
|
141
|
+
*
|
|
142
|
+
* @param pA 线段起点,可以是Coordinate类型(包含x,y属性)或LngLat类型(包含lng,lat属性)
|
|
143
|
+
* @param pB 线段终点,可以是Coordinate类型(包含x,y属性)或LngLat类型(包含lng,lat属性)
|
|
144
|
+
* @param ratio 插值比例,0表示在起点pA,1表示在终点pB,0-1之间表示两点间的插值点
|
|
145
|
+
* @returns 返回插值点坐标,类型与输入参数保持一致
|
|
146
|
+
*/
|
|
147
|
+
static interpolate(pA: Coordinate | LngLat, pB: Coordinate | LngLat, ratio: number): {
|
|
148
|
+
x: number;
|
|
149
|
+
y: number;
|
|
150
|
+
};
|
|
148
151
|
}
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
2
|
+
"name": "gis-common",
|
|
3
|
+
"version": "5.1.13",
|
|
4
|
+
"author": "Guo.Yan <luv02@vip.qq.com>",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"private": false,
|
|
7
|
+
"module": "dist/gis-common.es.js",
|
|
8
|
+
"main": "dist/gis-common.umd.js",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/gis-common.es.js",
|
|
17
|
+
"require": "./dist/gis-common.umd.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "vite",
|
|
22
|
+
"lib": "vite build --mode lib",
|
|
23
|
+
"serve": "vite preview"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": ""
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"mqtt-browser": "^4.3.7"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/leaflet": "^1.9.12",
|
|
34
|
+
"@types/node": "^22.5.5",
|
|
35
|
+
"element-ui": "2.15.14",
|
|
36
|
+
"terser": "^5.32.0",
|
|
37
|
+
"typescript": "^5.5.4",
|
|
38
|
+
"vite": "^5.4.0",
|
|
39
|
+
"vite-plugin-dts": "^4.0.1"
|
|
40
|
+
}
|
|
41
|
+
}
|