@mapcatch/util 1.0.14-a → 1.0.15

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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@mapcatch/util",
3
- "version": "1.0.14-a",
3
+ "version": "1.0.15",
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
  },
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
- if (crsList[i].type !== type) {
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]