Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ e.g. `$CONFIG_PATH/default/*.json`. The default tenant name is `default`.
Example:
```json
{
"$schema": "https://raw.githubusercontent.com/qwc-services/sogis-ccc-config/master/schemas/sogis-ccc-config.json",
"$schema": "https://github.com/qwc-services/sogis-ccc-config/raw/master/schemas/sogis-ccc-config.json",
"service": "mapinfo",
"config": {
"clients": [<Client configuration, see below>, ...],
"ccc_service_url": "ws://localhost:8081/ccc-service",
"zoomto_data_service_url": "http://qwc-data-service:9090",
"zoomto_min_scale": 1000,
"zoomto_full_extent": [2590983.475, 1212806.115, 2646267.025, 1262755.009],
Expand All @@ -35,9 +36,10 @@ Example:

Config options in the config file can be overridden by equivalent uppercase environment variables.

| Variable | Description |
| Variable | Description |
|---------------------------|--------------------------------------------------------|
| `CLIENTS` | JSON serialized CCC client configuration, see below. |
| `CCC_SERVICE_URL` | CCC server address |
| `ZOOMTO_DATA_SERVICE_URL` | Url to the the data service. |
| `ZOOMTO_MIN_SCALE` | Integer specifying the minimum zoom scale denominator. |
| `ZOOMTO_FULL_EXTENT` | JSON serialized array of full canton extent. |
Expand All @@ -50,7 +52,6 @@ The CCC client configuration is a JSON object of the form

{
"<appId>": {
"cccServer": "<ccc server address>",
"title": "<Client window title>",
"map": "<map name>",
"editGeomType": "<Point|LineString|Polygon>",
Expand All @@ -76,7 +77,6 @@ The CCC client configuration is a JSON object of the form
}

* `appId` corresponds to the application id which passed by the application to the web client via the `appintegration` query parameter.
* `cccServer` is the CCC server address, for example `ws://localhost:8081/ccc-service`.
* `title` is the window title to be displayed in the web client.
* `map` the name of the map to load when the web client is opened by the application.
* `editGeomType` specifies the type of geometry which is to be created on `createGeoObject`.
Expand Down
13 changes: 7 additions & 6 deletions schemas/sogis-ccc-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/qwc-services/sogis-ccc-config/master/schemas/sogis-ccc-config.json",
"$id": "https://github.com/qwc-services/sogis-ccc-config/raw/master/schemas/sogis-ccc-config.json",
"title": "CCC configuration Service",
"type": "object",
"properties": {
Expand All @@ -9,7 +9,7 @@
"description": "Reference to JSON schema of this config",
"type": "string",
"format": "uri",
"default": "https://raw.githubusercontent.com/qwc-services/sogis-ccc-config/master/schemas/sogis-ccc-config.json"
"default": "https://github.com/qwc-services/sogis-ccc-config/raw/master/schemas/sogis-ccc-config.json"
},
"service": {
"title": "Service name",
Expand All @@ -27,6 +27,10 @@
"$ref": "#/definitions/ClientConfig"
}
},
"ccc_service_url": {
"description": "Default CCC server address. Example: ws://localhost:8081/ccc-service",
"type": "string"
},
"zoomto_data_service_url": {
"description": "Url to the the data service",
"type": "string",
Expand Down Expand Up @@ -93,6 +97,7 @@
},
"required": [
"clients",
"ccc_service_url",
"zoomto_full_extent",
"zoomto_config"
]
Expand All @@ -105,9 +110,6 @@
"id": {
"type": "string"
},
"cccServer": {
"type": "string"
},
"title": {
"type": "string"
},
Expand Down Expand Up @@ -155,7 +157,6 @@
}
},
"required": [
"cccServer",
"editGeomType",
"id",
"map",
Expand Down
1 change: 1 addition & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def get(self):
api.abort(404, 'No configuration for application ' + appId)

appConfig = app_config[0]
app_config["cccServer"] = config.get("ccc_service_url")

if not "minEditScale" in appConfig:
appConfig["minEditScale"] = config.get("zoomto_min_scale")
Expand Down