.. _wms_decorations: WMS Decorations =============== WMS Decorations provide a framework for visually annotating images from WMS with absolute, rather than spatial, positioning. Examples of decorations include compasses, legends, and watermarks. Configuration ------------- To use decorations in a :ref:`wms_getmap` request, the administrator must first configure a decoration layout. These layouts are stored in a subdirectory called ``layouts`` in the :ref:`data_directory` as XML files, one file per layout. Each layout file must have the extension ``.xml``. Once a layout ``foo.xml`` is defined, users can request it by adding ``&format_options=layout:foo`` to the request parameters. Layout files follow a very simple XML structure; a root node named layout containing any number of decoration elements. Each decoration element has several attributes: .. list-table:: :widths: 20 80 * - **Attribute** - **Meaning** * - ``type`` - the type of decoration to use (see :ref:`decoration_types`) * - ``affinity`` - the region of the map image to which the decoration is anchored * - ``offset`` - how far from the anchor point the decoration is drawn * - ``size`` - the maximum size to render the decoration. Note that some decorations may dynamically resize themselves. Each decoration element may also contain an arbitrary number of option elements providing a parameter name and value::