Merge branch 'feat/ts-upgrade-20240603' into 'master'
fix(ts): 添加ts配置 See merge request web-project/zhst-lambo!51
This commit is contained in:
commit
05064d9473
@ -4,7 +4,6 @@
|
|||||||
import { forwardRef, useImperativeHandle, useRef, } from 'react'
|
import { forwardRef, useImperativeHandle, useRef, } from 'react'
|
||||||
import MapboxDraw from '@mapbox/mapbox-gl-draw';
|
import MapboxDraw from '@mapbox/mapbox-gl-draw';
|
||||||
import {
|
import {
|
||||||
CircleMode,
|
|
||||||
DragCircleMode,
|
DragCircleMode,
|
||||||
DirectMode,
|
DirectMode,
|
||||||
SimpleSelectMode
|
SimpleSelectMode
|
||||||
|
@ -196,6 +196,7 @@ export const lineToPoly = (geojson: { geometry: { coordinates: string | any[] }
|
|||||||
let _union;
|
let _union;
|
||||||
try {
|
try {
|
||||||
//todo: 新版本union和老版本行为不一致 先用老版本 后续观察原因
|
//todo: 新版本union和老版本行为不一致 先用老版本 后续观察原因
|
||||||
|
// @ts-ignore
|
||||||
_union = turf.union(...circlePolygon, ...linesPolygon);
|
_union = turf.union(...circlePolygon, ...linesPolygon);
|
||||||
// _union = union(...circlePolygon, ...linesPolygon);
|
// _union = union(...circlePolygon, ...linesPolygon);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -241,7 +242,7 @@ export const getDistancesByStringLine = (
|
|||||||
const tempDistance = turf.distance(pointA, pointB, config);
|
const tempDistance = turf.distance(pointA, pointB, config);
|
||||||
totalLength += tempDistance
|
totalLength += tempDistance
|
||||||
distanceArr.push({
|
distanceArr.push({
|
||||||
distance: tempDistance.toFixed(2),
|
distance: Number(tempDistance.toFixed(2)),
|
||||||
totalLength: totalLength.toFixed(2),
|
totalLength: totalLength.toFixed(2),
|
||||||
from: pointA,
|
from: pointA,
|
||||||
to: pointB
|
to: pointB
|
||||||
|
Loading…
Reference in New Issue
Block a user