From 6f7d86bf2007e24c4eefadccf96966157d67e82e Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 17 Feb 2025 11:17:18 +0100 Subject: [PATCH] make dishExportMap parameter configurable --- .../src/mapConfigurations/mapConfigIntern.ts | 16 ++++++++++++ .../plugins/DishExportMap/DishExportMap.vue | 25 +++++++++---------- packages/clients/dish/src/types.ts | 14 +++++++++++ 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/packages/clients/dish/src/mapConfigurations/mapConfigIntern.ts b/packages/clients/dish/src/mapConfigurations/mapConfigIntern.ts index b284a5206..0e4034508 100644 --- a/packages/clients/dish/src/mapConfigurations/mapConfigIntern.ts +++ b/packages/clients/dish/src/mapConfigurations/mapConfigIntern.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable max-lines-per-function */ // function includes all plugin configs specifically for internal map use import { SearchMethodConfiguration } from '@polar/lib-custom-types' @@ -164,4 +165,19 @@ export const mapConfigIntern = (urlParams: DishUrlParams): DishMapConfig => ({ fill: shBlue, }, }, + dishExportMap: { + printApproach: 'scale', + printRequester: 'client', + xPrint: 18, + yPrint: 20, + VersionHintergrund: '1.1.1', + ProxyHintergrund: 'y', + VersionWMS: '1.1.1', + LayerNameWMS: + '0,9,1,10,2,11,3,12,4,13,25,27,24,26,6,15,19,30,20,31,21,32,22,33,23,34,29,36,28,35', + VersionWFS: '1.1.0', + PropertyNameWFS: 'objektid', + FilterTypeWFS: 'EQUAL_TO', + PrintImagePath: 'ContentMapsTmp', + }, }) diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue index 578d6d3c0..0e2abb169 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -172,11 +172,11 @@ export default Vue.extend({ objektueberschrift: this.title, // spelling is intentional because of backend requirements masssstab: this.scaleValue, - printApproach: 'scale', - printRequester: 'client', + printApproach: this.configuration.dishExportMap.printApproach, + printRequester: this.configuration.dishExportMap.printRequester, id: this.currentProperties.objektid, - xPrint: 18, - yPrint: 20, + xPrint: this.configuration.dishExportMap.xPrint, + yPrint: this.configuration.dishExportMap.yPrint, scale: this.scaleValue, xMin: bbox?.xMin, yMin: bbox?.yMin, @@ -187,20 +187,19 @@ export default Vue.extend({ mapSRS: this.configuration.epsg, urlHintergrund: `${this.backgroundLayer.url}?`, LayerNameHintergrund: this.backgroundLayer.layers, - VersionHintergrund: '1.1.1', - ProxyHintergrund: 'y', + VersionHintergrund: this.configuration.dishExportMap.VersionHintergrund, + ProxyHintergrund: this.configuration.dishExportMap.ProxyHintergrund, urlWMS: `${this.wmsLayerUrl}?`, - VersionWMS: '1.1.1', - LayerNameWMS: - '0,9,1,10,2,11,3,12,4,13,25,27,24,26,6,15,19,30,20,31,21,32,22,33,23,34,29,36,28,35', + VersionWMS: this.configuration.dishExportMap.VersionWMS, + LayerNameWMS: this.configuration.dishExportMap.LayerNameWMS, urlWFS: `${this.wfsLayerUrl}?`, - VersionWFS: '1.1.0', + VersionWFS: this.configuration.dishExportMap.VersionWFS, LayerNameWFS: this.wfsLayerFeatureType, - PropertyNameWFS: 'objektid', - FilterTypeWFS: 'EQUAL_TO', + PropertyNameWFS: this.configuration.dishExportMap.PropertyNameWFS, + FilterTypeWFS: this.configuration.dishExportMap.FilterTypeWFS, scaleText: this.scaleWithUnit, PrintImageURL: this.printImageUrlProd, - PrintImagePath: 'ContentMapsTmp', + PrintImagePath: this.configuration.dishExportMap.PrintImagePath, } }, printMapAsPdf() { diff --git a/packages/clients/dish/src/types.ts b/packages/clients/dish/src/types.ts index e533b30a2..d4f0a1403 100644 --- a/packages/clients/dish/src/types.ts +++ b/packages/clients/dish/src/types.ts @@ -108,4 +108,18 @@ export interface DishMapConfig dishModal?: { isInternMap: boolean } + dishExportMap?: { + printApproach: string + printRequester: string + xPrint: number + yPrint: number + VersionHintergrund: string + ProxyHintergrund: string + VersionWMS: string + LayerNameWMS: string + VersionWFS: string + PropertyNameWFS: string + FilterTypeWFS: string + PrintImagePath: string + } }