-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from Dataport/refactor/multiple-diplan-clients
prepare diplan example folder for multiple prod instances
- Loading branch information
Showing
12 changed files
with
385 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Example structure | ||
|
||
## `.` | ||
|
||
The root folder holds files used in all clients. Modify with care. If you need wildly different files for an example, create new files in the relevant example folder. | ||
|
||
## `dev` | ||
|
||
This folder holds the development example used during development time. You may put anything in here as long as it serves the testing purposes. The client is not required to look good, but is a technical playground. | ||
|
||
## all others | ||
|
||
All other folders are examples used in the documentation deployed on the [GitHub page](https://dataport.github.io/polar/docs/diplan/example/overview.html). They are supposed to display usage variants and should be understandable/clean. These are supposed to be viewn both by the customer and integrators alike so that they can easily lift from the usage scenarios. They're also useful for testing PRs in build mode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
// 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 { | ||
startResolution: 264.583190458, | ||
startCenter: [561210, 5932600], | ||
extent: [ | ||
248651.73157077, 5227198.20287631, 928366.12236557, 6118661.62507136, | ||
], | ||
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', | ||
}, | ||
], | ||
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? | ||
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: { | ||
enableOptions: true, | ||
lassos: [ | ||
{ | ||
id: flurstuecke, | ||
}, | ||
{ | ||
id: xplanwfs, | ||
}, | ||
], | ||
measureOptions: { | ||
metres: true, | ||
kilometres: true, | ||
hectares: true, | ||
}, | ||
selectableDrawModes: ['Point', 'LineString', 'Circle', 'Text', 'Polygon'], | ||
snapTo: [xplanwfs, flurstuecke], | ||
textStyle: { | ||
font: { | ||
size: [10, 20, 30], | ||
family: 'Arial', | ||
}, | ||
}, | ||
style: { | ||
fill: { color: 'rgb(51 117 212 / 50%)' }, | ||
stroke: { | ||
color: '#3375d4', | ||
width: 2, | ||
}, | ||
circle: { | ||
radius: 7, | ||
fillColor: 'rgb(51 117 212 / 50%)', | ||
}, | ||
}, | ||
}, | ||
export: { | ||
displayComponent: true, | ||
showJpg: false, | ||
showPdf: false, | ||
}, | ||
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', | ||
], | ||
}, | ||
pins: { | ||
toZoomLevel: 9, | ||
movable: 'drag', | ||
appearOnClick: { | ||
show: true, | ||
atZoomLevel: 0, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<!-- test page --> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>@polar/client-diplan – Übersicht</title> | ||
<link rel="stylesheet" href="./style.css"> | ||
</head> | ||
<body> | ||
<nav></nav> | ||
<header> | ||
<h1>Testseite @polar/client-diplan – Übersicht</h1> | ||
</header> | ||
<div id="somethingnice"></div> | ||
<main> | ||
<section> | ||
<h2 class="padded-x">Beispielübersicht</h2> | ||
<div class="padded-x"> | ||
<li><a href="./polar-ui">POLAR UI test client</a></li> | ||
<li>DiPlan UI test client <span class="todo">TODO</span></li> | ||
<li>Login test client <span class="todo">TODO</span></li> | ||
<li>Data source test client <span class="todo">TODO</span></li> | ||
</div> | ||
</section> | ||
</main> | ||
<footer>At solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles.</footer> | ||
</body> | ||
</html> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.