From b473d37f8b12ac45612759653abc4013a21168f5 Mon Sep 17 00:00:00 2001 From: Mike van Riel Date: Fri, 25 Oct 2024 08:18:37 +0200 Subject: [PATCH] Removed configuration chapter Because configuration through JSON is currently broken and it is unclear whether it will return in the application, I have removed the chapter on configuration; a new chapter on configuring instances using default projects should be written to replace this chapter --- docs/docs/developers/configuration.md | 94 ------------------------- docs/docs/developers/functionalities.md | 12 ---- mkdocs.yml | 1 - 3 files changed, 107 deletions(-) delete mode 100644 docs/docs/developers/configuration.md diff --git a/docs/docs/developers/configuration.md b/docs/docs/developers/configuration.md deleted file mode 100644 index 6f4a09b..0000000 --- a/docs/docs/developers/configuration.md +++ /dev/null @@ -1,94 +0,0 @@ -The Netherlands3D platform has a modular configuration system in which [functionalities](functionalities.md) in the -application can register their own per-deployment defaults and settings. This can be used to -for example- pre-package -API Keys and server URLs when deploying the application. - -!!! info - The configuration system is not meant to store user preferences or per-project settings but instead it enables - system operators to provide keys and similar information that is specific to the deployment of the platform. - -## Defaults are settings that can be overridden by the user - -As a brief aside, let's first discuss what we mean by defaults and settings to provide context for the rest of this -chapter. - -Functionalities can have per-project and per-deployment properties. While the per-project properties as stored in the -`Project` structure, the Configuration for each functionality may have defaults that can be used to pre-populate a -new project, or when a project does not feature these properties. - -!!! example - - The Digital Twin for the province of Utrecht would want all new projects to have their camera focused on the - city of Utrecht. While the starting position of the camera can be overridden as a project setting, the default - is provided in the configuration that is provided by the province. - -Configuration settings on the other hand are not changeable on a per-project basis and can be used to provide URLs to -specific tilesets for the base layers, API Keys for working with a back-end, or pre-provide a set of access tokens for -WFS and WMS services that the deployment should always have access to. - -!!! warning - - Information provided through the configuration system are exposed through a publicly accessible configuration file - as the Digital Twin platform is fully client-side. Information that should stay secret should not be provided - through this mechanism. - -To summarize: _A default is the same as a setting but it can be overridden from a query parameter in the URL or via a -project file._ - -## Configuring the platform - -Settings can be provided through a configuration file called the `app-config.json` and should be present in the same -folder as where your `index.html` file is located of your deployment. - -!!! info - - Are you using the Docker image? Then you can specify the settings using environment variables, please see - [https://github.com/Netherlands3D/twin/blob/main/.docker/README.md](https://github.com/Netherlands3D/twin/blob/main/.docker/README.md) - for more information on using the Docker image and which variables are supported. - -This JSON file has the following structure -where `[...]` represents a placeholder where we omitted content for brevity -or clarity: - -```json -{ - "origin": { - "epsg": 7415, - "x": 161088, - "y": 503050, - "z": 500 - }, - "functionalities": { - [...] - } -} -``` - -Where functionalities contains a listing of each available functionality and whether they are enabled, and what -additional configuration they may have. - -The `origin` section defines the initial location of the world origin. It is recommended to keep the `epsg` code at -`7415` -representing the CRS [EPSG:7415](https://epsg.io/7415)- and provide the `x`, `y` and `z` coordinates in -*Rijksdriehoekformaat* with a height in *NAP*. The camera will initially be positioned at that location. - -Functionalities always follow this format: - -```json -{ - [...] - "functionalities": { - "[CODE]": { - "enabled": true/false, - "configuration": { - [...] - } - } - } -} -``` - -In the snippet above, `[CODE]` can be substituted with the functionality code string as defined in the application -more -on how to find this in the documentation on [functionalities](functionalities.md). - -`enabled` represents a boolean whether the functionality is enabled in the application or not and the `configuration` -json object represents the means to provide additional configuration for that functionality. If there is no additional -configuration or you want the functionality its defaults, you are free to omit the additional configuration section. - diff --git a/docs/docs/developers/functionalities.md b/docs/docs/developers/functionalities.md index 542a9fb..2e3b92f 100644 --- a/docs/docs/developers/functionalities.md +++ b/docs/docs/developers/functionalities.md @@ -8,18 +8,6 @@ the needs of a particular project. This ability to toggle functionalities on and off ensures that you have control over the features you want to deploy in your project. -## Configuring Functionalities - -Furthermore, each functionality can be individually configured according to specific project requirements. Read more -about this in detail in the chapter about [configuration](configuration.md). - -Through additional configuration settings, you have the flexibility to adjust the functionality's behavior and -characteristics to match your project's needs. You'll have access to a broad range of settings allowing you to refine -each element of your project in detail. - -To give some context to the above: examples of additional configuration options are API keys, URLs of services, -default values for new projects and more. - ## How does it work In Unity's context for the Netherlands3D platform, each functionality is encapsulated in a ScriptableObject. Exploring diff --git a/mkdocs.yml b/mkdocs.yml index 80aa67b..0b48665 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -10,7 +10,6 @@ nav: - 'docs/developers/index.md' - 'docs/developers/quickstart.md' - 'docs/developers/core-concepts.md' - - 'docs/developers/configuration.md' - 'Structure': - 'docs/developers/projects.md' - 'docs/developers/functionalities.md'