Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dish intern #208

Open
wants to merge 218 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 158 commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
c363fa8
add new enum MODE to dish client
jedi-of-the-sea Sep 26, 2024
85b1902
Merge remote-tracking branch 'origin' into dish_intern
jedi-of-the-sea Sep 26, 2024
1c1e51e
WIP
jedi-of-the-sea Sep 27, 2024
e5946b6
add configOverride to createMap
jedi-of-the-sea Sep 27, 2024
2b6647e
add internal plugins
FinnDarge Oct 2, 2024
105cd11
create mapconfigs for both modes
jedi-of-the-sea Oct 4, 2024
0dd5405
adjust attributions
jedi-of-the-sea Oct 4, 2024
c6cce20
readd missing layout tag
warm-coolguy Oct 7, 2024
f4484bc
add different gfi config for internal use
jedi-of-the-sea Oct 7, 2024
46cbe48
add gfi for internal use
jedi-of-the-sea Oct 8, 2024
34d7ebd
add english translation
jedi-of-the-sea Oct 8, 2024
1e500ca
add custom highlight style
jedi-of-the-sea Oct 8, 2024
7dfeb4f
add image to intern gfi
jedi-of-the-sea Oct 9, 2024
0a6b98c
add internal-specific wfs and adjusted gfi
jedi-of-the-sea Oct 9, 2024
9bc2089
clean up code
jedi-of-the-sea Oct 10, 2024
9343ce0
add new services
jedi-of-the-sea Oct 16, 2024
0553854
prevent empty or undefined gfi fields
jedi-of-the-sea Oct 18, 2024
5ebdbaf
configure bkg address search
jedi-of-the-sea Oct 21, 2024
29dc8ec
configure wfs search WOP
jedi-of-the-sea Oct 21, 2024
7f5c025
complete configuration for new search
jedi-of-the-sea Oct 21, 2024
3faacc9
add search plugin to intern mode
jedi-of-the-sea Oct 21, 2024
2e18881
add new services to extern and intern client
jedi-of-the-sea Oct 22, 2024
ad8005a
add API for internal DISH map
jedi-of-the-sea Oct 23, 2024
842dddc
adjust internal map configurations
jedi-of-the-sea Oct 23, 2024
26b1e65
adjust external map configurations
jedi-of-the-sea Oct 23, 2024
ff9cb7b
add denkmal search to internal map
jedi-of-the-sea Oct 24, 2024
3d9d695
improve gfi for intern map
jedi-of-the-sea Oct 25, 2024
5c32486
adjust searches
jedi-of-the-sea Oct 29, 2024
41ceeae
adjust gfi for ALKIS
jedi-of-the-sea Oct 29, 2024
4d2f095
adjust config for extern ALKIS search
jedi-of-the-sea Oct 29, 2024
98d7016
add new custom plugin DishExportMap
jedi-of-the-sea Oct 30, 2024
e53e5a8
cleanup code
jedi-of-the-sea Oct 30, 2024
9406683
add input dialog for map title
jedi-of-the-sea Oct 30, 2024
6b5897a
add tooltip for export
jedi-of-the-sea Nov 4, 2024
027256b
add user info
jedi-of-the-sea Nov 4, 2024
f0659f5
add translations
jedi-of-the-sea Nov 4, 2024
5a92583
remove unneeded style assignment
jedi-of-the-sea Nov 4, 2024
d8c606f
add language file
jedi-of-the-sea Nov 4, 2024
379876e
change attributions for intern map
jedi-of-the-sea Nov 4, 2024
28b5d36
fix linting error
jedi-of-the-sea Nov 4, 2024
8e5f784
add Label Layers and new service 'Verlust'
jedi-of-the-sea Nov 4, 2024
effa13e
delete unneeded getters
jedi-of-the-sea Nov 4, 2024
261805b
add new intern services, split services file
jedi-of-the-sea Nov 4, 2024
4ddbd0f
rename services
jedi-of-the-sea Nov 4, 2024
9b0b887
use variable for print base url
jedi-of-the-sea Nov 4, 2024
b58d577
change search label
jedi-of-the-sea Nov 4, 2024
d57f7da
adjust layer chooser title
jedi-of-the-sea Nov 5, 2024
c800717
show export button depending on object infos
jedi-of-the-sea Nov 5, 2024
2c707d1
shorten the ALKIS search result
jedi-of-the-sea Nov 5, 2024
79cdfee
update documentation
jedi-of-the-sea Nov 5, 2024
702a82a
change plugin order
jedi-of-the-sea Nov 5, 2024
dca5bed
Merge branch 'main' into dish_intern
jedi-of-the-sea Nov 5, 2024
56554b6
clean up code
jedi-of-the-sea Nov 5, 2024
199694a
make urls for internal services editable
jedi-of-the-sea Nov 8, 2024
042eac8
clean up code
jedi-of-the-sea Nov 8, 2024
b9be89c
add custom selectResult function to intern search
jedi-of-the-sea Nov 11, 2024
1e7c4eb
delete not needed export
jedi-of-the-sea Nov 11, 2024
105b07a
add missing parameter froim config
jedi-of-the-sea Nov 11, 2024
1fdc33d
set default value for urlParamsForProd
jedi-of-the-sea Nov 11, 2024
7f4dd1e
fix type error for linting
jedi-of-the-sea Nov 11, 2024
e0b99e7
fix missing variable
jedi-of-the-sea Nov 11, 2024
9e27920
clean up code
jedi-of-the-sea Nov 11, 2024
f02b6b4
update readme
jedi-of-the-sea Nov 11, 2024
e2dcb1a
fix errors in search for prod
jedi-of-the-sea Nov 12, 2024
9516697
fix url mistake
jedi-of-the-sea Nov 12, 2024
e8fd136
show disabled button if nothing is selected
jedi-of-the-sea Nov 13, 2024
5148f32
change variable name
jedi-of-the-sea Nov 13, 2024
908a02a
delete old todo
jedi-of-the-sea Nov 13, 2024
9fe0ada
add new attributions
jedi-of-the-sea Nov 13, 2024
36098be
fix adding custom search configurations
jedi-of-the-sea Nov 13, 2024
6403c16
make prettier after variable name change
jedi-of-the-sea Nov 13, 2024
31f0e72
add hints for internal use to DishModal
jedi-of-the-sea Nov 14, 2024
2a607ad
show labels as seperate layer
jedi-of-the-sea Nov 14, 2024
75ba84f
prevent error in internal mode from autocomplete
jedi-of-the-sea Nov 15, 2024
5ca0642
open screenshot in new tab
jedi-of-the-sea Nov 15, 2024
dda3d17
prevent errors in extern map
jedi-of-the-sea Nov 15, 2024
c0311c7
replace old ip adress
jedi-of-the-sea Nov 18, 2024
c3d88c7
make background for export selectable
jedi-of-the-sea Nov 18, 2024
0fb920d
show intern photos in intern GFI
jedi-of-the-sea Nov 18, 2024
7b721c8
prevent tab random opening in browser
jedi-of-the-sea Nov 18, 2024
f27dfe4
hide label at high zoom levels
jedi-of-the-sea Nov 18, 2024
8f8d5df
fix zoom to objektId
jedi-of-the-sea Nov 19, 2024
92fc96a
fix dish map export
jedi-of-the-sea Nov 19, 2024
38e1e79
use internalHost as only parameter for dishExportMap
jedi-of-the-sea Nov 19, 2024
b1d62b7
fewer parameters in urlParams
jedi-of-the-sea Nov 19, 2024
feeaa70
make url in getPhoto a parameter
jedi-of-the-sea Nov 19, 2024
2617113
delete unnecessary import
jedi-of-the-sea Nov 19, 2024
60773fd
fix openBenutzungshinweise
jedi-of-the-sea Nov 19, 2024
6cead33
adjust config for ALKIS service
jedi-of-the-sea Nov 20, 2024
a154903
adjust config for beschriftungslayer
jedi-of-the-sea Nov 20, 2024
0120413
change default background layer
jedi-of-the-sea Nov 20, 2024
010330b
remove unnecessary variable
jedi-of-the-sea Nov 20, 2024
eeefe24
fix zoomToFeature
jedi-of-the-sea Nov 21, 2024
d26cffc
change layer description
jedi-of-the-sea Nov 21, 2024
681ea11
remove unnecessary import
jedi-of-the-sea Nov 21, 2024
62e60c7
refactor DishExportMap
jedi-of-the-sea Nov 22, 2024
76339d9
edit layer config
jedi-of-the-sea Nov 22, 2024
6efbf18
improve performance
jedi-of-the-sea Nov 22, 2024
9ca1c3b
catch error if fetching ressource does not work
jedi-of-the-sea Nov 22, 2024
4b7c78a
remove unnecessary styles
jedi-of-the-sea Nov 22, 2024
2f03c75
disable switch buttons if first or last item is reached
jedi-of-the-sea Nov 22, 2024
11ccb44
simplify code
jedi-of-the-sea Nov 22, 2024
b19b3be
update documentation
jedi-of-the-sea Nov 25, 2024
4201764
update changelog
jedi-of-the-sea Nov 25, 2024
2e35b5a
fix error in export plugin
jedi-of-the-sea Nov 25, 2024
1ca3c86
shorten the example text in Hints
jedi-of-the-sea Nov 25, 2024
137d247
remove false parameter
jedi-of-the-sea Nov 25, 2024
7c6cf34
improve monumental search
jedi-of-the-sea Nov 26, 2024
b4a8dbb
remove highlighting from parcel layer
jedi-of-the-sea Nov 26, 2024
c3e16a7
Merge branch 'main' into dish_intern
jedi-of-the-sea Nov 26, 2024
9ad2816
adjust naming in layers
jedi-of-the-sea Nov 26, 2024
72471c5
remove old variables
jedi-of-the-sea Nov 27, 2024
ab00f8b
Merge branch 'main' into dish_intern
jedi-of-the-sea Nov 27, 2024
bd9a791
fix typo
jedi-of-the-sea Nov 28, 2024
880a13b
show gfi depending on visibility of layers in map
jedi-of-the-sea Nov 28, 2024
bbe13cf
hide infolayers
jedi-of-the-sea Nov 28, 2024
4d7e78f
change switch button colors
jedi-of-the-sea Nov 28, 2024
2223dfd
move files to new folder
jedi-of-the-sea Nov 28, 2024
8bde166
add hint for gfi config
jedi-of-the-sea Nov 28, 2024
304a460
change address search service
jedi-of-the-sea Nov 29, 2024
58e15d4
uniform naming convention
jedi-of-the-sea Nov 29, 2024
eca4cad
adjust variable names
jedi-of-the-sea Nov 29, 2024
557228c
uniform naming convention
jedi-of-the-sea Nov 29, 2024
3684048
update html
jedi-of-the-sea Nov 29, 2024
1dd12d7
refactor search config
jedi-of-the-sea Nov 29, 2024
30e6f3c
add type to intern layerConfig
jedi-of-the-sea Dec 2, 2024
147469e
refactor address search config
jedi-of-the-sea Dec 2, 2024
919b279
refactor configurations
jedi-of-the-sea Dec 2, 2024
86722f3
rename file
jedi-of-the-sea Dec 2, 2024
1ace223
remove not available service
jedi-of-the-sea Dec 2, 2024
4da665d
add services to attributions
jedi-of-the-sea Dec 2, 2024
d9d4df4
clean up
jedi-of-the-sea Dec 2, 2024
425ed91
rename new services
jedi-of-the-sea Dec 2, 2024
ee76f96
make config param in html obsolete
jedi-of-the-sea Dec 2, 2024
7f68ed9
configure background maps
jedi-of-the-sea Dec 3, 2024
0c854e4
adjust config for beschriftungslayer
jedi-of-the-sea Dec 3, 2024
a6522e2
make verlust-layer visible by default
jedi-of-the-sea Dec 4, 2024
08d574b
Merge remote-tracking branch 'origin' into dish_intern
jedi-of-the-sea Dec 9, 2024
ecbc624
update readme
jedi-of-the-sea Dec 9, 2024
b85b90b
update html page for extern mode
jedi-of-the-sea Dec 9, 2024
cac62d7
update readme
jedi-of-the-sea Dec 9, 2024
a1997a5
delete unnecessary variables
jedi-of-the-sea Dec 9, 2024
bc2fd79
update readme
jedi-of-the-sea Dec 9, 2024
ccdcd51
update changelog
jedi-of-the-sea Dec 9, 2024
77df306
change url for ALKIS WFS
jedi-of-the-sea Dec 12, 2024
f87b55e
bugfix
jedi-of-the-sea Dec 12, 2024
7b6d6e6
fix geometry overlap
jedi-of-the-sea Dec 12, 2024
f2c0665
stack label on top of other layers
jedi-of-the-sea Dec 13, 2024
64ef7f9
rename layers
jedi-of-the-sea Dec 13, 2024
c635354
change info order für GfiIntern
jedi-of-the-sea Dec 13, 2024
79dcc63
zoom in closer search results or monumental objects
jedi-of-the-sea Dec 13, 2024
1a50314
change minZoom for label layer
jedi-of-the-sea Dec 13, 2024
a78c1b5
bugfix in gfi
jedi-of-the-sea Dec 13, 2024
4dbfac8
reorder gfi information
jedi-of-the-sea Dec 13, 2024
f5afbc3
update services
jedi-of-the-sea Dec 16, 2024
851d65a
change info order in intern gfi
jedi-of-the-sea Dec 17, 2024
b7a7afa
changes in service urls due to CORS errors
jedi-of-the-sea Dec 17, 2024
0677f0e
rename attributions
jedi-of-the-sea Dec 17, 2024
324ac33
fix types
jedi-of-the-sea Dec 19, 2024
047dfef
new url due to CORS errors
jedi-of-the-sea Dec 19, 2024
c5a05e0
use alkisWfServiceIntern in search to set url
jedi-of-the-sea Dec 19, 2024
69af553
edit changelog
jedi-of-the-sea Dec 19, 2024
dec44dc
new interface DishMapConfig
jedi-of-the-sea Dec 19, 2024
16f53a5
fix types
jedi-of-the-sea Dec 19, 2024
c589905
fix gfi by adding changed service
jedi-of-the-sea Dec 19, 2024
169466c
use right id in search
jedi-of-the-sea Dec 19, 2024
de95b8d
edit readme
jedi-of-the-sea Dec 19, 2024
78283f0
edit changelog
jedi-of-the-sea Dec 19, 2024
1831c0e
fix grammar
jedi-of-the-sea Dec 19, 2024
809a83a
make code more comprehensible
jedi-of-the-sea Dec 20, 2024
10049dd
delete unused colors
jedi-of-the-sea Dec 20, 2024
f412420
edit comments in MODE
jedi-of-the-sea Dec 20, 2024
24f4400
import variables for urlParams
jedi-of-the-sea Dec 20, 2024
cb96f3a
ignore url config file needed for testing
jedi-of-the-sea Dec 20, 2024
0b1dcbb
remove unused keys
jedi-of-the-sea Dec 20, 2024
ceb4cae
simplify alkis WMS config
jedi-of-the-sea Dec 20, 2024
6a38a1c
simplify alkis WFS config
jedi-of-the-sea Dec 20, 2024
e3e46f5
simplify services configs
jedi-of-the-sea Dec 20, 2024
d74307d
Merge branch 'main' into dish_intern
dopenguin Dec 23, 2024
9e90dd7
Merge branch 'main' into dish_intern
dopenguin Jan 6, 2025
833fe4a
shorten names for intern services
jedi-of-the-sea Jan 6, 2025
9d136d6
reduce redundancy
jedi-of-the-sea Jan 6, 2025
1ef137e
set urlParams in index.html instead of seperate config
jedi-of-the-sea Jan 6, 2025
26d6988
edit address search config
jedi-of-the-sea Jan 6, 2025
1312d28
delete unneeded export
jedi-of-the-sea Jan 6, 2025
347a06d
only merge configs where necessary
jedi-of-the-sea Jan 6, 2025
9bdde42
remove unneeded getter
jedi-of-the-sea Jan 6, 2025
dedcf0c
add missing layout tag
jedi-of-the-sea Jan 6, 2025
85cb0e7
add reason for disabling linter
jedi-of-the-sea Jan 6, 2025
67c3f13
refactor internal map handling
jedi-of-the-sea Jan 6, 2025
b915637
add more detailed description
jedi-of-the-sea Jan 7, 2025
764cec0
use variable for map creation
jedi-of-the-sea Jan 7, 2025
f313872
use variables instead of data properties
jedi-of-the-sea Jan 7, 2025
7b4b568
use computed value instead of method
jedi-of-the-sea Jan 7, 2025
ffcbdef
set urls in mounted hook
jedi-of-the-sea Jan 7, 2025
1de503f
refactor showRectangleAndDialog
jedi-of-the-sea Jan 7, 2025
35f487e
use client name for error logs in console
jedi-of-the-sea Jan 7, 2025
50fc577
add comment to inform about backend requirements
jedi-of-the-sea Jan 7, 2025
8e702ac
add featureType dynamically
jedi-of-the-sea Jan 7, 2025
edb55bc
delete proxyUrl
jedi-of-the-sea Jan 7, 2025
94f9475
refactor printMapAsPdf
jedi-of-the-sea Jan 7, 2025
7dd5fed
fix IDE nagging
jedi-of-the-sea Jan 7, 2025
21bd0df
remove unneeded unit
jedi-of-the-sea Jan 7, 2025
785cd3b
add dependency for vuex-generators
jedi-of-the-sea Jan 7, 2025
afd8340
use shared component for information display
jedi-of-the-sea Jan 7, 2025
b163b5c
move check for transformedCoordinate to print function
jedi-of-the-sea Jan 7, 2025
7483a7c
use right type for currentProperties
jedi-of-the-sea Jan 7, 2025
e9f54fb
expose MapInstance as type
jedi-of-the-sea Jan 7, 2025
f850776
use MapInstance as type
jedi-of-the-sea Jan 7, 2025
9965a0e
update core/changelog
jedi-of-the-sea Jan 7, 2025
01aff17
edit Readme again
jedi-of-the-sea Jan 8, 2025
e69d512
add new readme for dishexportmap
jedi-of-the-sea Jan 8, 2025
a0f8051
combine gfi and gfiIntern plugins
jedi-of-the-sea Jan 8, 2025
4f6a144
update plugin/layerChooser/changelog
jedi-of-the-sea Jan 8, 2025
76b9468
Merge branch 'main' into dish_intern
jedi-of-the-sea Jan 8, 2025
6661f7d
Merge branch 'main' into dish_intern
dopenguin Jan 10, 2025
3b0a7b2
Merge branch 'main' into dish_intern
dopenguin Jan 17, 2025
68aff2a
Merge branch 'main' into dish_intern
warm-coolguy Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/clients/dish/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
## unpublished

