[Geoserver-devel] [JIRA] (GEOS-9410) GetLegendGraphic does not return title SLD Rule Title when only one rule is specified.

Chad Arsenault created an issue

GeoServer / BugGEOS-9410

GetLegendGraphic does not return title SLD Rule Title when only one rule is specified.

Issue Type:

BugBug

Affects Versions:

2.15.2

Assignee:

Unassigned

Attachments:

geoserver-GetLegendGraphic.png

Components:

styling

Created:

25/Nov/19 6:20 PM

Priority:

LowLow

Reporter:

Chad Arsenault

When attempting to fetch a legend that contains only a single rule set, the text from that legend is dropped from the output, leaving only the graphic element.

Example from GeoServer’s default Line style SLD:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" 
		xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" 
		xmlns="http://www.opengis.net/sld" 
		xmlns:ogc="http://www.opengis.net/ogc" 
		xmlns:xlink="http://www.w3.org/1999/xlink" 
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<!-- a named layer is the basic building block of an sld document -->

	<NamedLayer>
		<Name>Default Line</Name>
		<UserStyle>
		    <!-- they have names, titles and abstracts -->
		  
			<Title>A boring default style</Title>
			<Abstract>A sample style that just prints out a green line</Abstract>
			<!-- FeatureTypeStyles describe how to render different features -->
			<!-- a feature type for lines -->

			<FeatureTypeStyle>
				<!--FeatureTypeName>Feature</FeatureTypeName-->
				<Rule>
					<Name>Rule 1</Name>
					<Title>Blue Line</Title>
					<Abstract>A blue line with a 2 pixel width</Abstract>

					<!-- like a polygonsymbolizer -->
					<LineSymbolizer>
						<Stroke>
							<CssParameter name="stroke">#0000FF</CssParameter>
						</Stroke>
					</LineSymbolizer>
				</Rule>

		    </FeatureTypeStyle>
		</UserStyle>
	</NamedLayer>
</StyledLayerDescriptor>

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100114-sha1:aa2c529)

Atlassian logo