电子围栏turf.point打包后报错问题修改
parent
8b517bf2ca
commit
467d37486d
|
|
@ -82,6 +82,7 @@
|
|||
"@rollup/plugin-commonjs": "^28.0.6",
|
||||
"@terraformer/wkt": "2.1.2",
|
||||
"@turf/turf": "^7.2.0",
|
||||
"@turf/helpers": "^7.2.0",
|
||||
"@vben/hooks": "workspace:*",
|
||||
"@vue/shared": "^3.4.5",
|
||||
"@vueuse/core": "^10.7.1",
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
UpdateWorkArea,
|
||||
} from '@/api/demo/mediaLibrary';
|
||||
import * as turf from '@turf/turf';
|
||||
import { point } from '@turf/helpers';
|
||||
import { WktToGeojson, GeojsonToWkt } from '@/components/MapboxMaps/src/WktGeojsonTransform';
|
||||
import dayjs from 'dayjs';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
|
|
@ -623,7 +624,7 @@
|
|||
let geom = '';
|
||||
coordinates.push(coordinates[0]);
|
||||
polygonData.push(coordinates);
|
||||
geom = GeojsonToWkt(turf.point(coordinates, graphicJson.style.radius).geometry);
|
||||
geom = GeojsonToWkt(point(coordinates, graphicJson.style.radius).geometry);
|
||||
properties = {
|
||||
clampToGround: true,
|
||||
color: '#00FF00',
|
||||
|
|
@ -840,7 +841,7 @@
|
|||
}
|
||||
switch(shape){
|
||||
case 'circle':
|
||||
geom = GeojsonToWkt(turf.point(coordinates, graphicJson.style.radius).geometry);
|
||||
geom = GeojsonToWkt(point(coordinates, graphicJson.style.radius).geometry);
|
||||
properties = {
|
||||
clampToGround: true,
|
||||
color: '#00FF00',
|
||||
|
|
|
|||
Loading…
Reference in New Issue