- Feature: If a user is geolocated outside of the map's extent, the client will inform the user of why geolocation did not take effect via a textbox.
- Feature: The map can now be used for internal use with specific configurations. This will be defined by the parameter `MODE` in the index.html. The parameters `internalHost`, `internalPort` and `internalPath` for the internal map must be passed in the `createMap` call.
dopenguin marked this conversation as resolved.
Show resolved Hide resolved
- Feature: New searches for address and parcels added.
dopenguin marked this conversation as resolved.
Show resolved Hide resolved
- Feature: New background and specialist data layers added.
dopenguin marked this conversation as resolved.
Show resolved Hide resolved
- Feature: New plugins DishExportMap and InternGfi for intern mode use added.
dopenguin marked this conversation as resolved.
Show resolved Hide resolved
- Fix: Extend typing for search result function according to type package update.
- Fix: Import types `AddressSearchState` and `AddressSearchGetters` from correct position.
- Fix: Import enum `SearchResultSymbols` from correct position.
Expand Down
18 changes: 17 additions & 1 deletion packages/clients/dish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,30 @@

## Content

The client can use two different configurations which are controlled by the parameter `MODE`. `MODE="EXTERN"` will apply the configuration for the map client as the website for the public, and `MODE="INTERN"` for the map used in the internal DISH application. `MODE` is initially set and cannot be changed after hosting.
dopenguin marked this conversation as resolved.
Show resolved Hide resolved

