Opened 3 years ago
Closed 3 years ago
#2556 closed enhancement (fixed)
petascope - legend for WMS styles
Reported by: | Bang Pham Huu | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 10.0 |
Component: | petascope | Version: | 9.8 |
Keywords: | Cc: | Dimitar Misev, Vlad Merticariu | |
Complexity: | Medium |
Description
For each WMS style, we need to allow the admin to define a legend url (type string). The legend url should be stored in the layer definition, under:
<element ref="wms:LegendURL" minOccurs="0" maxOccurs="unbounded"/>
example:
<Style> <Name>osm:osm_water_areas</Name> <Title>osm:osm_water_areas</Title> <LegendURL width="22" height="120"> <Format>image/png</Format> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="https://ahocevar.com/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=osm%3Awater_areas"/> </LegendURL> </Style>
- admin can provide text as legend url (could be an url or base64 encoded binary image data)
- the provided legend url should be available in the layer definition
- add support for
GetLegendGraphic
request (only for request, layer and style parameters), which would simply return the legend url if one is defined for the style, example: https://ahocevar.com/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=osm%3Awater_areas
Note:
See TracTickets
for help on using tickets.