...
The YAML file can be edited in a text editor such as Notepad++. The following are the main sections of the YAML file which need to be configured for each layer:
Layers: the layers that are available in the service
Caches: where the cache is stored
Sources: where the source files are storedof the data to be cached
Grid: the Coordinate Reference System used in the layer, and the scales/resolutions available.
Troubleshooting configuration
Bear in mind the following when setting up a MapProxy installation:
the syntax and indentation shown in the example file and in the MapProxy documentation should be followed exactly in order to avoid errors
any errors will be recorded in the mapproxy.log file, which is normally in the same folder as the mapproxy.yaml file
you will need to make sure that any referenced folders are accessible by the MapProxy IIS application pool, and that the MapServer application pool has access to the source data and images
...
This section defines one or more layers to be served by MapProxy. Each layer should have:
name: used as a reference by Studio in the Details dialog
title: descriptive name for display purposes
sources: a reference to one or more sources defined elsewhere in the YAML file, defining the data to be displayed
...
This section defines the location of the cached data. The cache reference in the first line is referenced by the layers section, and the cache also identifies the source of the data.
Each cache will have:
grid: a reference to a grid definition elsewhere in the YAML file
sources: a reference to one or more source sections - if this is a MapServer WMS, the source include both the reference to the source name in the YAML file (e.g. aerial_wms_2013) and the name of the layer or group in the map file (e.g. aerial2013)
cache: details of the cache itself, containing
type: the type of cache storage
filename: the location of the cache
...
This section defines the source of the data to be displayed and cached. The type will normally either be:
...
...
tile: for example an existing tilecache on an iShare server
The Sources section will contain one or more sources, of which a single layer can reference one or more. The first line of the source will be used in the sources section of the layer as a reference. Each source will also have:
type: this will usually either be tile, referencing an existing tilecache, or wms, referencing a WMS service, either in iShare or externallythe type of source being referenced
wms: for example a MapServer layer configured in Studio, or an external WMS
tile: for example an existing tilecache on an iShare server
grid: a reference to a grid definition elsewhere in the YAML file
url: the location for the tilecache or WMS
...
This section contains details of the coordinate reference system used by the cache. The first line contains the referenced used by the caches section. Each grid contains:
origin: the origin point of the grid in relation to the grid area - the default is sw
srs: the coordinate reference system/spatial reference system being used by the data, using the EPSG code
bbox: the bounding box of the grid, i.e. the extent of the data, using the units specified in bbox_srs
bbox_srs: the SRS of the units specified in bbox
res: the resolutions that MapProxy will cache - see the section below on Adding Scales for more detail on this.
...