The DISH client differs from other POLAR clients in that it does not take any additional configuration, but is a closed product. All configuration is done dev-side and is versioned; updates require version updates.

Please see the CHANGELOG.md for all changes after the initial release.

## Usage

The product is a hostable HTML page. Usually, we do not deliver full pages, but rather components. Due to this, it's just that component, but full page width and height.
The product can be used for two use cases.

One is a hostable HTML page for the public. Usually, we do not deliver full pages, but rather components. Due to this, it's just that component, but full page width and height.

The other one is a map that can be embedded in the dish application for internal use.

Add a query parameter, e.g. `?ObjektID=1506`, to the page's URL to initially focus a feature and display its feature information by ObjektID.

Name and casing of "ObjektID" have been directly taken from the backend to avoid duplicate naming.

The service URLs for the internal monumental WMS and WFS need to be configurable. Therefore, the host (`internalHost`), the port and the part of the path that is equal for both services must be defined outside of the map. The `internalHost` and the combination of host, port and path as `internServicesBaseUrl` must be passed to the `createMap` call as attributes of the parameter `urlParams`.

The `internalHost` is also needed as parameter for the DishExportMap plugin and is passed as attribute of `configOverride` in the `createMap` call.

The `urlParams` parameter and the configuration for the DishExportMap is only needed for the internal dish application and can be omitted otherwise.
dopenguin marked this conversation as resolved.
Show resolved Hide resolved




