From c363fa8f47f7ff8e3f54679567cfbd1d93f3827e Mon Sep 17 00:00:00 2001 From: bruehlca Date: Thu, 26 Sep 2024 15:54:04 +0200 Subject: [PATCH 001/207] add new enum MODE to dish client --- packages/clients/dish/src/addPlugins.ts | 129 ++++++++++++++---------- packages/clients/dish/src/enums.ts | 6 ++ 2 files changed, 82 insertions(+), 53 deletions(-) create mode 100644 packages/clients/dish/src/enums.ts diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 8e2625b08..8e462b07e 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -19,6 +19,7 @@ import { autocomplete, selectResult } from './utils/autocomplete' import DishModal from './plugins/Modal' import DishHeader from './plugins/Header' import DishGfiContent from './plugins/Gfi' +import { MODE } from './enums' const defaultOptions = { displayComponent: true, @@ -27,66 +28,80 @@ const defaultOptions = { // this is fine for list-like setup functions // eslint-disable-next-line max-lines-per-function -export const addPlugins = (core) => { - const iconMenu = PolarPluginIconMenu( - merge({}, defaultOptions, { - menus: [ - { - plugin: PolarPluginLayerChooser({}), - icon: 'fa-layer-group', - id: 'layerChooser', - }, - ], - layoutTag: NineLayoutTag.TOP_RIGHT, - }) - ) +export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { + const iconMenu = PolarPluginIconMenu({ + displayComponent: mode === MODE.EXTERN, + menus: [ + { + plugin: PolarPluginLayerChooser({}), + icon: 'fa-layer-group', + id: 'layerChooser', + }, + ], + layoutTag: NineLayoutTag.TOP_RIGHT, + }) setLayout(NineLayout) core.addPlugins([ iconMenu, - DishModal(defaultOptions), + DishModal({ + displayComponent: mode === MODE.EXTERN, + layoutTag: NineLayoutTag.TOP_LEFT, + }), DishHeader({ - ...defaultOptions, + displayComponent: mode === MODE.EXTERN, layoutTag: NineLayoutTag.TOP_MIDDLE, }), PolarPluginAddressSearch( - merge({}, defaultOptions, { - layoutTag: NineLayoutTag.TOP_LEFT, - addLoading: 'plugin/loadingIndicator/addLoadingKey', - removeLoading: 'plugin/loadingIndicator/removeLoadingKey', - customSearchMethods: { dish: search, autocomplete }, - customSelectResult: { categoryDenkmalsucheAutocomplete: selectResult }, - }) - ), - PolarPluginPins( - merge({}, defaultOptions, { - appearOnClick: { show: true, atZoomLevel: 6 }, - coordinateSource: 'plugin/addressSearch/chosenAddress', - }) + merge( + {}, + { + displayComponent: mode === MODE.EXTERN, + layoutTag: NineLayoutTag.TOP_LEFT, + addLoading: 'plugin/loadingIndicator/addLoadingKey', + removeLoading: 'plugin/loadingIndicator/removeLoadingKey', + customSearchMethods: { dish: search, autocomplete }, + customSelectResult: { + categoryDenkmalsucheAutocomplete: selectResult, + }, + } + ) ), + PolarPluginPins({ + displayComponent: mode === MODE.EXTERN, + appearOnClick: { show: true, atZoomLevel: 6 }, + coordinateSource: 'plugin/addressSearch/chosenAddress', + }), PolarPluginLegend( - merge({}, defaultOptions, { - layoutTag: NineLayoutTag.BOTTOM_RIGHT, - maxWidth: 500, - }) - ), - PolarPluginAttributions( - merge({}, defaultOptions, { - layoutTag: NineLayoutTag.BOTTOM_RIGHT, - listenToChanges: [ - 'plugin/zoom/zoomLevel', - 'plugin/layerChooser/activeBackgroundId', - 'plugin/layerChooser/activeMaskIds', - ], - }) + merge( + {}, + { + displayComponent: mode === MODE.EXTERN, + layoutTag: NineLayoutTag.BOTTOM_RIGHT, + maxWidth: 500, + } + ) ), + PolarPluginAttributions({ + displayComponent: mode === MODE.EXTERN, + layoutTag: NineLayoutTag.BOTTOM_RIGHT, + listenToChanges: [ + 'plugin/zoom/zoomLevel', + 'plugin/layerChooser/activeBackgroundId', + 'plugin/layerChooser/activeMaskIds', + ], + }), PolarPluginGfi( - merge({}, defaultOptions, { - coordinateSources: ['plugin/addressSearch/chosenAddress'], - gfiContentComponent: DishGfiContent, - afterLoadFunction: extendGfi, - }) + merge( + {}, + { + displayComponent: mode === MODE.EXTERN, + coordinateSources: ['plugin/addressSearch/chosenAddress'], + gfiContentComponent: DishGfiContent, + afterLoadFunction: extendGfi, + } + ) ), PolarPluginLoadingIndicator( merge({}, defaultOptions, { @@ -99,9 +114,13 @@ export const addPlugins = (core) => { }) ), PolarPluginToast( - merge({}, defaultOptions, { - layoutTag: NineLayoutTag.BOTTOM_MIDDLE, - }) + merge( + {}, + { + displayComponent: mode === MODE.EXTERN, + layoutTag: NineLayoutTag.BOTTOM_MIDDLE, + } + ) ), PolarPluginZoom( merge({}, defaultOptions, { @@ -109,9 +128,13 @@ export const addPlugins = (core) => { }) ), PolarPluginGeoLocation( - merge({}, defaultOptions, { - layoutTag: NineLayoutTag.MIDDLE_RIGHT, - }) + merge( + {}, + { + displayComponent: mode === MODE.EXTERN, + layoutTag: NineLayoutTag.MIDDLE_RIGHT, + } + ) ), ]) } diff --git a/packages/clients/dish/src/enums.ts b/packages/clients/dish/src/enums.ts new file mode 100644 index 000000000..14dcdf3a4 --- /dev/null +++ b/packages/clients/dish/src/enums.ts @@ -0,0 +1,6 @@ +export const MODE = { + // display view for users that visit the map via URL + EXTERN: 'EXTERN', + // display intern view for administrators that work within the map + INTERN: 'INTERN', +} From 1c1e51eef2d8defea198c32aac3d2c1ecd4e3a30 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Fri, 27 Sep 2024 16:42:46 +0200 Subject: [PATCH 002/207] WIP --- packages/clients/dish/src/index.html | 9 +++- packages/clients/dish/src/polar-client.ts | 59 +++++++++++------------ 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/packages/clients/dish/src/index.html b/packages/clients/dish/src/index.html index 4bf5504c5..e7c4e6aa7 100644 --- a/packages/clients/dish/src/index.html +++ b/packages/clients/dish/src/index.html @@ -24,6 +24,13 @@ - + diff --git a/packages/clients/dish/src/polar-client.ts b/packages/clients/dish/src/polar-client.ts index 195b8f739..5d4d55c2c 100644 --- a/packages/clients/dish/src/polar-client.ts +++ b/packages/clients/dish/src/polar-client.ts @@ -10,35 +10,32 @@ import './styles.css' // eslint-disable-next-line no-console console.log(`DISH map client running in version ${packageInfo.version}.`) -addPlugins(client) - -const containerId = 'polarstern' - -async function initializeClient() { - client.rawLayerList.initializeLayerList(layerConf) - - const instance = await client.createMap({ - containerId, - mapConfiguration: { - ...mapConfiguration, - layerConf, - }, - }) - - const parameters = new URL(document.location as unknown as string) - .searchParams - // using naming from backend to avoid multiple names for same thing - const objektId = parameters.get('ObjektID') - - if (typeof objektId === 'string') { - navigateToDenkmal(instance, objektId) - } - - // @ts-expect-error | intentionally expand window; no environment affected - window.openBenutzungshinweise = function () { - instance.$store.commit('plugin/modal/setContent', CONTENT_ENUM.HINTS) - instance.$store.commit('plugin/modal/setClosed', false) - } +export default { + createMap: async ({ containerId, mode }) => { + addPlugins(client, mode) + client.rawLayerList.initializeLayerList(layerConf) + + const instance = await client.createMap({ + containerId, + mapConfiguration: { + ...mapConfiguration, + layerConf, + }, + }) + + const parameters = new URL(document.location as unknown as string) + .searchParams + // using naming from backend to avoid multiple names for same thing + const objektId = parameters.get('ObjektID') + + if (typeof objektId === 'string') { + navigateToDenkmal(instance, objektId) + } + + // @ts-expect-error | intentionally expand window; no environment affected + window.openBenutzungshinweise = function () { + instance.$store.commit('plugin/modal/setContent', CONTENT_ENUM.HINTS) + instance.$store.commit('plugin/modal/setClosed', false) + } + }, } - -initializeClient() From e5946b69d4f671cef95906b4573d2bb52ff1325d Mon Sep 17 00:00:00 2001 From: bruehlca Date: Fri, 27 Sep 2024 17:35:18 +0200 Subject: [PATCH 003/207] add configOverride to createMap --- packages/clients/dish/src/addPlugins.ts | 2 +- packages/clients/dish/src/index.html | 12 +++++++++++- packages/clients/dish/src/polar-client.ts | 14 +++++++++----- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 8e462b07e..48f156e1c 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -84,7 +84,7 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { ) ), PolarPluginAttributions({ - displayComponent: mode === MODE.EXTERN, + displayComponent: true, layoutTag: NineLayoutTag.BOTTOM_RIGHT, listenToChanges: [ 'plugin/zoom/zoomLevel', diff --git a/packages/clients/dish/src/index.html b/packages/clients/dish/src/index.html index e7c4e6aa7..53c0c332e 100644 --- a/packages/clients/dish/src/index.html +++ b/packages/clients/dish/src/index.html @@ -29,7 +29,17 @@ client.createMap({ containerId: 'polarstern', - mode: 'EXTERN' + mode: 'INTERN', // INTERN, EXTERN + configOverride: + { + attributions: { + initiallyOpen: false, + }, + scale: { + showScaleSwitcher: true, + zoomMethod: 'plugin/zoom/setZoomLevel', + }, + }, }) diff --git a/packages/clients/dish/src/polar-client.ts b/packages/clients/dish/src/polar-client.ts index 5d4d55c2c..5ccfd31c8 100644 --- a/packages/clients/dish/src/polar-client.ts +++ b/packages/clients/dish/src/polar-client.ts @@ -1,4 +1,5 @@ import client from '@polar/core' +import merge from 'lodash.merge' import packageInfo from '../package.json' import { navigateToDenkmal } from './utils/navigateToDenkmal' import { addPlugins } from './addPlugins' @@ -11,16 +12,19 @@ import './styles.css' console.log(`DISH map client running in version ${packageInfo.version}.`) export default { - createMap: async ({ containerId, mode }) => { + createMap: async ({ containerId, mode, configOverride }) => { addPlugins(client, mode) client.rawLayerList.initializeLayerList(layerConf) const instance = await client.createMap({ containerId, - mapConfiguration: { - ...mapConfiguration, - layerConf, - }, + mapConfiguration: merge( + { + ...mapConfiguration, + layerConf, + }, + configOverride || {} + ), }) const parameters = new URL(document.location as unknown as string) From 2b6647e2795f1e9815343e51a6cff463feaa15c7 Mon Sep 17 00:00:00 2001 From: FinnDarge Date: Wed, 2 Oct 2024 09:03:19 +0200 Subject: [PATCH 004/207] add internal plugins --- package-lock.json | 3 ++ packages/clients/dish/package.json | 3 ++ packages/clients/dish/src/addPlugins.ts | 42 ++++++++++++++++++++----- 3 files changed, 40 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index b8fa6cb6e..5895a4e82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16724,6 +16724,9 @@ "@polar/lib-get-features": "^1.0.0", "@polar/plugin-address-search": "^1.2.0", "@polar/plugin-attributions": "^1.2.0", + "@polar/plugin-draw": "^1.1.0", + "@polar/plugin-export": "^1.2.0", + "@polar/plugin-fullscreen": "^1.2.1", "@polar/plugin-geo-location": "^1.3.0", "@polar/plugin-gfi": "^1.2.0", "@polar/plugin-icon-menu": "^1.2.0", diff --git a/packages/clients/dish/package.json b/packages/clients/dish/package.json index 06e8e954d..640cd890b 100644 --- a/packages/clients/dish/package.json +++ b/packages/clients/dish/package.json @@ -28,6 +28,9 @@ "@polar/lib-get-features": "^1.0.0", "@polar/plugin-address-search": "^1.2.0", "@polar/plugin-attributions": "^1.2.0", + "@polar/plugin-draw": "^1.1.0", + "@polar/plugin-export": "^1.2.0", + "@polar/plugin-fullscreen": "^1.2.1", "@polar/plugin-geo-location": "^1.3.0", "@polar/plugin-gfi": "^1.2.0", "@polar/plugin-icon-menu": "^1.2.0", diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 48f156e1c..8d6129eb5 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -1,6 +1,9 @@ import { setLayout, NineLayout, NineLayoutTag } from '@polar/core' import PolarPluginAddressSearch from '@polar/plugin-address-search' import PolarPluginAttributions from '@polar/plugin-attributions' +import PolarPluginDraw from '@polar/plugin-draw' +import PolarPluginExport from '@polar/plugin-export' +import PolarPluginFullscreen from '@polar/plugin-fullscreen' import PolarPluginGeoLocation from '@polar/plugin-geo-location' import PolarPluginGfi from '@polar/plugin-gfi' import PolarPluginIconMenu from '@polar/plugin-icon-menu' @@ -29,15 +32,32 @@ const defaultOptions = { // this is fine for list-like setup functions // eslint-disable-next-line max-lines-per-function export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { + const internalMenu = [ + { + plugin: PolarPluginLayerChooser({}), + icon: 'fa-layer-group', + id: 'layerChooser', + }, + { + plugin: PolarPluginDraw({}), + icon: 'fa-pencil', + id: 'draw', + }, + { + plugin: PolarPluginFullscreen({ renderType: 'iconMenu' }), + id: 'fullscreen', + }, + ] + const externalMenu = [ + { + plugin: PolarPluginLayerChooser({}), + icon: 'fa-layer-group', + id: 'layerChooser', + }, + ] const iconMenu = PolarPluginIconMenu({ - displayComponent: mode === MODE.EXTERN, - menus: [ - { - plugin: PolarPluginLayerChooser({}), - icon: 'fa-layer-group', - id: 'layerChooser', - }, - ], + displayComponent: mode === MODE.INTERN, + menus: mode === MODE.INTERN ? internalMenu : externalMenu, layoutTag: NineLayoutTag.TOP_RIGHT, }) @@ -68,6 +88,12 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { } ) ), + PolarPluginExport( + merge({}, defaultOptions, { + displayComponent: mode === MODE.INTERN, + layoutTag: NineLayoutTag.BOTTOM_LEFT, + }) + ), PolarPluginPins({ displayComponent: mode === MODE.EXTERN, appearOnClick: { show: true, atZoomLevel: 6 }, From 105cd11f573cd5d9fb9f5c361f02e0926542e7ae Mon Sep 17 00:00:00 2001 From: bruehlca Date: Fri, 4 Oct 2024 14:43:31 +0200 Subject: [PATCH 005/207] create mapconfigs for both modes --- packages/clients/dish/src/addPlugins.ts | 2 +- packages/clients/dish/src/index.html | 10 +- packages/clients/dish/src/mapConfig.ts | 147 +++++++++++------- packages/clients/dish/src/polar-client.ts | 3 +- .../dish/src/utils/navigateToDenkmal.ts | 4 +- 5 files changed, 102 insertions(+), 64 deletions(-) diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 8d6129eb5..b7cda5d6f 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -56,7 +56,7 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { }, ] const iconMenu = PolarPluginIconMenu({ - displayComponent: mode === MODE.INTERN, + displayComponent: true, menus: mode === MODE.INTERN ? internalMenu : externalMenu, layoutTag: NineLayoutTag.TOP_RIGHT, }) diff --git a/packages/clients/dish/src/index.html b/packages/clients/dish/src/index.html index 53c0c332e..0df9d0a00 100644 --- a/packages/clients/dish/src/index.html +++ b/packages/clients/dish/src/index.html @@ -31,15 +31,7 @@ containerId: 'polarstern', mode: 'INTERN', // INTERN, EXTERN configOverride: - { - attributions: { - initiallyOpen: false, - }, - scale: { - showScaleSwitcher: true, - zoomMethod: 'plugin/zoom/setZoomLevel', - }, - }, + {}, }) diff --git a/packages/clients/dish/src/mapConfig.ts b/packages/clients/dish/src/mapConfig.ts index 0d674cd58..9770b797f 100644 --- a/packages/clients/dish/src/mapConfig.ts +++ b/packages/clients/dish/src/mapConfig.ts @@ -1,3 +1,4 @@ +import merge from 'lodash.merge' // number-only keys needed in layers object /* eslint-disable @typescript-eslint/naming-convention */ import { @@ -24,7 +25,7 @@ const unnamed = '#0089CA'; let zoomLevel = 0 -export const mapConfiguration = { +const commonMapConfiguration = { checkServiceAvailability: true, startResolution: 264.583190458, startCenter: [553655.72, 6004479.25], @@ -80,6 +81,91 @@ export const mapConfiguration = { }, }, }, + gfi: { + mode: 'intersects', + layers: { + [denkmaelerWFS]: { + geometry: true, + window: true, + maxFeatures: 10, + geometryName: 'app:geometry', + exportProperty: 'Export', + }, + }, + coordinateSources: [ + 'plugin/pins/transformedCoordinate', + 'plugin/pins/coordinatesAfterDrag', + ], + }, + pins: { + toZoomLevel: 7, + movable: 'drag', + style: { + fill: shBlue, + }, + }, + options: [ + { resolution: 264.583190458, scale: 1000000, zoomLevel: zoomLevel++ }, + { resolution: 132.291595229, scale: 500000, zoomLevel: zoomLevel++ }, + { resolution: 66.14579761460263, scale: 250000, zoomLevel: zoomLevel++ }, + { resolution: 26.458319045841044, scale: 100000, zoomLevel: zoomLevel++ }, + { resolution: 15.874991427504629, scale: 60000, zoomLevel: zoomLevel++ }, + { resolution: 10.583327618336419, scale: 40000, zoomLevel: zoomLevel++ }, + { resolution: 5.2916638091682096, scale: 20000, zoomLevel: zoomLevel++ }, + { resolution: 2.6458319045841048, scale: 10000, zoomLevel: zoomLevel++ }, + { resolution: 1.3229159522920524, scale: 5000, zoomLevel: zoomLevel++ }, + { resolution: 0.6614579761460262, scale: 2500, zoomLevel: zoomLevel++ }, + { resolution: 0.2645831904584105, scale: 1000, zoomLevel: zoomLevel++ }, + { resolution: 0.1322915952292052, scale: 500, zoomLevel: zoomLevel++ }, + { resolution: 0.06614579761, scale: 250, zoomLevel: zoomLevel++ }, + { resolution: 0.02645831904, scale: 100, zoomLevel: zoomLevel++ }, + { resolution: 0.01322915952, scale: 50, zoomLevel: zoomLevel++ }, + ], +} + +const internMapConfiguration = { + scale: { + showScaleSwitcher: true, + zoomMethod: 'plugin/zoom/setZoomLevel', + }, + attributions: { + initiallyOpen: true, + layerAttributions: [ + { + id: hintergrundkarte, + title: + 'Karte Basemap.de Web Raster Grau: © basemap.de / BKG ', + }, + ], + }, + draw: { + selectableDrawModes: ['Circle', 'LineString', 'Point', 'Polygon', 'Text'], + textStyle: { + font: { + size: [10, 20, 30], + family: 'Arial', + }, + }, + style: { + fill: { color: 'rgba(255, 255, 255, 0.5)' }, + stroke: { + color: '#e51313', + width: 2, + }, + circle: { + radius: 7, + fillColor: '#e51313', + }, + }, + }, + export: { + showPng: true, + showJpg: false, + showPdf: false, + }, +} + +const exportMapConfiguration = { geoLocation: { checkLocationInitially: false, toastAction: 'plugin/toast/addToast', @@ -156,17 +242,6 @@ export const mapConfiguration = { topic: null, }, }, - /* - { - queryParameters: { - filter: { - bundesland: 'Schleswig-Holstein', - }, - }, - type: 'bkg', - url: '', - }, - */ ], groupProperties: { groupDenkmalsuche: { @@ -189,44 +264,12 @@ export const mapConfiguration = { }, minLength: 3, }, - gfi: { - mode: 'intersects', - layers: { - [denkmaelerWFS]: { - geometry: true, - window: true, - maxFeatures: 10, - geometryName: 'app:geometry', - exportProperty: 'Export', - }, - }, - coordinateSources: [ - 'plugin/pins/transformedCoordinate', - 'plugin/pins/coordinatesAfterDrag', - ], - }, - pins: { - toZoomLevel: 7, - movable: 'drag', - style: { - fill: shBlue, - }, - }, - options: [ - { resolution: 264.583190458, scale: 1000000, zoomLevel: zoomLevel++ }, - { resolution: 132.291595229, scale: 500000, zoomLevel: zoomLevel++ }, - { resolution: 66.14579761460263, scale: 250000, zoomLevel: zoomLevel++ }, - { resolution: 26.458319045841044, scale: 100000, zoomLevel: zoomLevel++ }, - { resolution: 15.874991427504629, scale: 60000, zoomLevel: zoomLevel++ }, - { resolution: 10.583327618336419, scale: 40000, zoomLevel: zoomLevel++ }, - { resolution: 5.2916638091682096, scale: 20000, zoomLevel: zoomLevel++ }, - { resolution: 2.6458319045841048, scale: 10000, zoomLevel: zoomLevel++ }, - { resolution: 1.3229159522920524, scale: 5000, zoomLevel: zoomLevel++ }, - { resolution: 0.6614579761460262, scale: 2500, zoomLevel: zoomLevel++ }, - { resolution: 0.2645831904584105, scale: 1000, zoomLevel: zoomLevel++ }, - { resolution: 0.1322915952292052, scale: 500, zoomLevel: zoomLevel++ }, - { resolution: 0.06614579761, scale: 250, zoomLevel: zoomLevel++ }, - { resolution: 0.02645831904, scale: 100, zoomLevel: zoomLevel++ }, - { resolution: 0.01322915952, scale: 50, zoomLevel: zoomLevel++ }, - ], +} + +export const getMapConfiguration = (mode: string) => { + const config = merge({ + ...commonMapConfiguration, + ...(mode === 'INTERN' ? internMapConfiguration : exportMapConfiguration), + }) + return config } diff --git a/packages/clients/dish/src/polar-client.ts b/packages/clients/dish/src/polar-client.ts index 5ccfd31c8..6ff071656 100644 --- a/packages/clients/dish/src/polar-client.ts +++ b/packages/clients/dish/src/polar-client.ts @@ -4,7 +4,7 @@ import packageInfo from '../package.json' import { navigateToDenkmal } from './utils/navigateToDenkmal' import { addPlugins } from './addPlugins' import { services as layerConf } from './services' -import { mapConfiguration } from './mapConfig' +import { getMapConfiguration } from './mapConfig' import { CONTENT_ENUM } from './plugins/Modal/store' import './styles.css' @@ -15,6 +15,7 @@ export default { createMap: async ({ containerId, mode, configOverride }) => { addPlugins(client, mode) client.rawLayerList.initializeLayerList(layerConf) + const mapConfiguration = getMapConfiguration(mode) const instance = await client.createMap({ containerId, diff --git a/packages/clients/dish/src/utils/navigateToDenkmal.ts b/packages/clients/dish/src/utils/navigateToDenkmal.ts index dd98581b7..77139fc95 100644 --- a/packages/clients/dish/src/utils/navigateToDenkmal.ts +++ b/packages/clients/dish/src/utils/navigateToDenkmal.ts @@ -1,7 +1,9 @@ import { getWfsFeatures } from '@polar/lib-get-features' import { FeatureCollection, Geometry, GeometryCollection } from 'geojson' import { denkmaelerWfsService } from '../services' -import { mapConfiguration } from '../mapConfig' +import { getMapConfiguration } from '../mapConfig' + +const mapConfiguration = getMapConfiguration('EXTERN') export function navigateToDenkmal(instance, objektId: string) { const wfsConfig = mapConfiguration.addressSearch.searchMethods.find( From 0dd540586df962d6daac1701b8fc814449edcbbd Mon Sep 17 00:00:00 2001 From: bruehlca Date: Fri, 4 Oct 2024 17:11:57 +0200 Subject: [PATCH 006/207] adjust attributions --- packages/clients/dish/src/addPlugins.ts | 5 ++++- packages/clients/dish/src/mapConfig.ts | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index b7cda5d6f..314ecfafc 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -111,7 +111,10 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { ), PolarPluginAttributions({ displayComponent: true, - layoutTag: NineLayoutTag.BOTTOM_RIGHT, + layoutTag: + mode === MODE.EXTERN + ? NineLayoutTag.BOTTOM_RIGHT + : NineLayoutTag.BOTTOM_MIDDLE, listenToChanges: [ 'plugin/zoom/zoomLevel', 'plugin/layerChooser/activeBackgroundId', diff --git a/packages/clients/dish/src/mapConfig.ts b/packages/clients/dish/src/mapConfig.ts index 9770b797f..6d5f48e0f 100644 --- a/packages/clients/dish/src/mapConfig.ts +++ b/packages/clients/dish/src/mapConfig.ts @@ -129,12 +129,11 @@ const internMapConfiguration = { zoomMethod: 'plugin/zoom/setZoomLevel', }, attributions: { - initiallyOpen: true, + renderType: 'footer', layerAttributions: [ { id: hintergrundkarte, - title: - 'Karte Basemap.de Web Raster Grau: © basemap.de / BKG ', + title: 'Hintergrundkarten ©basemap.de/BKG;Geobasis-DE/LVermGeo SH', }, ], }, @@ -159,6 +158,7 @@ const internMapConfiguration = { }, }, export: { + download: true, showPng: true, showJpg: false, showPdf: false, From c6cce207a58abb7deda885c90fe0f074c32f5549 Mon Sep 17 00:00:00 2001 From: Dennis Sen Date: Mon, 7 Oct 2024 10:40:59 +0200 Subject: [PATCH 007/207] readd missing layout tag --- packages/clients/dish/src/addPlugins.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 314ecfafc..2012f86ed 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -126,6 +126,7 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { {}, { displayComponent: mode === MODE.EXTERN, + layoutTag: NineLayoutTag.TOP_LEFT, coordinateSources: ['plugin/addressSearch/chosenAddress'], gfiContentComponent: DishGfiContent, afterLoadFunction: extendGfi, From f4484bcc4ed668679c15973d30f2d7fa5d82eee2 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 7 Oct 2024 17:08:53 +0200 Subject: [PATCH 008/207] add different gfi config for internal use --- packages/clients/dish/src/addPlugins.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 2012f86ed..91685df99 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -29,6 +29,18 @@ const defaultOptions = { layoutTag: NineLayoutTag.TOP_LEFT, } +const pluginGfiExtern = { + coordinateSources: ['plugin/addressSearch/chosenAddress'], + gfiContentComponent: DishGfiContent, + afterLoadFunction: extendGfi, +} + +const pluginGfiIntern = {} + +function getPluginGfiConfig(mode: keyof typeof MODE) { + return mode === 'EXTERN' ? pluginGfiExtern : pluginGfiIntern +} + // this is fine for list-like setup functions // eslint-disable-next-line max-lines-per-function export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { @@ -125,12 +137,10 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { merge( {}, { - displayComponent: mode === MODE.EXTERN, + displayComponent: true, layoutTag: NineLayoutTag.TOP_LEFT, - coordinateSources: ['plugin/addressSearch/chosenAddress'], - gfiContentComponent: DishGfiContent, - afterLoadFunction: extendGfi, - } + }, + getPluginGfiConfig(mode) ) ), PolarPluginLoadingIndicator( From 46cbe4879da39f69c13f48a6e6615db936e548c7 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Tue, 8 Oct 2024 14:00:11 +0200 Subject: [PATCH 009/207] add gfi for internal use --- packages/clients/dish/src/addPlugins.ts | 6 +- .../src/plugins/internGfi/InternContent.vue | 99 +++++++++++++++++++ .../dish/src/plugins/internGfi/index.ts | 3 + 3 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 packages/clients/dish/src/plugins/internGfi/InternContent.vue create mode 100644 packages/clients/dish/src/plugins/internGfi/index.ts diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 91685df99..4acb90e8c 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -23,6 +23,7 @@ import DishModal from './plugins/Modal' import DishHeader from './plugins/Header' import DishGfiContent from './plugins/Gfi' import { MODE } from './enums' +import DishGfiIntern from './plugins/internGfi' const defaultOptions = { displayComponent: true, @@ -35,7 +36,10 @@ const pluginGfiExtern = { afterLoadFunction: extendGfi, } -const pluginGfiIntern = {} +const pluginGfiIntern = { + gfiContentComponent: DishGfiIntern, + // afterLoadFunction: gfiForInternalUse, +} function getPluginGfiConfig(mode: keyof typeof MODE) { return mode === 'EXTERN' ? pluginGfiExtern : pluginGfiIntern diff --git a/packages/clients/dish/src/plugins/internGfi/InternContent.vue b/packages/clients/dish/src/plugins/internGfi/InternContent.vue new file mode 100644 index 000000000..4fe70141d --- /dev/null +++ b/packages/clients/dish/src/plugins/internGfi/InternContent.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/packages/clients/dish/src/plugins/internGfi/index.ts b/packages/clients/dish/src/plugins/internGfi/index.ts new file mode 100644 index 000000000..afdd950d5 --- /dev/null +++ b/packages/clients/dish/src/plugins/internGfi/index.ts @@ -0,0 +1,3 @@ +import DishGfiIntern from './InternContent.vue' + +export default DishGfiIntern From 34d7ebd4a37ac024bb946be65b616565d802ffed Mon Sep 17 00:00:00 2001 From: bruehlca Date: Tue, 8 Oct 2024 14:15:53 +0200 Subject: [PATCH 010/207] add english translation --- packages/clients/dish/src/locales.ts | 2 ++ packages/clients/dish/src/plugins/internGfi/InternContent.vue | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/clients/dish/src/locales.ts b/packages/clients/dish/src/locales.ts index 204ce5bd6..c6158c382 100644 --- a/packages/clients/dish/src/locales.ts +++ b/packages/clients/dish/src/locales.ts @@ -9,6 +9,7 @@ const locales = [ idNotFound: 'Die verlinkte ID konnte leider nicht aufgelöst werden. Bitte verwenden Sie Suche und Karte, um zum Denkmal zu navigieren.', addressSearchHint: 'Eingabe von z.B. Bezeichnung, Lage, Adresse, ...', + gfiHeader: 'Objektnummer', }, plugins: { gfi: { @@ -31,6 +32,7 @@ const locales = [ 'The linked ID could not be found. Please use the search function or map to navigate to your point of interest.', addressSearchHint: 'Entry of e.g. monument names, location, address, ...', + gfiHeader: 'Object number', }, plugins: { gfi: { diff --git a/packages/clients/dish/src/plugins/internGfi/InternContent.vue b/packages/clients/dish/src/plugins/internGfi/InternContent.vue index 4fe70141d..d7ef8ba6d 100644 --- a/packages/clients/dish/src/plugins/internGfi/InternContent.vue +++ b/packages/clients/dish/src/plugins/internGfi/InternContent.vue @@ -13,7 +13,7 @@ - Objektnummer {{ tableHead }} + {{ `${$t('common:dish.gfiHeader')} ${tableHead}` }} From 1e500ca801384318349c4bdc22847c71949ecdcb Mon Sep 17 00:00:00 2001 From: bruehlca Date: Tue, 8 Oct 2024 14:30:09 +0200 Subject: [PATCH 011/207] add custom highlight style --- packages/clients/dish/src/addPlugins.ts | 1 - packages/clients/dish/src/mapConfig.ts | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 4acb90e8c..d114df993 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -38,7 +38,6 @@ const pluginGfiExtern = { const pluginGfiIntern = { gfiContentComponent: DishGfiIntern, - // afterLoadFunction: gfiForInternalUse, } function getPluginGfiConfig(mode: keyof typeof MODE) { diff --git a/packages/clients/dish/src/mapConfig.ts b/packages/clients/dish/src/mapConfig.ts index 6d5f48e0f..48db2249c 100644 --- a/packages/clients/dish/src/mapConfig.ts +++ b/packages/clients/dish/src/mapConfig.ts @@ -96,6 +96,15 @@ const commonMapConfiguration = { 'plugin/pins/transformedCoordinate', 'plugin/pins/coordinatesAfterDrag', ], + customHighlightStyle: { + stroke: { + color: '#ecec1c', + width: 3, + }, + fill: { + color: 'rgb(255, 255, 255, 0.3)', + }, + }, }, pins: { toZoomLevel: 7, From 7dfeb4f07df73d02635b3388c6e1d98b7bdaf883 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Wed, 9 Oct 2024 09:35:24 +0200 Subject: [PATCH 012/207] add image to intern gfi --- packages/clients/dish/src/mapConfig.ts | 2 +- .../src/plugins/internGfi/InternContent.vue | 41 ++++++++++++++++--- packages/clients/dish/src/utils/extendGfi.ts | 2 +- 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/packages/clients/dish/src/mapConfig.ts b/packages/clients/dish/src/mapConfig.ts index 48db2249c..63c50af17 100644 --- a/packages/clients/dish/src/mapConfig.ts +++ b/packages/clients/dish/src/mapConfig.ts @@ -98,7 +98,7 @@ const commonMapConfiguration = { ], customHighlightStyle: { stroke: { - color: '#ecec1c', + color: '#FFFF00', width: 3, }, fill: { diff --git a/packages/clients/dish/src/plugins/internGfi/InternContent.vue b/packages/clients/dish/src/plugins/internGfi/InternContent.vue index d7ef8ba6d..5349bb80d 100644 --- a/packages/clients/dish/src/plugins/internGfi/InternContent.vue +++ b/packages/clients/dish/src/plugins/internGfi/InternContent.vue @@ -13,8 +13,14 @@ - {{ `${$t('common:dish.gfiHeader')} ${tableHead}` }} + {{ `${$t('common:dish.gfiHeader')} ${objektIdentifier}` }} + @@ -41,10 +44,11 @@ import Vue from 'vue' import { mapActions, mapMutations, mapGetters } from 'vuex' import ActionButton from '../Gfi/ActionButton.vue' import { getPhoto } from '../../utils/extendGfi' +import InternSwitchButton from './InternSwitchButton.vue' export default Vue.extend({ name: 'DishGfiIntern', - components: { ActionButton }, + components: { ActionButton, InternSwitchButton }, data: () => ({ infoFields: { denkmalliste: 'Denkmalliste', @@ -56,11 +60,12 @@ export default Vue.extend({ zaehler: 'Zähler', }, infoFieldsAdress: ['strasse', 'hausnummer', 'hausnrzusatz'], + infoFielsFlurstueck: ['flstnrzae', 'flstnrnen'], photo: '', }), computed: { ...mapGetters(['clientWidth', 'hasSmallWidth', 'hasWindowSize']), - ...mapGetters('plugin/gfi', ['currentProperties']), + ...mapGetters('plugin/gfi', ['currentProperties', 'showSwitchButtons']), objektIdentifier(): string { return this.currentProperties.objektid }, @@ -115,6 +120,15 @@ export default Vue.extend({ ] if (address && address.trim() !== '') tableData.push(addressData) + const flurStueck = this.infoFielsFlurstueck + .map((field) => object[field]) + .filter((value) => value) + .join(' / ') + + const flurStueckData = ['Flurstück', flurStueck] + + if (flurStueck && flurStueck.trim() !== '') tableData.push(flurStueckData) + return tableData }, async setImage() { @@ -140,4 +154,9 @@ export default Vue.extend({ font-weight: bolder; word-break: break-word; } + +#dish-gfi-switch-buttons { + display: flex; + justify-content: right; +} diff --git a/packages/clients/dish/src/plugins/internGfi/InternSwitchButton.vue b/packages/clients/dish/src/plugins/internGfi/InternSwitchButton.vue new file mode 100644 index 000000000..ff71a790a --- /dev/null +++ b/packages/clients/dish/src/plugins/internGfi/InternSwitchButton.vue @@ -0,0 +1,63 @@ + + + diff --git a/packages/clients/dish/src/services.ts b/packages/clients/dish/src/services.ts index f0567f488..82c905940 100644 --- a/packages/clients/dish/src/services.ts +++ b/packages/clients/dish/src/services.ts @@ -37,8 +37,8 @@ export const dishCloudBaseUrl = 'https://dishreserveproxy.dsecurecloud.de' // TODO export const internServicesBaseUrl = isDevMode - ? 'http://10.61.63.54:8081/dish-deegree-3.5.0/services/' - : `#{HIER MUSS NOCH DER RICHTIGE PLATZHALTER REIN}/dish` + ? 'http://10.61.63.54:8081/dish-deegree-3.5.0/services' + : `#{HIER MUSS NOCH DER RICHTIGE PLATZHALTER REIN}` export const denkmaelerWmsService = { id: denkmaelerWMS, From 5c324863e3d26a6f6a82a6f591d623a051b8ac44 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Tue, 29 Oct 2024 14:52:54 +0100 Subject: [PATCH 027/207] adjust searches --- packages/clients/dish/src/internMapConfiguration.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/clients/dish/src/internMapConfiguration.ts b/packages/clients/dish/src/internMapConfiguration.ts index 08efd1976..4100a6567 100644 --- a/packages/clients/dish/src/internMapConfiguration.ts +++ b/packages/clients/dish/src/internMapConfiguration.ts @@ -160,8 +160,9 @@ export const internMapConfiguration = { hausnummer: '([0-9]+)', strasse: '([A-Za-z]+)', objektansprache: '([A-Za-z]+)', + kreis_kue: '([A-Za-z]+)', }, - patterns: ['{{objektansprache}} {{strasse}} {{hausnummer}}'], + patterns: ['{{objektansprache}} {{strasse}} {{hausnummer}}, {{kreis_kue}}'], }, }, { @@ -191,8 +192,9 @@ export const internMapConfiguration = { flstnrnen: '([0-9]+)', flstnrzae: '([0-9]+)', gemarkung: '([A-Za-z]+)', + flstkennz: '([0-9_]+)', }, - patterns: ['{{gemarkung}} {{flstnrzae}}/{{flstnrnen}}', '{{gemarkung}} {{flstnrzae}}'], + patterns: ['{{gemarkung}} {{flstnrzae}}/{{flstnrnen}}, {{flstkennz}}', '{{gemarkung}} {{flstnrzae}}, {{flstkennz}}', '{{flstkennz}}'], }, }, ], From 41ceeae48424fdaabcc0ba724c69c73e6ca6c055 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Tue, 29 Oct 2024 14:54:39 +0100 Subject: [PATCH 028/207] adjust gfi for ALKIS --- packages/clients/dish/src/plugins/internGfi/InternContent.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/clients/dish/src/plugins/internGfi/InternContent.vue b/packages/clients/dish/src/plugins/internGfi/InternContent.vue index 7066ea777..fbff3c0b2 100644 --- a/packages/clients/dish/src/plugins/internGfi/InternContent.vue +++ b/packages/clients/dish/src/plugins/internGfi/InternContent.vue @@ -58,6 +58,8 @@ export default Vue.extend({ gemeinde: 'Gemeinde', objektansprache: 'Ansprache', zaehler: 'Zähler', + gemarkung: 'Gemarkung', + flstkennz: 'Flurstückskennzeichen', }, infoFieldsAdress: ['strasse', 'hausnummer', 'hausnrzusatz'], infoFielsFlurstueck: ['flstnrzae', 'flstnrnen'], From 4d2f0956b277eca04d1c3c008f5ad174aa0ef7d8 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Tue, 29 Oct 2024 15:21:32 +0100 Subject: [PATCH 029/207] adjust config for extern ALKIS search --- packages/clients/dish/src/externMapConfiguration.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/clients/dish/src/externMapConfiguration.ts b/packages/clients/dish/src/externMapConfiguration.ts index e221af672..81397fd37 100644 --- a/packages/clients/dish/src/externMapConfiguration.ts +++ b/packages/clients/dish/src/externMapConfiguration.ts @@ -182,10 +182,12 @@ export const exportMapConfiguration = { flstnrnen: '([0-9]+)', flstnrzae: '([0-9]+)', gemarkung: '([A-Za-z]+)', + flstkennz: '([0-9_]+)', }, patterns: [ - '{{gemarkung}} {{flstnrzae}}/{{flstnrnen}}', - '{{gemarkung}} {{flstnrzae}}', + '{{gemarkung}} {{flstnrzae}}/{{flstnrnen}}, {{flstkennz}}', + '{{gemarkung}} {{flstnrzae}}, {{flstkennz}}', + '{{flstkennz}}', ], }, }, From 98d701661be5e3a5bc2c3645e90cb8ae8d49ac8b Mon Sep 17 00:00:00 2001 From: bruehlca Date: Wed, 30 Oct 2024 14:17:10 +0100 Subject: [PATCH 030/207] add new custom plugin DishExportMap --- packages/clients/dish/src/addPlugins.ts | 7 +- .../plugins/DishExportMap/DishExportMap.vue | 182 ++++++++++++++++++ .../dish/src/plugins/DishExportMap/index.ts | 12 ++ 3 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue create mode 100644 packages/clients/dish/src/plugins/DishExportMap/index.ts diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 911209941..3258767f8 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -23,7 +23,8 @@ import DishModal from './plugins/Modal' import DishHeader from './plugins/Header' import DishGfiContent from './plugins/Gfi' import { MODE } from './enums' -import DishGfiIntern from './plugins/internGfi' +import DishGfiIntern from './plugins/InternGfi' +import DishExportMap from './plugins/DishExportMap' const defaultOptions = { displayComponent: true, @@ -89,6 +90,10 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { displayComponent: mode === MODE.EXTERN, layoutTag: NineLayoutTag.TOP_MIDDLE, }), + DishExportMap({ + displayComponent: true, + layoutTag: NineLayoutTag.BOTTOM_LEFT, + }), PolarPluginAddressSearch( merge( {}, diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue new file mode 100644 index 000000000..58b387495 --- /dev/null +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/packages/clients/dish/src/plugins/DishExportMap/index.ts b/packages/clients/dish/src/plugins/DishExportMap/index.ts new file mode 100644 index 000000000..28192ab9f --- /dev/null +++ b/packages/clients/dish/src/plugins/DishExportMap/index.ts @@ -0,0 +1,12 @@ +import Vue from 'vue' +import { PluginOptions } from '@polar/lib-custom-types' +// import language from './language' +import DishExportMap from './DishExportMap.vue' + +export default (options: PluginOptions) => (instance: Vue) => + instance.$store.dispatch('addComponent', { + name: 'dishExportMap', + plugin: DishExportMap, + // language, + options, + }) From e53e5a8e679b11f44122fb6b78cc53b8fa1ef2af Mon Sep 17 00:00:00 2001 From: bruehlca Date: Wed, 30 Oct 2024 14:17:25 +0100 Subject: [PATCH 031/207] cleanup code --- .../clients/dish/src/plugins/internGfi/InternContent.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/clients/dish/src/plugins/internGfi/InternContent.vue b/packages/clients/dish/src/plugins/internGfi/InternContent.vue index fbff3c0b2..b2304112c 100644 --- a/packages/clients/dish/src/plugins/internGfi/InternContent.vue +++ b/packages/clients/dish/src/plugins/internGfi/InternContent.vue @@ -113,13 +113,7 @@ export default Vue.extend({ .map((field) => object[field]) .filter((value) => value) .join(' ') - const addressData = [ - 'Strasse', - this.infoFieldsAdress - .map((field) => object[field]) - .filter((value) => value) - .join(' '), - ] + const addressData = ['Strasse', address] if (address && address.trim() !== '') tableData.push(addressData) const flurStueck = this.infoFielsFlurstueck From 940668373002e0f9cc7108366099b24088e6ec60 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Wed, 30 Oct 2024 15:50:22 +0100 Subject: [PATCH 032/207] add input dialog for map title --- .../plugins/DishExportMap/DishExportMap.vue | 83 +++++++++++++------ 1 file changed, 58 insertions(+), 25 deletions(-) diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue index 58b387495..10055ca9d 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -10,10 +10,35 @@ color="primary" fab aria-label="Kartendruck" - @click="createURLforPrint()" + @click=" + showRectangleAndDialog() + setTitle() + " > fa-regular fa-file-pdf + + + + + + + + Abbrechen + Karte drucken + + + @@ -31,6 +56,8 @@ export default Vue.extend({ showOverlay: false, rectangleWidth: 893, rectangleHeight: 473, + dialog: false, + title: '', }), computed: { ...mapGetters(['map', 'configuration']), @@ -42,6 +69,9 @@ export default Vue.extend({ ]), ...mapGetters('plugin/gfi', ['currentProperties']), ...mapGetters('plugin/scale', ['scaleValue', 'scaleWithUnit']), + hasObjectProperties(): boolean { + return this.currentProperties && this.currentProperties.objektid + }, }, mounted() { const element = this.$refs.rectangle as HTMLElement @@ -56,15 +86,29 @@ export default Vue.extend({ } }, methods: { - showRectangle() { + showRectangleAndDialog() { if ( !this.transformedCoordinate || this.transformedCoordinate.length === 0 ) { return } - if (this.overlay && this.transformedCoordinate) { + if (this.overlay && this.hasObjectProperties) { this.showOverlay = true + this.dialog = true + } + }, + setTitle() { + if (this.overlay && this.hasObjectProperties) { + const objectId = this.currentProperties.objektid + const address = [ + this.currentProperties.strasse, + this.currentProperties.hausnummer, + this.currentProperties.hausnrzusatz, + ] + .join(' ') + .trim() + this.title = `${this.currentProperties.gemeinde}, ${address}, ${this.currentProperties.objektansprache}, ONR ${objectId}` this.overlay.setPosition(this.transformedCoordinate) } }, @@ -96,35 +140,24 @@ export default Vue.extend({ } } }, - // eslint-disable-next-line max-lines-per-function + openTextInputDialog() { + this.dialog = true + }, + submitText() { + this.dialog = false + this.showOverlay = false + this.createURLforPrint() + }, createURLforPrint() { - this.showRectangle() const bbox = this.getRectangleCoordinates() - let objInfos = '' - let objectId = '' - if (this.currentProperties.objektid) { - objectId = this.currentProperties.objektid - const address = [ - this.currentProperties.strasse, - this.currentProperties.hausnummer, - this.currentProperties.hausnrzusatz, - ] - .join(' ') - .trim() - objInfos = `${this.currentProperties.gemeinde}, ${address}, ${this.currentProperties.objektansprache}, ONR ${objectId}` - } else { - console.warn('currentProperties is undefined') - // TODO Toast Information - return - } const baseUrl = 'http://10.61.63.54/Content/Objekt/Kartenausgabe.aspx' const printParams = { NewTab: true, - objektueberschrift: objInfos, + objektueberschrift: this.title, masssstab: this.scaleValue, printApproach: 'scale', printRequester: 'client', - id: objectId, + id: this.currentProperties.objektid, xPrint: 18, yPrint: 20, scale: this.scaleValue, @@ -161,7 +194,7 @@ export default Vue.extend({ .join('&') const encodedUrl = `${baseUrl}?${queryString}` - console.warn(encodedUrl) + window.open(encodedUrl, '_blank') }, }, }) From 6b5897a58c90505f58e4dfa1b3e04133ba2c1bb4 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 08:43:40 +0100 Subject: [PATCH 033/207] add tooltip for export --- .../plugins/DishExportMap/DishExportMap.vue | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue index 10055ca9d..6e59b06e9 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -4,19 +4,26 @@ ref="rectangle" :class="showOverlay ? 'rectangle_active' : 'rectangle_inactive'" > - - fa-regular fa-file-pdf - + + + Kartendruck PDF + From 027256bc72cd1e53f80d3d6b22d2bcd42b4c5ef4 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 09:28:53 +0100 Subject: [PATCH 034/207] add user info --- .../src/plugins/DishExportMap/DishExportMap.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue index 6e59b06e9..291481937 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -93,14 +93,23 @@ export default Vue.extend({ } }, methods: { + showUserInfo() { + this.$store.dispatch('plugin/toast/addToast', { + type: 'info', + text: 'Bitte wählen Sie ein Denkmalobjekt über Klicken in der Karte aus.', + timeout: 10000, + }) + }, showRectangleAndDialog() { if ( !this.transformedCoordinate || - this.transformedCoordinate.length === 0 + this.transformedCoordinate.length === 0 || + !this.hasObjectProperties ) { + this.showUserInfo() return } - if (this.overlay && this.hasObjectProperties) { + if (this.overlay) { this.showOverlay = true this.dialog = true } From f0659f5bb234b49eb982d7662e23163f131ea322 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 09:58:26 +0100 Subject: [PATCH 035/207] add translations --- .../dish/src/plugins/DishExportMap/DishExportMap.vue | 12 ++++++------ .../clients/dish/src/plugins/DishExportMap/index.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue index 291481937..ceed3d9f8 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -22,7 +22,7 @@ fa-regular fa-file-pdf - Kartendruck PDF + {{ $t('common:plugins.dish.exportPDF.tooltip') }} @@ -38,11 +38,11 @@ dialog = false showOverlay = false " - >Abbrechen - Karte drucken{{ $t('common:plugins.dish.exportPDF.buttonCancel') }} + {{ + $t('common:plugins.dish.exportPDF.buttonPrint') + }} @@ -96,7 +96,7 @@ export default Vue.extend({ showUserInfo() { this.$store.dispatch('plugin/toast/addToast', { type: 'info', - text: 'Bitte wählen Sie ein Denkmalobjekt über Klicken in der Karte aus.', + text: 'common:plugins.dish.exportPDF.userInfo', timeout: 10000, }) }, diff --git a/packages/clients/dish/src/plugins/DishExportMap/index.ts b/packages/clients/dish/src/plugins/DishExportMap/index.ts index 28192ab9f..b2f2e3bc7 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/index.ts +++ b/packages/clients/dish/src/plugins/DishExportMap/index.ts @@ -1,12 +1,12 @@ import Vue from 'vue' import { PluginOptions } from '@polar/lib-custom-types' -// import language from './language' +import language from './language' import DishExportMap from './DishExportMap.vue' export default (options: PluginOptions) => (instance: Vue) => instance.$store.dispatch('addComponent', { name: 'dishExportMap', plugin: DishExportMap, - // language, + language, options, }) From 5a92583cd61afd57bbbd8db831b065be80b5294e Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 10:05:11 +0100 Subject: [PATCH 036/207] remove unneeded style assignment --- .../clients/dish/src/plugins/DishExportMap/DishExportMap.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue index ceed3d9f8..100c294da 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -32,7 +32,6 @@ {{ $t('common:plugins.dish.exportPDF.buttonCancel') }} - {{ + {{ $t('common:plugins.dish.exportPDF.buttonPrint') }} From d8c606f6fe8272b8df32668938f393c32966d25c Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 10:37:21 +0100 Subject: [PATCH 037/207] add language file --- .../src/plugins/DishExportMap/language.ts | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 packages/clients/dish/src/plugins/DishExportMap/language.ts diff --git a/packages/clients/dish/src/plugins/DishExportMap/language.ts b/packages/clients/dish/src/plugins/DishExportMap/language.ts new file mode 100644 index 000000000..c20e78d86 --- /dev/null +++ b/packages/clients/dish/src/plugins/DishExportMap/language.ts @@ -0,0 +1,37 @@ +import { LanguageOption } from '@polar/lib-custom-types' + +const lang: LanguageOption[] = [ + { + type: 'de', + resources: { + plugins: { + dish: { + exportPDF: { + userInfo: + 'Bitte wählen Sie ein Denkmalobjekt über Klicken in der Karte aus.', + buttonPrint: 'Karte drucken', + buttonCancel: 'Abbrechen', + tooltip: 'Kartendruck PDF', + }, + }, + }, + }, + }, + { + type: 'en', + resources: { + plugins: { + dish: { + exportPDF: { + userInfo: 'Please select a monument object by clicking on the map.', + buttonPrint: 'Print map', + buttonCancel: 'cancel', + tooltip: 'Map Export PDF', + }, + }, + }, + }, + }, +] + +export default lang From 379876e253583d42d722b3c378c8dd17b4d56455 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 10:43:20 +0100 Subject: [PATCH 038/207] change attributions for intern map --- packages/clients/dish/src/addPlugins.ts | 7 ++----- .../clients/dish/src/internMapConfiguration.ts | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 3258767f8..192db04c0 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -132,10 +132,7 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { ), PolarPluginAttributions({ displayComponent: true, - layoutTag: - mode === MODE.EXTERN - ? NineLayoutTag.BOTTOM_RIGHT - : NineLayoutTag.BOTTOM_MIDDLE, + layoutTag: NineLayoutTag.BOTTOM_RIGHT, listenToChanges: [ 'plugin/zoom/zoomLevel', 'plugin/layerChooser/activeBackgroundId', @@ -166,7 +163,7 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => { merge( {}, { - displayComponent: mode === MODE.EXTERN, + displayComponent: true, layoutTag: NineLayoutTag.BOTTOM_MIDDLE, } ) diff --git a/packages/clients/dish/src/internMapConfiguration.ts b/packages/clients/dish/src/internMapConfiguration.ts index 4100a6567..efbd5bf5d 100644 --- a/packages/clients/dish/src/internMapConfiguration.ts +++ b/packages/clients/dish/src/internMapConfiguration.ts @@ -108,12 +108,23 @@ export const internMapConfiguration = { }, ], attributions: { - renderType: 'footer', + initiallyOpen: true, layerAttributions: [ { id: hintergrundkarte, - title: 'Hintergrundkarten ©basemap.de/BKG;Geobasis-DE/LVermGeo SH', + title: + 'Karte Basemap.de Web Raster Grau: © basemap.de / BKG ', }, + { + id: alkisWms, + title: + 'Karte Flurstücke gemäss ALKIS-Objektartenkatalog © Landesamt für Vermessung und Geoinformation', + }, + { + id: denkmaelerWmsIntern, + title: + 'Karte Kulturdenkmale (Denkmalliste): © Landesamt für Denkmalpflege ', + } ], }, draw: { @@ -260,3 +271,4 @@ export const internMapConfiguration = { }, }, } + From 28b5d364521f571e856143ef387119c61c15efc3 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 10:46:01 +0100 Subject: [PATCH 039/207] fix linting error --- packages/clients/dish/src/addPlugins.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/clients/dish/src/addPlugins.ts b/packages/clients/dish/src/addPlugins.ts index 192db04c0..7a9ccd6d3 100644 --- a/packages/clients/dish/src/addPlugins.ts +++ b/packages/clients/dish/src/addPlugins.ts @@ -23,7 +23,7 @@ import DishModal from './plugins/Modal' import DishHeader from './plugins/Header' import DishGfiContent from './plugins/Gfi' import { MODE } from './enums' -import DishGfiIntern from './plugins/InternGfi' +import DishGfiIntern from './plugins/internGfi' import DishExportMap from './plugins/DishExportMap' const defaultOptions = { From 8e5f784ce8c5837e39238a15b28fc76d12d4f9c0 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 13:19:54 +0100 Subject: [PATCH 040/207] add Label Layers and new service 'Verlust' --- .../dish/src/internMapConfiguration.ts | 47 ++++++++++++++++--- packages/clients/dish/src/services.ts | 17 ++++++- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/packages/clients/dish/src/internMapConfiguration.ts b/packages/clients/dish/src/internMapConfiguration.ts index efbd5bf5d..ca334260b 100644 --- a/packages/clients/dish/src/internMapConfiguration.ts +++ b/packages/clients/dish/src/internMapConfiguration.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-lines */ /* eslint-disable prettier/prettier */ // number-only keys needed in layers object /* eslint-disable @typescript-eslint/naming-convention */ @@ -9,6 +10,7 @@ import { denkmaelerWmsIntern, denkmaelerWFSIntern, kontrollbedarfIntern, + verlustIntern, alkisWfs, alkisWms, verwaltung, @@ -56,16 +58,24 @@ export const internMapConfiguration = { name: 'Kulturdenkmale (Denkmalliste)', options: { layers: { - order: '6,24,25,4,3,2,1,0', + order: '6,15,24,26,25,27,4,13,3,12,2,11,1,10,0,9', title: { - '6': 'Denkmalbereich', + '6': 'Denkmalbereichsverordnung', + '15': 'Denkmalbereichsverordnung Label', '24': 'Mehrheit von baulichen Anlagen', + '26': 'Mehrheit von baulichen Anlagen Label', '25': 'Sachgesamtheit', - '4': 'Baudenkmal', - '3': 'Gründenkmal', + '27': 'Sachgesamtheit Label', + '4': 'Baudenkmal (Einzeldenkmale)', + '13': 'Baudenkmal (Einzeldenkmale) Label', + '3': 'Gründenkmal (Elemente)', + '12': 'Gründenkmal (Elemente) Label', '2': 'Gewässer', + '11': 'Gewässer Label', '1': 'Baudenkmal (Fläche)', + '10': 'Baudenkmal (Fläche) Label', '0': 'Gründenkmal (Fläche)', + '9': 'Gründenkmal (Fläche) Label', }, legend: true, }, @@ -78,20 +88,45 @@ export const internMapConfiguration = { name: 'Objekte mit Kontrollbedarf', options: { layers: { - order: '28,29,23,22,21,20,19', + order: '28,35,29,36,23,34,22,33,21,32,20,31,19,30', title: { '28': 'Mehrheit von bauliche Anlagen mit Kontrollbedarf', + '35': 'Mehrheit von bauliche Anlagen mit Kontrollbedarf Label', '29': 'Sachgesamtheit mit Kontrollbedarf', - '23': 'Baudenkmale (Einzel) mit Kontrollbedarf', + '36': 'Sachgesamtheit mit Kontrollbedarf Label', + '23': 'Baudenkmale (Einzeldenkmale) mit Kontrollbedarf', + '34': 'Baudenkmale (Einzeldenkmale) mit Kontrollbedarf Label', '22': 'Gartendenkmale (Elemente) mit Kontrollbedarf', + '33': 'Gartendenkmale (Elemente) mit Kontrollbedarf Label', '21': 'Gewässer mit Kontrollbedarf', + '32': 'Gewässer mit Kontrollbedarf Label', '20': 'Baudenkmale (Flächen) mit Kontrollbedarf', + '31': 'Baudenkmale (Flächen) mit Kontrollbedarf Label', '19': 'Gartendenkmale (Flächen) mit Kontrollbedarf', + '30': 'Gartendenkmale (Flächen) mit Kontrollbedarf Label', }, legend: true, }, }, }, + { + id: verlustIntern, + visibility: false, + type: 'mask', + name: 'Verlust', + options: { + layers: { + order: '7,16,8,17', + title: { + '7': 'Denkmalverlust', + '16': 'Denkmalverlust Label', + '8': 'Denkmalwertverlust', + '17': 'Denkmalwertverlust Label', + }, + legend: true, + } + } + }, { id: verwaltung, visibility: false, diff --git a/packages/clients/dish/src/services.ts b/packages/clients/dish/src/services.ts index 82c905940..8fd032f9c 100644 --- a/packages/clients/dish/src/services.ts +++ b/packages/clients/dish/src/services.ts @@ -6,6 +6,7 @@ export const denkmaelerWMS = 'denkmaelerWMS' export const denkmaelerWmsIntern = 'denkmaelerWmsIntern' export const denkmaelerWFSIntern = 'denkmaelerWFSIntern' export const kontrollbedarfIntern = 'kontrollbedarfIntern' +export const verlustIntern = 'verlustIntern' export const alkisWfs = 'alkisWfS' export const alkisWms = 'alkisWms' export const dop20col = 'dop20col' @@ -76,7 +77,7 @@ const denkmaelerWMsServiceIntern = { name: 'Denkmäler (WMS)', url: `${internServicesBaseUrl}/wms`, typ: 'WMS', - layers: '0,1,2,3,4,6,24,25', + layers: '6,15,24,26,25,27,4,13,3,12,2,11,1,10,0,9', legendURL: 'ignore', format: 'image/png', version: '1.3.0', @@ -87,7 +88,18 @@ const kontrollbedarfServiceIntern = { name: 'Objekte mit Kontrollbedarf (WMS)', url: `${internServicesBaseUrl}/wms`, typ: 'WMS', - layers: '28,29,23,22,21,20,19', + layers: '28,35,29,36,23,34,22,33,21,32,20,31,19,30', + legendURL: 'ignore', + format: 'image/png', + version: '1.3.0', + transparent: true, +} +const verlustServiceIntern = { + id: verlustIntern, + name: 'Verlust', + url: `${internServicesBaseUrl}/wms`, + typ: 'WMS', + layers: '7,8,16,17', legendURL: 'ignore', format: 'image/png', version: '1.3.0', @@ -204,6 +216,7 @@ const servicesIntern = [ denkmaelerWfsServiceIntern, denkmaelerWMsServiceIntern, kontrollbedarfServiceIntern, + verlustServiceIntern, verwaltungsGrenzenService, ] From effa13edbbbd6fd27aa107837d5bc096f37fb2b5 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 13:20:09 +0100 Subject: [PATCH 041/207] delete unneeded getters --- .../clients/dish/src/plugins/DishExportMap/DishExportMap.vue | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue index 100c294da..63b40a962 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -68,11 +68,6 @@ export default Vue.extend({ computed: { ...mapGetters(['map', 'configuration']), ...mapGetters('plugin/pins', ['transformedCoordinate']), - ...mapGetters('plugin/layerChooser', [ - 'activeLayerIds', - 'activeBackgroundId', - 'activeMaskIds', - ]), ...mapGetters('plugin/gfi', ['currentProperties']), ...mapGetters('plugin/scale', ['scaleValue', 'scaleWithUnit']), hasObjectProperties(): boolean { From 261805b42c4a7840befbff07a479760a1ee84a34 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 16:33:38 +0100 Subject: [PATCH 042/207] add new intern services, split services file --- .../dish/src/internMapConfiguration.ts | 45 ++++-- packages/clients/dish/src/polar-client.ts | 5 +- packages/clients/dish/src/services.ts | 136 +++++------------- packages/clients/dish/src/servicesIntern.ts | 115 +++++++++++++++ 4 files changed, 187 insertions(+), 114 deletions(-) create mode 100644 packages/clients/dish/src/servicesIntern.ts diff --git a/packages/clients/dish/src/internMapConfiguration.ts b/packages/clients/dish/src/internMapConfiguration.ts index ca334260b..e80d18a6c 100644 --- a/packages/clients/dish/src/internMapConfiguration.ts +++ b/packages/clients/dish/src/internMapConfiguration.ts @@ -5,16 +5,21 @@ import { dishCloudBaseUrl, + basemapGrau, + alkisWfs, + alkisWms, +} from './services' +import { internServicesBaseUrl, - hintergrundkarte, denkmaelerWmsIntern, - denkmaelerWFSIntern, + denkmaelerWfsIntern, kontrollbedarfIntern, verlustIntern, - alkisWfs, - alkisWms, verwaltung, -} from './services' + bddEinIntern, + bddColIntern, + aerialPhoto, + } from './servicesIntern' import { shBlue } from './colors' export const internMapConfiguration = { @@ -24,11 +29,29 @@ export const internMapConfiguration = { }, layers: [ { - id: hintergrundkarte, + id: basemapGrau, visibility: true, type: 'background', name: 'Basemap Graustufen', }, + { + id: bddEinIntern, + visibility: false, + type: 'background', + name: 'Grundkarte Graustufen', + }, + { + id: bddColIntern, + visibility: false, + type: 'background', + name: 'Grundkarte Farbe', + }, + { + id: aerialPhoto, + visibility: false, + type: 'background', + name: 'Luftbilder Farbe', + }, { id: alkisWfs, visibility: false, @@ -45,7 +68,7 @@ export const internMapConfiguration = { minZoom: 10, }, { - id: denkmaelerWFSIntern, + id: denkmaelerWfsIntern, visibility: false, hideInMenu: true, type: 'mask', @@ -143,10 +166,10 @@ export const internMapConfiguration = { }, ], attributions: { - initiallyOpen: true, + initiallyOpen: false, layerAttributions: [ { - id: hintergrundkarte, + id: basemapGrau, title: 'Karte Basemap.de Web Raster Grau: © basemap.de / BKG ', }, @@ -196,7 +219,7 @@ export const internMapConfiguration = { type: 'wfs', url: `${internServicesBaseUrl}/wfs`, queryParameters: { - id: denkmaelerWFSIntern, + id: denkmaelerWfsIntern, srsName: 'EPSG:25832', typeName: 'TBLGIS_ORA', featurePrefix: 'app', @@ -271,7 +294,7 @@ export const internMapConfiguration = { gfi: { mode: 'intersects', layers: { - [denkmaelerWFSIntern]: { + [denkmaelerWfsIntern]: { geometry: true, window: true, maxFeatures: 10, diff --git a/packages/clients/dish/src/polar-client.ts b/packages/clients/dish/src/polar-client.ts index 2c5d8184c..e6e7a94de 100644 --- a/packages/clients/dish/src/polar-client.ts +++ b/packages/clients/dish/src/polar-client.ts @@ -1,9 +1,10 @@ import client from '@polar/core' import merge from 'lodash.merge' import packageInfo from '../package.json' +import { denkmaelerWfServiceIntern } from './servicesIntern' import { navigateToDenkmal } from './utils/navigateToDenkmal' import { addPlugins } from './addPlugins' -import { denkmaelerWfsServiceIntern, services } from './services' +import { services } from './services' import { getMapConfiguration } from './mapConfig' import { CONTENT_ENUM } from './plugins/Modal/store' import './styles.css' @@ -36,7 +37,7 @@ export default { const objektId = parameters.get('ObjektID') if (typeof objektId === 'string' && mode === 'INTERN') { - zoomToFeatureById(instance, objektId, denkmaelerWfsServiceIntern.url, { + zoomToFeatureById(instance, objektId, denkmaelerWfServiceIntern.url, { fieldName: 'objektid', featurePrefix: 'app', typeName: 'TBLGIS_ORA', diff --git a/packages/clients/dish/src/services.ts b/packages/clients/dish/src/services.ts index 8fd032f9c..818dbcd40 100644 --- a/packages/clients/dish/src/services.ts +++ b/packages/clients/dish/src/services.ts @@ -1,17 +1,14 @@ import { MODE } from './enums' -export const hintergrundkarte = 'hintergrundkarte' +import { servicesIntern } from './servicesIntern' + +export const basemapGrau = 'basemapGrau' export const denkmaelerWfsExtern = 'denkmaelerWfsExtern' export const denkmaelerWMS = 'denkmaelerWMS' -export const denkmaelerWmsIntern = 'denkmaelerWmsIntern' -export const denkmaelerWFSIntern = 'denkmaelerWFSIntern' -export const kontrollbedarfIntern = 'kontrollbedarfIntern' -export const verlustIntern = 'verlustIntern' export const alkisWfs = 'alkisWfS' export const alkisWms = 'alkisWms' export const dop20col = 'dop20col' export const dop20sw = 'dop20sw' -export const verwaltung = 'verwaltung' export const bddCol = 'bddCol' export const bddEin = 'bddEin' @@ -36,12 +33,10 @@ export const dishAutocompleteUrl = `${dishBaseUrl}/dish_suche/ergebnisse/json/al export const dishCloudBaseUrl = 'https://dishreserveproxy.dsecurecloud.de' -// TODO -export const internServicesBaseUrl = isDevMode - ? 'http://10.61.63.54:8081/dish-deegree-3.5.0/services' - : `#{HIER MUSS NOCH DER RICHTIGE PLATZHALTER REIN}` +export const exportMapAsPdfUrl = + 'http://10.61.63.54/Content/Objekt/Kartenausgabe.aspx' -export const denkmaelerWmsService = { +export const denkmaelerWmService = { id: denkmaelerWMS, name: 'Denkmal WMS', url: `${dishDeegreeBaseUrl}/wms_shp`, @@ -53,7 +48,7 @@ export const denkmaelerWmsService = { transparent: true, } -export const denkmaelerWfsServiceExtern = { +export const denkmaelerWfServiceExtern = { id: denkmaelerWfsExtern, name: 'Denkmäler (WFS)', url: `${dishDeegreeBaseUrl}/wfs_shp`, @@ -63,71 +58,6 @@ export const denkmaelerWfsServiceExtern = { featureType: 'app:dish_shp', } -export const denkmaelerWfsServiceIntern = { - id: denkmaelerWFSIntern, - name: 'Denkmäler (WFS)', - url: `${internServicesBaseUrl}/wfs`, - typ: 'WFS', - version: '2.0.0', - transparent: true, - featureType: 'app:TBLGIS_ORA', -} -const denkmaelerWMsServiceIntern = { - id: denkmaelerWmsIntern, - name: 'Denkmäler (WMS)', - url: `${internServicesBaseUrl}/wms`, - typ: 'WMS', - layers: '6,15,24,26,25,27,4,13,3,12,2,11,1,10,0,9', - legendURL: 'ignore', - format: 'image/png', - version: '1.3.0', - transparent: true, -} -const kontrollbedarfServiceIntern = { - id: kontrollbedarfIntern, - name: 'Objekte mit Kontrollbedarf (WMS)', - url: `${internServicesBaseUrl}/wms`, - typ: 'WMS', - layers: '28,35,29,36,23,34,22,33,21,32,20,31,19,30', - legendURL: 'ignore', - format: 'image/png', - version: '1.3.0', - transparent: true, -} -const verlustServiceIntern = { - id: verlustIntern, - name: 'Verlust', - url: `${internServicesBaseUrl}/wms`, - typ: 'WMS', - layers: '7,8,16,17', - legendURL: 'ignore', - format: 'image/png', - version: '1.3.0', - transparent: true, -} -const AlkisWfService = { - id: alkisWfs, - name: 'ALKIS', - url: `${dishCloudBaseUrl}/dish/bkg/ALKIS_WFS`, - typ: 'WFS', - version: '2.0.0', - transparent: true, - featureType: 'ave:Flurstueck', -} - -const AlkisWmService = { - id: alkisWms, - name: 'ALKIS WMS', - url: `${dishCloudBaseUrl}/bkg/ALKIS_FLST`, - typ: 'WMS', - layers: 'adv_alkis_flurstuecke', - legendURL: 'ignore', - format: 'image/png', - version: '1.3.0', - transparent: true, - STYLES: 'basemapde', -} - const dop20ColService = { id: dop20col, name: 'DOP 20 (Farbe)', @@ -176,20 +106,41 @@ const bddEinService = { transparent: true, } -const verwaltungsGrenzenService = { - id: verwaltung, - name: 'Verwaltungsgrenzen', - url: `https://intranet.gdi-sh.lr.landsh.de/WMS_SH_VwG`, +const servicesExtern = [ + denkmaelerWmService, + denkmaelerWfServiceExtern, + dop20ColService, + dop20swService, + bddColService, + bddEinService, +] + +const AlkisWfService = { + id: alkisWfs, + name: 'ALKIS', + url: `${dishCloudBaseUrl}/dish/bkg/ALKIS_WFS`, + typ: 'WFS', + version: '2.0.0', + transparent: true, + featureType: 'ave:Flurstueck', +} + +const AlkisWmService = { + id: alkisWms, + name: 'ALKIS WMS', + url: `${dishCloudBaseUrl}/bkg/ALKIS_FLST`, typ: 'WMS', - layers: 'Landesgrenzen,Kreisgrenzen,Aemtergrenzen,Gemeindegrenzen', + layers: 'adv_alkis_flurstuecke', + legendURL: 'ignore', format: 'image/png', - version: '1.0.0', + version: '1.3.0', transparent: true, + STYLES: 'basemapde', } const servicesCommon = [ { - id: hintergrundkarte, + id: basemapGrau, name: 'WMS DE BASEMAP.DE WEB RASTER', url: 'https://sgx.geodatenzentrum.de/wms_basemapde', typ: 'WMS', @@ -203,23 +154,6 @@ const servicesCommon = [ AlkisWmService, ] -const servicesExtern = [ - denkmaelerWmsService, - denkmaelerWfsServiceExtern, - dop20ColService, - dop20swService, - bddColService, - bddEinService, -] - -const servicesIntern = [ - denkmaelerWfsServiceIntern, - denkmaelerWMsServiceIntern, - kontrollbedarfServiceIntern, - verlustServiceIntern, - verwaltungsGrenzenService, -] - export const services = (mode: keyof typeof MODE) => [ ...servicesCommon, ...(mode === MODE.EXTERN ? servicesExtern : servicesIntern), diff --git a/packages/clients/dish/src/servicesIntern.ts b/packages/clients/dish/src/servicesIntern.ts new file mode 100644 index 000000000..ae712821f --- /dev/null +++ b/packages/clients/dish/src/servicesIntern.ts @@ -0,0 +1,115 @@ +import { isDevMode } from './services' + +export const denkmaelerWmsIntern = 'denkmaelerWmsIntern' +export const denkmaelerWfsIntern = 'denkmaelerWfsIntern' +export const kontrollbedarfIntern = 'kontrollbedarfIntern' +export const verlustIntern = 'verlustIntern' +export const verwaltung = 'verwaltung' +export const bddEinIntern = 'bddEinIntern' +export const bddColIntern = 'bddColIntern' +export const aerialPhoto = 'aerialPhoto' + +export const intranetUrl = 'https://intranet.gdi-sh.lr.landsh.de' + +// TODO +export const internServicesBaseUrl = isDevMode + ? 'http://10.61.63.54:8081/dish-deegree-3.5.0/services' + : `#{HIER MUSS NOCH DER RICHTIGE PLATZHALTER REIN}` + +export const denkmaelerWfServiceIntern = { + id: denkmaelerWfsIntern, + name: 'Denkmäler (WFS)', + url: `${internServicesBaseUrl}/wfs`, + typ: 'WFS', + version: '2.0.0', + transparent: true, + featureType: 'app:TBLGIS_ORA', +} +const denkmaelerWmServiceIntern = { + id: denkmaelerWmsIntern, + name: 'Denkmäler (WMS)', + url: `${internServicesBaseUrl}/wms`, + typ: 'WMS', + layers: '6,15,24,26,25,27,4,13,3,12,2,11,1,10,0,9', + legendURL: 'ignore', + format: 'image/png', + version: '1.3.0', + transparent: true, +} +const kontrollbedarfServiceIntern = { + id: kontrollbedarfIntern, + name: 'Objekte mit Kontrollbedarf (WMS)', + url: `${internServicesBaseUrl}/wms`, + typ: 'WMS', + layers: '28,35,29,36,23,34,22,33,21,32,20,31,19,30', + legendURL: 'ignore', + format: 'image/png', + version: '1.3.0', + transparent: true, +} +const verlustServiceIntern = { + id: verlustIntern, + name: 'Verlust', + url: `${internServicesBaseUrl}/wms`, + typ: 'WMS', + layers: '7,8,16,17', + legendURL: 'ignore', + format: 'image/png', + version: '1.3.0', + transparent: true, +} + +const verwaltungsGrenzenService = { + id: verwaltung, + name: 'Verwaltungsgrenzen', + url: `${intranetUrl}/WMS_SH_VwG`, + typ: 'WMS', + layers: 'Landesgrenzen,Kreisgrenzen,Aemtergrenzen,Gemeindegrenzen', + format: 'image/png', + version: '1.1.1', + transparent: true, +} + +const bddEinInternService = { + id: bddEinIntern, + name: 'Grundkarte Graustufen', + url: `${intranetUrl}/WMS_SH_BDDein_v2`, + typ: 'WMS', + layers: 'UEK1500,UEK1000,UEK250,DTK100ein,DTK50ein,DTK25ein,DTK5ein', + format: 'image/png', + version: '1.1.1', + transparent: true, +} + +const bddColInternService = { + id: bddColIntern, + name: 'Grundkarte Farbe', + url: `${intranetUrl}/WMS_SH_BDDcol_v2`, + typ: 'WMS', + layers: 'UEK1500,UEK1000,UEK250,DTK100col,DTK50col,DTK25col,DTK5col', + format: 'image/png', + version: '1.1.1', + transparent: true, +} + +const aerialPhotoService = { + id: aerialPhoto, + name: 'Luftbilder Farbe', + url: `${intranetUrl}/WMS_SH_DOP20col`, + typ: 'WMS', + layers: 'SH_DOP20_4,SH_DOP20_3,SH_DOP20_2,SH_DOP20_1', + format: 'image/png', + version: '1.1.1', + transparent: true, +} + +export const servicesIntern = [ + denkmaelerWfServiceIntern, + denkmaelerWmServiceIntern, + kontrollbedarfServiceIntern, + verlustServiceIntern, + verwaltungsGrenzenService, + bddEinInternService, + bddColInternService, + aerialPhotoService, +] From 4ddbd0fd0c55e1d643b82eafa296382667a954dd Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 16:34:09 +0100 Subject: [PATCH 043/207] rename services --- packages/clients/dish/src/externMapConfiguration.ts | 10 +++++----- packages/clients/dish/src/utils/extendGfi.ts | 6 +++--- packages/clients/dish/src/utils/navigateToDenkmal.ts | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/clients/dish/src/externMapConfiguration.ts b/packages/clients/dish/src/externMapConfiguration.ts index 81397fd37..90b2415c9 100644 --- a/packages/clients/dish/src/externMapConfiguration.ts +++ b/packages/clients/dish/src/externMapConfiguration.ts @@ -3,13 +3,13 @@ import { shBlue } from './colors' import { - denkmaelerWfsExtern, - denkmaelerWMS, - hintergrundkarte, + basemapGrau, dishBaseUrl, dishCloudBaseUrl, alkisWfs, alkisWms, + denkmaelerWfsExtern, + denkmaelerWMS, dop20col, bddCol, bddEin, @@ -23,7 +23,7 @@ export const exportMapConfiguration = { }, layers: [ { - id: hintergrundkarte, + id: basemapGrau, visibility: true, type: 'background', name: 'Basemap Graustufen', @@ -88,7 +88,7 @@ export const exportMapConfiguration = { initiallyOpen: true, layerAttributions: [ { - id: hintergrundkarte, + id: basemapGrau, title: 'Karte Basemap.de Web Raster Grau: © basemap.de / BKG ', }, diff --git a/packages/clients/dish/src/utils/extendGfi.ts b/packages/clients/dish/src/utils/extendGfi.ts index 93b53a1de..6e7c3c99c 100644 --- a/packages/clients/dish/src/utils/extendGfi.ts +++ b/packages/clients/dish/src/utils/extendGfi.ts @@ -8,12 +8,12 @@ import { DishFeatureProperties, } from '../types' import { - denkmaelerWmsService, - denkmaelerWfsExtern, dishBaseUrl, + denkmaelerWmService, + denkmaelerWfsExtern, } from '../services' -const layerPool = denkmaelerWmsService.layers.split(',') +const layerPool = denkmaelerWmService.layers.split(',') const sachgesamtheitPool = ['9', '10'] let first = true diff --git a/packages/clients/dish/src/utils/navigateToDenkmal.ts b/packages/clients/dish/src/utils/navigateToDenkmal.ts index bc76001a0..9a32e9821 100644 --- a/packages/clients/dish/src/utils/navigateToDenkmal.ts +++ b/packages/clients/dish/src/utils/navigateToDenkmal.ts @@ -1,4 +1,4 @@ -import { denkmaelerWfsServiceExtern } from '../services' +import { denkmaelerWfServiceExtern } from '../services' import { getMapConfiguration } from '../mapConfig' import { zoomToFeatureById } from './zoomToFeatureById' @@ -17,7 +17,7 @@ export function navigateToDenkmal(instance, objektId: string) { 'Client is missing wfsConfig.queryParameters on DISH search method.' ) } - zoomToFeatureById(instance, objektId, denkmaelerWfsServiceExtern.url, { + zoomToFeatureById(instance, objektId, denkmaelerWfServiceExtern.url, { ...wfsConfig.queryParameters.wfsConfiguration, useRightHandWildcard: false, }) From 9b0b8873ed6e93d08df443439a749e40e10abd60 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 16:34:30 +0100 Subject: [PATCH 044/207] use variable for print base url --- .../clients/dish/src/plugins/DishExportMap/DishExportMap.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue index 63b40a962..76b0313d1 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -52,12 +52,12 @@ import Vue from 'vue' import { mapGetters } from 'vuex' import Overlay from 'ol/Overlay' +import { exportMapAsPdfUrl } from '../../services' export default Vue.extend({ name: 'DishExportMap', data: () => ({ - exportBaseUrl: - 'http://10.61.63.54/Content/Objekt/Kartenausgabe.aspx?NewTab=true&objektueberschrift=', + exportBaseUrl: `${exportMapAsPdfUrl}?NewTab=true&objektueberschrift=`, overlay: null as Overlay | null, showOverlay: false, rectangleWidth: 893, From b58d5779ae887f6b20fc16e5da49e3de5e0aee62 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Mon, 4 Nov 2024 16:43:36 +0100 Subject: [PATCH 045/207] change search label --- packages/clients/dish/src/externMapConfiguration.ts | 2 +- packages/clients/dish/src/internMapConfiguration.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/clients/dish/src/externMapConfiguration.ts b/packages/clients/dish/src/externMapConfiguration.ts index 90b2415c9..ead661ab3 100644 --- a/packages/clients/dish/src/externMapConfiguration.ts +++ b/packages/clients/dish/src/externMapConfiguration.ts @@ -194,7 +194,7 @@ export const exportMapConfiguration = { ], groupProperties: { groupDenkmalsuche: { - label: 'Denkmalsuche', + label: 'Suche Denkmal, Adresse, Flurstück', hint: 'common:dish.addressSearchHint', resultDisplayMode: 'categorized', limitResults: 3, diff --git a/packages/clients/dish/src/internMapConfiguration.ts b/packages/clients/dish/src/internMapConfiguration.ts index e80d18a6c..d445cfc0f 100644 --- a/packages/clients/dish/src/internMapConfiguration.ts +++ b/packages/clients/dish/src/internMapConfiguration.ts @@ -269,7 +269,7 @@ export const internMapConfiguration = { ], groupProperties: { groupDenkmalsuche: { - label: 'Denkmalsuche', + label: 'Suche Denkmal, Adresse, Flurstück', hint: 'common:dish.addressSearchHint', resultDisplayMode: 'categorized', limitResults: 3, From d57f7da6969288759895b501201dc3f2d44dc4c9 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Tue, 5 Nov 2024 08:05:10 +0100 Subject: [PATCH 046/207] adjust layer chooser title --- packages/plugins/LayerChooser/src/language.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/LayerChooser/src/language.ts b/packages/plugins/LayerChooser/src/language.ts index 92ce10d29..037ce83c9 100644 --- a/packages/plugins/LayerChooser/src/language.ts +++ b/packages/plugins/LayerChooser/src/language.ts @@ -6,7 +6,7 @@ const language: LanguageOption[] = [ resources: { plugins: { layerChooser: { - backgroundTitle: 'Hintergrundkarte', + backgroundTitle: 'Hintergrundkarten', maskTitle: 'Fachdaten', tooltipDisabledLayer: 'Auf der aktuellen Zoomstufe nicht verfügbar.', optionsHeader: 'Optionen für Layer "{{name}}"', From c800717518f76e7a9c0edbf6830cd7955ba6bae4 Mon Sep 17 00:00:00 2001 From: bruehlca Date: Tue, 5 Nov 2024 09:02:48 +0100 Subject: [PATCH 047/207] show export button depending on object infos --- .../src/plugins/DishExportMap/DishExportMap.vue | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue index 76b0313d1..b8e627ef1 100644 --- a/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue +++ b/packages/clients/dish/src/plugins/DishExportMap/DishExportMap.vue @@ -1,5 +1,5 @@