From 4873fc5599409f4fc195e164f821656a5c71ea07 Mon Sep 17 00:00:00 2001 From: phil Date: Sun, 28 Apr 2024 01:08:00 +0200 Subject: [PATCH] Fix!update layer export --- src/app/map/models.ts | 9 +++---- .../map/tree-layer/tree-layer.component.html | 2 +- src/app/openapi/core/OpenAPI.ts | 2 +- src/app/openapi/schemas.gen.ts | 4 ++-- src/app/openapi/services.gen.ts | 24 +++++++++++++++++++ src/app/openapi/types.gen.ts | 15 ++++++++++++ 6 files changed, 48 insertions(+), 8 deletions(-) diff --git a/src/app/map/models.ts b/src/app/map/models.ts index 97391b6..673ffc4 100644 --- a/src/app/map/models.ts +++ b/src/app/map/models.ts @@ -33,7 +33,8 @@ export class PrimaryGroupNode extends Node { } downloadGpkg() { - window.open('/download/layers/gpkg/' + this.children.map(child => child.store).join(',')) + const layers = this.children.map(child => child.store).join(',') + window.open(`/api/download/geodata/${layers}?format=gpkg`) } } @@ -74,15 +75,15 @@ export class LayerNode extends Node { } downloadShapefile() { - window.open('/download/shapefile/' + this.store) + window.open(`/api/download/geodata/${this.store}?format=shapefile`) } downloadGpkg() { - window.open('/download/layers/gpkg/' + this.store) + window.open(`/api/download/geodata/${this.store}?format=gpkg`) } downloadDXF(reproject: Boolean=false) { - window.open('/download/layers/dxf/' + this.store + '?reproject=' + reproject) + window.open(`/api/download/geodata/${this.store}?format=dxf&reproject=${reproject}`) } downloadRawData() { diff --git a/src/app/map/tree-layer/tree-layer.component.html b/src/app/map/tree-layer/tree-layer.component.html index 1457702..3203f82 100644 --- a/src/app/map/tree-layer/tree-layer.component.html +++ b/src/app/map/tree-layer/tree-layer.component.html @@ -59,7 +59,7 @@