Watch
1
0
Fork
You've already forked oerebViewer
0
mirror of https://github.com/kanton-bern/oerebViewer.git synced 2026-08-17 12:42:49 +00:00
  • Vue 71%
  • TypeScript 18.2%
  • JavaScript 8.2%
  • CSS 1.9%
  • Dockerfile 0.5%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-25 09:42:16 +02:00
.vscode [CFG] config / readme 2024-10-11 13:45:37 +02:00
assets Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
components Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
composables Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
config Update setup 2025-02-26 10:43:04 +01:00
helpers Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
i18n/locales Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
layouts Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
locales Fixes for language, zoom and preview 2024-11-20 17:39:11 +01:00
middleware new version 2022 2022-06-27 18:53:40 +02:00
modules Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
pages Upgrade to Nuxt3, pinia and composition API 2024-10-05 16:29:15 +02:00
plugins Change logic preventing rapid zoom outs on changing focus 2024-11-21 21:29:28 +01:00
public Upgrade to Nuxt3, pinia and composition API 2024-10-05 16:29:15 +02:00
schemas/oereb-webservice new version 2022 2022-06-27 18:53:40 +02:00
services Upgrade to Nuxt3, pinia and composition API 2024-10-05 16:29:15 +02:00
store Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
types new version 2022 2022-06-27 18:53:40 +02:00
.dockerignore new version 2022 2022-06-27 18:53:40 +02:00
.editorconfig new version 2022 2022-06-27 18:53:40 +02:00
.env.example new version 2022 2022-06-27 18:53:40 +02:00
.gitignore Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
.nvmrc Upgrade to Nuxt3, pinia and composition API 2024-10-05 16:29:15 +02:00
Dockerfile update Docker and remove direct dependency on vite eslint plugin 2024-10-11 11:23:46 +02:00
eslint.config.ts Change logic preventing rapid zoom outs on changing focus 2024-11-21 21:29:28 +01:00
i18n.config.ts Upgrade to Nuxt3, pinia and composition API 2024-10-05 16:29:15 +02:00
jsconfig.json new version 2022 2022-06-27 18:53:40 +02:00
LICENSE.md Add LICENSE 2022-08-02 15:51:16 +02:00
nuxt.config.ts Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
package-lock.json Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
package.json Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
publiccode.yml Add publicode.yml (purpose: opensource.admin.ch) 2026-06-25 09:42:16 +02:00
README.md Upgrades, improvements and fixes 2025-02-25 17:22:48 +01:00
tailwind.config.ts Change logic preventing rapid zoom outs on changing focus 2024-11-21 21:29:28 +01:00
tsconfig.json Upgrade to Nuxt3, pinia and composition API 2024-10-05 16:29:15 +02:00

OEREB-Viewer

Source code to setup a viewer for the Cadastre of Public-law Restrictions on landownership (DE: ÖREB-Kataster) displaying the JSON-Extract of the PLR-cadastre.

Setup

Configuration

Before building the OEREB-Viewer, copy .env.example into .env and edit the configuration.

Replace local with your directory name under ./config. For example, use bern instead.

# apply configurations from this directory in ./config
NUXT_ENV_CONFIG_CONTEXT=local

# credentials for esri token authentication
NUXT_ENV_TOKEN_USERNAME=user
NUXT_ENV_TOKEN_PASSWORD=password

See Custom Configuration for configuration instructions.

Platform

If you don't use Docker, the Node runtime at the latest version of 16 is required for the build step. Check out Node for more information.

Use with Docker

For simple deployment with Docker, a Dockerfile is provided. During the build, a static build of the app is generated and bundled with an HTTP server.

Build Docker image

Change the directory to where the OEREB-Viewer code is placed and run the build command. This command tags the image with oereb-viewer

docker build -t oereb-viewer .

Run Docker image

The oereb-viewer image exposes the port 3000.

Make sure your final port is linked to the exposed port of the image

# link local port 3000 to exposed port 3000
docker run -it -p 3000:3000 oereb-viewer

Use without Docker

For detailed explanation on how things work, check out Nuxt.js docs.

Based on Node server

The OEREB-Viewer provides a simple server based on Node. A process monitoring is required, to ensure continuous uptime.

# install dependencies
npm install

# build to be served with node server
# and launch server localhost:3000
npm run build
npm run start

Based on static files

Static files are generated in the ./dist directory. A web server is required to serve the static files.

# install dependencies
npm install

# build to be served statically from ./dist
npm run generate

Build for development and testing purpose

# install dependencies
npm install

# build for development via localhost:3000
npm run dev

Custom Configuration

Configuration are stored under ./config and can be selected by setting NUXT_ENV_CONFIG_CONTEXT in the .env file.

# change the title shown in the browser tab
NUXT_ENV_TITLE="ÖREB-Viewer | Visualiseur RDPPF"

# define wich configuration should be applied
NUXT_ENV_CONFIG_CONTEXT=bern

# if your viewer reqires
NUXT_ENV_TOKEN_USERNAME=user
NUXT_ENV_TOKEN_PASSWORD=password

Custom configurations are merged with the default configurations by merging and overwriting same configurations.

When starting a new custom configuration, consider copying an existing configuration into a new directory, updating .env and updating each configuration carefully.

Place local configurations in ./config/local or ./config/<any-name>-local like ./config/bern-local. They won't be tracked by git, as they are in .gitignore.

setup.js

This is where you place your settings.

setup.css

Create a setup.css file in your config directory, if you want to overwrite theme colors or any css.

/** overwrite theme css variables with your own RGB colors */
:root {
    --color-background-primary: 45, 54, 62;
    --color-text-primary: 255, 255, 255;

    --color-background-secondary: 203, 211, 219;
    --color-text-secondary: 45, 54, 62;

    --color-background-accent: 255, 255, 255;
    --color-text-accent: 203, 0, 14;

    --color-text-decent: 94, 114, 135;

    --color-background-base: 254, 254, 254;
    --color-text-base: 45, 54, 62;

    --color-background-active: 94, 114, 135;
    --color-text-active: 255, 255, 255;

    --color-border-primary: 94, 114, 135;
    --color-border-secondary: 187, 187, 187;

    --color-background-thirdly: 228, 233, 237;
}

/** place your custom css here */

locales

Add custom translations as JSON-files, for example ./config/{customdir}/locales/de.json.

Overwrite languages by adding locales to your setup.js

export const locales = [
  { code: 'de', language: 'de-CH', file: 'de.js', title: 'Deutsch' },
  { code: 'fr', language: 'fr-CH', file: 'fr.js', title: 'Français' },
  { code: 'rm', language: 'rm-CH', file: 'rm.js', title: 'Rumantsch' },
  { code: 'en', language: 'en-CH', file: 'en.js', title: 'English' },
]

A JavaScript language file is required, to add merge capabilities with default locales

Built With

Maintainer of This Repo

Owner is the Canton of Berne. Admins of the repo are: