Skip to content

Feature/diplan UI #254

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

Merged
merged 97 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
5dd2aaa
Add basic structure for diplan-ui and new plugin GeoEditing
dopenguin Feb 28, 2025
f454beb
Add possibly required vite config for diplanung-style
dopenguin Feb 28, 2025
b62440c
Add GeoEditing plugin to diplan and css rules of diplanung-style
dopenguin Feb 28, 2025
92e0d8e
Make diplanung-style usable through a temporary workaround
dopenguin Mar 4, 2025
e3cbafd
Fix diplanung-style overwriting vuetify styles
dopenguin Mar 5, 2025
349dbb0
Use diplanung-style only for diplan-ui to not interfere with vuetify
dopenguin Mar 5, 2025
6852d68
Make the direction the content of the attributions opens configurable
dopenguin Mar 6, 2025
0e76d90
Fix issue of plugins placed in the middle not being centered
dopenguin Mar 6, 2025
42b0838
Use layoutTag in place of a new config parameter for identification
dopenguin Mar 6, 2025
19de679
Add diplan-ui client to the overview
dopenguin Mar 7, 2025
dfd287f
Add new DiPlan IconMenu, remove Fullscreen and add GeoEditing to Menu
dopenguin Mar 7, 2025
67795d5
Re-implement LayerChooser for diplan-ui
dopenguin Mar 7, 2025
f77adb1
Add possibility to change the component of the layer chooser by config
dopenguin Mar 7, 2025
fc8f223
Import diplan style in setup file of the dev view
dopenguin Mar 7, 2025
773d394
Change the height of the wrapper based on the value of the design
dopenguin Mar 7, 2025
74c8565
Add possibility to change the component of the iconMenu by config
dopenguin Mar 7, 2025
f17cf5d
Add missing type for showZoomSlider to ZoomGetters
dopenguin Mar 7, 2025
13d8f42
Add possibility to change the component of zoom by config
dopenguin Mar 7, 2025
f267799
Add diplan styled zoom buttons
dopenguin Mar 7, 2025
4afe34b
Make setMode and setDrawMode async preventing race conditions
dopenguin Mar 10, 2025
4a4e1c5
Move dev config closer to wanted configuration
dopenguin Mar 10, 2025
768f34d
Add hints for geoEditing ui
dopenguin Mar 10, 2025
5827444
Rename hints to tools for broader usage
dopenguin Mar 10, 2025
4e545da
Add hints for Diplan LayerChooser
dopenguin Mar 10, 2025
1e3ed93
Add renderType to define where the GeoEditing plugin will be rendered
dopenguin Mar 10, 2025
19b6431
Comment unused locales
dopenguin Mar 10, 2025
1b50bc1
Split GeoEditing in two possible views and add first functionality
dopenguin Mar 10, 2025
9d70a59
Add MenuView to GeoEditing
dopenguin Mar 10, 2025
d5122db
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 11, 2025
b801bfd
Move getBackgroundsAndMasks to a separate file
dopenguin Mar 11, 2025
5788e97
Remove unused interface
dopenguin Mar 11, 2025
49ab19b
Reorder types alphanumerically
dopenguin Mar 11, 2025
5aaac41
Add new getter configuration that wraps the rootGetter
dopenguin Mar 11, 2025
98fbb00
Use new local getter for configuration
dopenguin Mar 11, 2025
7b6d088
Add possibility to use a different component for the AttributionsButton
dopenguin Mar 11, 2025
86d7664
Add new AttributionButton for diplan ui
dopenguin Mar 11, 2025
a6e48a3
Add possibility to configure a different component for AddressSearch
dopenguin Mar 11, 2025
2c4b6ec
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 12, 2025
6d34bc8
Align diplan-ui setup with dev setup
dopenguin Mar 12, 2025
7dcc089
Add diplan address search ui
dopenguin Mar 12, 2025
5d71202
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 13, 2025
07c27fe
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 13, 2025
c912241
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 13, 2025
a16c8ef
Add todos for another iteration
dopenguin Mar 13, 2025
37cf816
Reduce height of polarstern-wrapper
dopenguin Mar 14, 2025
31151b0
Adjust build mode so that different configurations can be properly used
dopenguin Mar 14, 2025
5d74ede
Add both variations for the larger diplan-ui
dopenguin Mar 14, 2025
208b210
Change address search input element to have the label move
dopenguin Mar 14, 2025
ca1896a
Add translate to geoEditing
dopenguin Mar 14, 2025
953efa6
Remove parcel as this is already implemented somewhere else
dopenguin Mar 14, 2025
1ca5d30
Remove last trace of geoEditing mode parcel
dopenguin Mar 14, 2025
b093306
Change title for examples
dopenguin Mar 14, 2025
b2732dd
Remove note as @polar/plugin-layer-chooser now offers configuration
dopenguin Mar 17, 2025
02deabe
Keeping it real and grammatically correct 💁
dopenguin Mar 17, 2025
b477a49
Remove redundant css class mid-mid
dopenguin Mar 17, 2025
f097826
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 17, 2025
3ef0a33
Remove redundant curly-braces
dopenguin Mar 17, 2025
927cd01
Merge branch 'main' into feature/diplan-ui
warm-coolguy Mar 18, 2025
b1459b2
Extend LayerConfiguration from necessary PluginOptions
dopenguin Mar 18, 2025
2098257
Re-add @polar/plugin-export
dopenguin Mar 18, 2025
f6a3387
Remove not working imports of styles
dopenguin Mar 18, 2025
9365506
Always add @polar/plugin-toast
dopenguin Mar 19, 2025
cea505f
Re-add empty class mid-mid
dopenguin Mar 19, 2025
083d646
Precompile diplanung-style to have it include :host for variables
dopenguin Mar 19, 2025
912ed18
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 19, 2025
73d5b10
Rename data value 'open' to 'active'
dopenguin Mar 19, 2025
4d35f92
Deactivate any active tool if the menu window is closed
dopenguin Mar 19, 2025
8e71847
Remove empty rule
dopenguin Mar 20, 2025
cda40c2
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 20, 2025
a2434ea
Move the content of the base address search component to a separate file
dopenguin Mar 20, 2025
279eca8
Remove unused files
dopenguin Mar 20, 2025
5c5bbbd
Fix underlapping issue
dopenguin Mar 20, 2025
16fc3a4
Remove redundant comment
dopenguin Mar 20, 2025
3cfa769
Change changelog entry
dopenguin Mar 20, 2025
64ed372
Use the plugins AttributionButton and simply style it in diplan
dopenguin Mar 20, 2025
d5c2092
Add duplicate to GeoEditing
dopenguin Mar 21, 2025
1570a05
Remove comments
dopenguin Mar 21, 2025
a04602a
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 21, 2025
75d9bed
Merge branch 'main' into feature/diplan-ui
dopenguin Mar 21, 2025
131706c
Expose ZoomButtonContainer as a new export for custom implementations
dopenguin Mar 21, 2025
d64ea9f
Use ZoomButtonContainer and style it according to diplan design
dopenguin Mar 21, 2025
cd02a18
Expose IconMenuWrapper as a new export for custom implementations
dopenguin Mar 21, 2025
0e22006
Remove unused parts from the Zoom.vue in diplan
dopenguin Mar 21, 2025
2ce602f
Add missing z-index to MenuView of GeoEditing
dopenguin Mar 21, 2025
2644e6f
Remove IconMenuWrapper.vue
dopenguin Mar 21, 2025
efa9c6d
Change implementation of component to buttonComponent
dopenguin Mar 21, 2025
ce2437d
Add buttonComponent to IconMenuGetters
dopenguin Mar 21, 2025
02d6d5d
Remove (seemingly) obsolete v-deep override
dopenguin Mar 21, 2025
66492d2
Fix UI of diplan LayerChooser
dopenguin Mar 21, 2025
762cc90
Actually fix diplan layerChooser UI
dopenguin Mar 21, 2025
98404a4
Fix positioning of GeoEditing in MenuView
dopenguin Mar 21, 2025
b525f95
Change background-color of GeoEditing to #fff to be inline with the rest
dopenguin Mar 21, 2025
06067c0
Add IconMenuButton for diplan
dopenguin Mar 21, 2025
bf150c9
Expose Options.vue as LayerChooserOptions and use it in diplan
dopenguin Mar 21, 2025
0ef61b2
Expose LayerWrapper.vue as LayerChooserLayerWrapper and use it in diplan
dopenguin Mar 21, 2025
405f8d5
Merge branch 'main' of https://github.com/Dataport/polar into feature…
warm-coolguy Mar 24, 2025
3999525
Add information regarding polar-ui style
dopenguin Mar 24, 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
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/clients/diplan/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ DiPlan-specific configuration parameters belong within the `mapConfiguration` ob
| - | - | - |
| mergeToMultiGeometries | boolean? | Defaults to `false`. If `true`, the exported FeatureCollection in getter `revisedDrawExport` will have merged geometries; that is, instead of Points, Lines, and Polygons, only MultiPoints, MultiLines, and MultiPolygons will be featured, created by merging the features of their respective geometry. All geometry types that are enabled in the `Draw` tool may occur. This step is executed before geometry validation and meta service usage. |
| metaServices | metaService[]? | Specification of a service that contains meta-information regarding geometries. Information from there will be added to features in getter `revisedDrawExport`. |
| renderType | 'iconMenu' \| 'independent'? | If set to `independent`, the displayed view for the GeoEditing plugin is minified to a vertical list of buttons of icons instead of a list of buttons including descriptions. The plugin then may be used outside of an IconMenu. Defaults to `iconMenu`. |
| validateGeoJson | boolean? | Defaults to `true`. If `true`, all geometries in getter `revisedDrawExport` will undergo a validity check before they are exported. To inspect the validity of the offered geometries, inspect the getter `simpleGeometryValidity` that indicates validity with a `boolean`. |

