Browse Source

fix: 修复导出geojson构建三维墙面朝内问题

master
Cmen 3 years ago
parent
commit
bbf310e33a
  1. 3
      src/store/utils/getGeoJSON.ts

3
src/store/utils/getGeoJSON.ts

@ -31,7 +31,7 @@ export function getGeoJSON(state: IMapOptions): GeoJSON.FeatureCollection {
properties.water = true;
}
coordinates.forEach((shape) => {
coordinates = coordinates.map((shape) => {
if (turf.booleanClockwise(shape)) {
shape = shape.reverse();
}
@ -43,6 +43,7 @@ export function getGeoJSON(state: IMapOptions): GeoJSON.FeatureCollection {
shape.push([...shape[0]]);
}
}
return shape;
});
features.push({
type: "Feature",

Loading…
Cancel
Save