dopenguin marked this conversation as resolved.
Show resolved Hide resolved
181 changes: 130 additions & 51 deletions packages/clients/dish/src/addPlugins.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -16,77 +19,135 @@ import merge from 'lodash.merge'
import { extendGfi } from './utils/extendGfi'
import { search } from './utils/search'
import { autocomplete, selectResult } from './utils/autocomplete'
import { denkmalSearchResult } from './utils/denkmalSearchIntern'
import { searchMethods } from './mapConfigurations/searchConfigParams'
import DishModal from './plugins/Modal'
import DishHeader from './plugins/Header'
import DishGfiContent from './plugins/Gfi'
import { MODE } from './enums'
import DishGfiIntern from './plugins/GfiIntern'
import DishExportMap from './plugins/DishExportMap'

const defaultOptions = {
displayComponent: true,
layoutTag: NineLayoutTag.TOP_LEFT,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const defaultOptions = {
displayComponent: true,
layoutTag: NineLayoutTag.TOP_LEFT,
}

I suggest removing this, as this is only partially being used. All subsequent suggestions reflect this as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


const pluginGfiExtern = {
coordinateSources: ['plugin/addressSearch/chosenAddress'],
gfiContentComponent: DishGfiContent,
afterLoadFunction: extendGfi,
}

const pluginGfiIntern = {
coordinateSources: ['plugin/addressSearch/chosenAddress'],
gfiContentComponent: DishGfiIntern,
}

function getPluginGfiConfig(mode: keyof typeof MODE) {
return mode === MODE.EXTERN ? pluginGfiExtern : pluginGfiIntern
}

// 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 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: true,
menus: mode === MODE.INTERN ? internalMenu : externalMenu,
layoutTag: NineLayoutTag.TOP_RIGHT,
})

