Skip to content

Commit e005e26

Browse files
committed
Update legend service documentation
1 parent c5253f9 commit e005e26

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

src/topics/LegendGraphics.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,22 @@ Mount the legend folder into the `qwc-legend-service` container, i.e.:
2929

3030
Then, legend images will be searched for in this order (the first one found is used):
3131

32-
* A `<legend_images_path>/<service_name>/<layername><suffix>.png` file, where
33-
* `service_name` is the name of the WMS service
34-
* `layername` is the WMS layer name
35-
* `suffix`: empty, or one of `_thumbnail`, `_tooltip`. The suffix is passed by QWC to the legend service depending on the requested image type.
36-
* A `<legend_images_path>/<legend_image>` file with `legend_image` as specified for the desired layer in the `legend` service configuration, for example:
32+
- A filename matching `<legend_images_path>/<service_name>/<layername>_<style>_<suffix>.png`
33+
- A filename matching `<legend_images_path>/<service_name>/<layername>_<suffix>.png`
34+
- A filename matching `<legend_images_path>/<service_name>/default_<suffix>.png`
35+
- A filename matching `<legend_images_path>/<service_name>/<layername>_<style>.png`
36+
- A filename matching `<legend_images_path>/<service_name>/<layername>.png`
37+
- A filename matching `<legend_images_path>/<resource_entry[legend_image]>`
38+
- A filename matching `<legend_images_path>/<service_name>/default.png`
39+
- As base64, as set in `<resource_entry[legend_image_base64]>`
40+
41+
Where
42+
43+
* `service_name` is the name of the WMS service
44+
* `layername` is the WMS layer name
45+
* `suffix`: empty, or one of `_thumbnail`, `_tooltip`. The suffix is passed by QWC to the legend service depending on the requested image type.
46+
* `resource_entry[legend_image]` and `resource_entry[legend_image_base64]` are the `legend_image` resp. `legend_image_base64` settings of a layer as configurd in the `legend` service resource configuration, for example:
47+
3748
```json
3849
{
3950
"name": "legend",
@@ -47,7 +58,8 @@ Then, legend images will be searched for in this order (the first one found is u
4758
"layers": [
4859
{
4960
"name": "<layer_name>",
50-
"legend_image": "edit_points.png"
61+
"legend_image": "edit_points.png",
62+
"legend_image_base64": "<base64_string>"
5163
}
5264
]
5365
}
@@ -56,4 +68,3 @@ Then, legend images will be searched for in this order (the first one found is u
5668
}
5769
}
5870
```
59-
* A `<legend_images_path>/default<suffix>.png` file for a default legend image, with `suffix` as documented above.

0 commit comments

Comments
 (0)