#### diplan.metaService
Expand Down
171 changes: 171 additions & 0 deletions packages/clients/diplan/example/diplan-ui-one/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
// service id map to avoid typos, ease renames
const basemap = 'basemapde_farbe'
const xplanwms = 'xplanwms'
const xplanwfs = 'xplanwfs'
const flurstuecke = 'flurstuecke'
const bstgasleitung = 'bst_gasleitung'

export default {
// masterportalAPI parameters
startResolution: 264.583190458,
startCenter: [561210, 5932600],
extent: [
248651.73157077, 5227198.20287631, 928366.12236557, 6118661.62507136,
],
// diplan-specific configuration example (see API.md)
diplan: {
mergeToMultiGeometries: true,
validateGeoJson: true,
metaServices: [
{
id: flurstuecke,
propertyNames: ['land', 'gemarkung', 'regbezirk', 'kreis', 'gemeinde'],
aggregationMode: 'unequal',
},
],
},
// general POLAR parameters
locales: [
{
type: 'de',
resources: {
diplan: {
layers: {
[basemap]: 'BasemapDE',
[xplanwms]: 'XPlanWMS',
[xplanwfs]: 'XPlanSynWFS',
[flurstuecke]: 'Flurstücke',
[bstgasleitung]: 'BST Gasleitung',
},
attributions: {
[basemap]: `$t(diplan.layers.${basemap}) © GeoBasis-DE / BKG <YEAR> CC BY 4.0`,
[xplanwms]: `$t(diplan.layers.${xplanwms}) © ???`,
[xplanwfs]: `$t(diplan.layers.${xplanwfs}) © ???`,
[flurstuecke]: `$t(diplan.layers.${flurstuecke}) © ???`,
[bstgasleitung]: `$t(diplan.layers.${bstgasleitung}) © ???`,
},
},
},
},
],
addressSearch: {
displayComponent: true,
searchMethods: [
{
queryParameters: {
searchAddress: true,
searchStreets: true,
searchHouseNumbers: true,
},
type: 'mpapi',
url: 'https://geodienste.hamburg.de/HH_WFS_GAGES?service=WFS&request=GetFeature&version=2.0.0',
},
],
groupProperties: {
defaultGroup: {
label: 'Suchbegriff',
},
},
minLength: 3,
waitMs: 300,
},
layers: [
{
id: basemap,
visibility: true,
type: 'background',
name: `diplan.layers.${basemap}`,
},
{
id: xplanwms,
visibility: true,
type: 'mask',
name: `diplan.layers.${xplanwms}`,
},
{
id: xplanwfs,
visibility: false,
type: 'mask',
name: `diplan.layers.${xplanwfs}`,
},
{
id: flurstuecke,
visibility: false,
// TODO available from 7, but only starts loading from 8 - bug or skill issue? → POLAR-431
minZoom: 7,
type: 'mask',
name: `diplan.layers.${flurstuecke}`,
},
{
id: bstgasleitung,
visibility: false,
type: 'mask',
name: `diplan.layers.${bstgasleitung}`,
},
],
attributions: {
layerAttributions: [
{
id: basemap,
title: `diplan.attributions.${basemap}`,
},
{
id: xplanwms,
title: `diplan.attributions.${xplanwms}`,
},
{
id: xplanwfs,
title: `diplan.attributions.${xplanwfs}`,
},
{
id: flurstuecke,
title: `diplan.attributions.${flurstuecke}`,
},
{
id: bstgasleitung,
title: `diplan.attributions.${bstgasleitung}`,
},
],
},
draw: {
lassos: [
{
id: flurstuecke,
},
{
id: xplanwfs,
},
],
snapTo: [xplanwfs, flurstuecke],
style: {
fill: { color: 'rgb(51 117 212 / 50%)' },
stroke: {
color: '#3375d4',
width: 2,
},
circle: {
radius: 7,
fillColor: 'rgb(51 117 212 / 50%)',
},
},
},
gfi: {
mode: 'bboxDot',
layers: {
[xplanwms]: {
geometry: true,
window: true,
properties: ['xpPlanName'],
},
[xplanwfs]: {
geometry: true,
window: true,
properties: ['name'],
},
},
coordinateSources: [
'plugin/pins/transformedCoordinate',
'plugin/pins/coordinatesAfterDrag',
],
},
}
128 changes: 128 additions & 0 deletions packages/clients/diplan/example/diplan-ui-one/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<!DOCTYPE html>
<html>
<!-- test page for build -->
<head>
<meta charset="utf-8" />
<title>@polar/client-diplan</title>
<link rel="stylesheet" href="../style.css">
<style>
#polarstern-wrapper {
height: 90vh;
}
</style>
</head>
<body>
<nav></nav>
<header>
<h1>Testseite <code>@polar/client-diplan</code> (Diplan UI - Variation One)</h1>
</header>
<div id="somethingnice"></div>
<main>
<section>
<h2 class="padded-x">Beispielinstanz</h2>
<div class="padded-x">
<h3>Steuerung von außen</h3>
<fieldset>
<legend>POLAR-Standardfunktionen</legend>
<button id="action-plus">+</button>
<button id="action-minus">-</button>
<button id="action-toast">Toast</button>
<button id="action-load-geojson">GeoJSON hinzufügen</button>
<button id="action-zoom-to-all">Zoome auf Zeichnung</button>
<label>
Adresssuche (erstbestes Ergebnis):
<input id="action-address-search-filler"/>
</label>
</fieldset>
<fieldset>
<legend>DiPlan-Funktionen</legend>
<button id="action-lasso">Lasso-Funktion</button>
<button id="action-cut-polygons">Cut polygons</button>
<button id="action-duplicate-polygons">Duplicate polygons</button>
<button id="action-merge-polygons">Merge polygons</button>
</fieldset>
<div>Active extended draw mode: <span id="active-draw-mode"></span></div>
</div>
<h3 class="padded-x">Klient</h3>
<div id="polarstern">
<noscript>Bitte benutzen Sie einen Browser mit aktiviertem JavaScript, um den Kartenklienten zu nutzen.</noscript>
</div>
</section>
<section class="padded-x">
<h2>Informationen aus Kartenklient</h2>
<p>Subscriptions werden i.d.R. mit JSON-fähigen Objekten beantwortet. Die untere Tabelle stellt einige ausgewählte Karteninhalte als Text dar.</p>
<table class="styled-table">
<thead>
<tr>
<th>Schlüssel</th>
<th>Wert (als Text)</th>
<th>Kommentar</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>diplan/revisedDrawExport</code></td>
<td id="subscribed-revised-draw-export">uninitialized</td>
<td>Der überarbeitete Export des Draw-Tools mit diplanspezifischen Anpassungen.</td>
</tr>
<tr>
<td><code>diplan/revisionInProgress</code></td>
<td id="subscribed-revision-in-progress">uninitialized</td>
<td>Indikator, ob ein Ladevorgang für die weiteren Anpassungen der Draw-Ausagbe gerade läuft.</td>
</tr>
<tr>
<td><code>diplan/simpleGeometryValidity</code></td>
<td id="subscribed-simple-geometry-validity">uninitialized</td>
<td>Simple-Geometry-Konformität</td>
</tr>
<tr>
<td><code>plugin/export/exportedMap</code></td>
<td><a id="subscribed-export-a" download="polar_screenshot.png" href=""><img id="subscribed-export-img" /></a></td>
<td>Screenshot des aktuellen Kartenausschnitts. Produzierbar durch Klick auf den unteren linken "Export"-Button.</td>
</tr>
<tr>
<td><code>plugin/zoom/zoomLevel</code></td>
<td id="subscribed-zoom">uninitialized</td>
<td>Zoomstufe der <a target="_blank" href="https://openlayers.org/en/latest/apidoc/module-ol_View-View.html#getZoom">OpenLayers/View</a> als <code>Number</code></td>
</tr>
<tr>
<td><code>plugin/gfi/featureInformation</code></td>
<td id="subscribed-gfi">uninitialized</td>
<td>Wert der aktuellen <code>GetFeatureInformation</code>-Antwort(en) als <code>Record&lt;LayerId, Feature[]&gt;</code></td>
</tr>
<tr>
<td><code>plugin/draw/featureCollection</code></td>
<td id="subscribed-draw">uninitialized</td>
<td>Die hergestellte Zeichnung als GeoJSON (ohne diplanspezifische Metainformationen und Modifikationen).</td>
</tr>
<tr>
<td><code>plugin/...</code></td>
<td id="subscribed-a">uninitialized</td>
<td>Platz für weitere Beispiele</td>
</tr>
<tr>
<td><code>plugin/...</code></td>
<td id="subscribed-b">uninitialized</td>
<td>Platz für weitere Beispiele</td>
</tr>
<tr>
<td><code>plugin/...</code></td>
<td id="subscribed-c">uninitialized</td>
<td>Platz für weitere Beispiele</td>
</tr>
</tbody>
</table>
</section>
</main>
<footer>At solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles.</footer>
<link rel="stylesheet" src="../../dist/polar-client.css">
<script type="module">
import diplanMapClient from '../../dist/client-diplan.js'
import services from '../services.js'
import config from './config.js'
import setup from './setup.js'

setup(diplanMapClient, services, config)
</script>
</body>
</html>
Loading