setLayout(NineLayout)

core.addPlugins([
iconMenu,
DishModal(defaultOptions),
DishModal({
displayComponent: true,
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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the merge, as this is not necessary and only hides the given type error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{},
{
displayComponent: true,
layoutTag: NineLayoutTag.TOP_LEFT,
addLoading: 'plugin/loadingIndicator/addLoadingKey',
removeLoading: 'plugin/loadingIndicator/removeLoadingKey',
customSearchMethods:
mode === MODE.EXTERN ? { dish: search, autocomplete } : {},
customSelectResult:
mode === MODE.EXTERN
? {
[searchMethods.denkmalsucheAutocomplete.categoryId]:
selectResult,
}
: {
[searchMethods.denkmalsucheDishIntern.categoryId]:
denkmalSearchResult,
},
}
)
),
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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the merge and maxWidth.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{},
{
displayComponent: mode === MODE.EXTERN,
layoutTag: NineLayoutTag.BOTTOM_RIGHT,
maxWidth: 500,
}
)
),
PolarPluginAttributions({
displayComponent: true,
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: true,
layoutTag: NineLayoutTag.TOP_LEFT,
},
getPluginGfiConfig(mode)
)
),
PolarPluginLoadingIndicator(
merge({}, defaultOptions, {
Expand All @@ -99,18 +160,36 @@ export const addPlugins = (core) => {
})
),
PolarPluginToast(
merge({}, defaultOptions, {
layoutTag: NineLayoutTag.BOTTOM_MIDDLE,
})
merge(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the redundant merge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{},
{
displayComponent: true,
layoutTag: NineLayoutTag.BOTTOM_MIDDLE,
}
)
),
PolarPluginZoom(
merge({}, defaultOptions, {
layoutTag: NineLayoutTag.MIDDLE_RIGHT,
})
),
PolarPluginGeoLocation(
merge(
{},
{
displayComponent: mode === MODE.EXTERN,
layoutTag: NineLayoutTag.MIDDLE_RIGHT,
}
)
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PolarPluginGeoLocation(
merge(
{},
{
displayComponent: mode === MODE.EXTERN,
layoutTag: NineLayoutTag.MIDDLE_RIGHT,
}
)
),
PolarPluginGeoLocation({
displayComponent: mode === MODE.EXTERN,
layoutTag: NineLayoutTag.MIDDLE_RIGHT,
}),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DishExportMap({
displayComponent: mode === MODE.INTERN,
layoutTag: NineLayoutTag.BOTTOM_LEFT,
}),
PolarPluginExport(
merge({}, defaultOptions, {
layoutTag: NineLayoutTag.MIDDLE_RIGHT,
displayComponent: mode === MODE.INTERN,
layoutTag: NineLayoutTag.BOTTOM_LEFT,
})
),
])
Expand Down
12 changes: 12 additions & 0 deletions packages/clients/dish/src/colors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const shBlue = '#003064'
export const shWhite = '#FFFFFF'

