@mapcatch/util 1.0.14-a → 1.0.15-a
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/catchUtil.min.esm.js +504 -504
- package/dist/catchUtil.min.js +14 -14
- package/package.json +2 -2
- package/src/constants/measurement_fields.js +3 -3
- package/src/util.js +3 -2
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapcatch/util",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15-a",
|
|
4
4
|
"main": "./dist/catchUtil.min.esm.js",
|
|
5
5
|
"repository": "",
|
|
6
6
|
"author": "wanyanyan",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "vite build",
|
|
10
|
-
"start": "vite --host",
|
|
10
|
+
"start": "vite --host --port 5174",
|
|
11
11
|
"lint": "eslint src/ --fix",
|
|
12
12
|
"format": "prettier-eslint --write src/*.js"
|
|
13
13
|
},
|
|
@@ -3,17 +3,17 @@ export default {
|
|
|
3
3
|
point: [
|
|
4
4
|
{
|
|
5
5
|
field: 'lng',
|
|
6
|
-
label: '
|
|
6
|
+
label: '经度(X)',
|
|
7
7
|
unit: ''
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
field: 'lat',
|
|
11
|
-
label: '
|
|
11
|
+
label: '纬度(Y)',
|
|
12
12
|
unit: ''
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
field: 'height',
|
|
16
|
-
label: '
|
|
16
|
+
label: '高程(Z)',
|
|
17
17
|
unit: 'm'
|
|
18
18
|
}
|
|
19
19
|
],
|
package/src/util.js
CHANGED
|
@@ -5,7 +5,7 @@ import cameras from './constants/cameras'
|
|
|
5
5
|
import {getType, distance as calcDistance, midpoint as getMidpoint} from '@turf/turf'
|
|
6
6
|
import { layerGroups } from './constants'
|
|
7
7
|
import { mat4 } from 'gl-matrix'
|
|
8
|
-
import { crsList } from './constants'
|
|
8
|
+
import { crsList, crsTypes } from './constants'
|
|
9
9
|
|
|
10
10
|
export function generateId() { // 生成随机id
|
|
11
11
|
return uuidv4()
|
|
@@ -339,7 +339,8 @@ export function getRotationMatrix (pitch, roll, yaw) {
|
|
|
339
339
|
export function getWKTString(crs) {
|
|
340
340
|
let {type, epsg_code} = crs
|
|
341
341
|
for(let i = 0;i < crsList.length;i++) {
|
|
342
|
-
|
|
342
|
+
let typeCode = crsTypes[crsList[i].type].code
|
|
343
|
+
if (typeCode !== type) {
|
|
343
344
|
continue
|
|
344
345
|
}
|
|
345
346
|
let {authCode, wkt, children} = crsList[i]
|