Browse Source

fix: 修复导出没有name的问题

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

2
src/store/utils/getGeoJSON.ts

@ -19,6 +19,7 @@ export function getGeoJSON(state: IMapOptions): GeoJSON.FeatureCollection {
const properties: GeoJSON.GeoJsonProperties = {
...restProperties,
fineType: overlay.type,
name: overlay.name,
};
const { category } = overlay;
if (category === OverlayCategory.Building) {
@ -67,6 +68,7 @@ export function getGeoJSON(state: IMapOptions): GeoJSON.FeatureCollection {
const path = polyline.path!.map((pos) => [...pos]);
const properties: GeoJSON.GeoJsonProperties = {
fineType: OverlayTypes.Polyline,
name: polyline.name,
};
if (polyline.category === OverlayCategory.Road) {
properties.road = true;

Loading…
Cancel
Save