Skip to content

Commit

Permalink
make dishExportMap parameter configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jedi-of-the-sea committed Feb 17, 2025
1 parent fd57120 commit 6f7d86b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
16 changes: 16 additions & 0 deletions packages/clients/dish/src/mapConfigurations/mapConfigIntern.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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',
},
})
25 changes: 12 additions & 13 deletions packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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() {
Expand Down
14 changes: 14 additions & 0 deletions packages/clients/dish/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 6f7d86b

Please sign in to comment.