/*
from UI draft
const shRed = '#D4004B'
const shGrey = '#A4ADB6'
const shDarkBlue = '#001E49'
const ui 01 = '#1EAE9C';
const ui 04 = '#008CCF';
const unnamed = '#0089CA';
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/*
from UI draft
const shRed = '#D4004B'
const shGrey = '#A4ADB6'
const shDarkBlue = '#001E49'
const ui 01 = '#1EAE9C';
const ui 04 = '#008CCF';
const unnamed = '#0089CA';
*/

Currently not used. Should be added once needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept it because it was in there before. I do not know for what, though, so I delete it for now: 10049dd

6 changes: 6 additions & 0 deletions packages/clients/dish/src/enums.ts
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// display intern view for administrators that work within the map
// display internal view for administrators that work within the map

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INTERN: 'INTERN',
}
9 changes: 8 additions & 1 deletion packages/clients/dish/src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
<noscript>Bitte benutzen Sie einen Browser mit aktiviertem JavaScript, um den Kartenklienten zu nutzen.</noscript>
</div>
</div>
<script type="module" src="./client-dish.js"></script>
<script type="module">
import client from './client-dish.js'

client.createMap({
containerId: 'polarstern',
mode: 'EXTERN',
})
</script>
</body>
</html>
26 changes: 25 additions & 1 deletion packages/clients/dish/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,30 @@
<noscript>Bitte benutzen Sie einen Browser mit aktiviertem JavaScript, um den Kartenklienten zu nutzen.</noscript>
</div>
</div>
<script type="module" src="./polar-client.ts"></script>
<script type="module">
import client from './polar-client.ts'

const internalHost = 'http://10.61.63.54'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it correct that this url should be commited 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24f4400
cb96f3a

I sent you the new config file in mattermost.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and changed it back ^^ 1ef137e

const internalPort = '8081'
const internalPath = 'dish-deegree-3.5.0/services'

// leave empty for external map
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// leave empty for external map
// leave empty for external map

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const urlParams = {
internalHost,
internServicesBaseUrl: `${internalHost}:${internalPort}/${internalPath}`
}

client.createMap({
containerId: 'polarstern',
mode: 'INTERN', // INTERN, EXTERN
urlParams,
//only needed for internal map
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//only needed for internal map
// only needed for the internal map

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configOverride: {
dishExportMap: {
internalHost: urlParams.internalHost,
},
}
})
</script>
</body>
</html>
2 changes: 2 additions & 0 deletions packages/clients/dish/src/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gfiHeader: 'Objektnummer',

Not used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
plugins: {
gfi: {
Expand All @@ -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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gfiHeader: 'Object number',

Not used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
plugins: {
gfi: {
Expand Down
Loading
Loading