gws.gis.mpx.config
¶
MapProxy configuration module for GWS.
This module provides functions and classes to create and manage MapProxy configurations.
Source code: gws.gis.mpx.config
Module Contents¶
- gws.gis.mpx.config.CONFIG_PATH¶
- gws.gis.mpx.config.create(root: gws.Root) Dict[str, Any] | None ¶
Create a MapProxy configuration from the GWS root object.
This function collects configuration from all layers that provide MapProxy configuration and builds a complete MapProxy configuration.
- Parameters:
root – The GWS root object.
- Returns:
A dictionary containing the complete MapProxy configuration, or None if no layers provide MapProxy configuration.
- gws.gis.mpx.config.create_and_save(root: gws.Root) Dict[str, Any] | None ¶
Create a MapProxy configuration and save it to disk.
This function creates a MapProxy configuration and saves it to the configured path. It also validates the configuration by attempting to load it with MapProxy.
- Parameters:
root – The GWS root object.
- Returns:
The created configuration dictionary, or None if no configuration was created and force start is not enabled.
- Raises:
gws.Error – If the configuration is invalid.
- gws.gis.mpx.config.DEFAULT_CONFIG¶