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