The WMS GetFeatureInfo returns an empty collection when querying a point layer that has a style the uses the sld:ElseFilter.
In GeoServer 2.9.0 it works as expected but in 2.11.1, 2.11.2 and 2.12-RC1 it does not.
I have reproduced this using the Manhattan (NY) points of interest demo layer in layer preview with the following style:
<?xml version=“1.0” encoding=“UTF-8”?>
<StyledLayerDescriptor version=“1.0.0” xmlns=“http://www.opengis.net/sld” xmlns:ogc=“http://www.opengis.net/ogc” xmlns:sld=“http://www.opengis.net/sld”
xmlns:xlink=“http://www.w3.org/1999/xlink” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd”>
<NamedLayer>
<Name>poi</Name>
<UserStyle>
<Name>poi</Name>
<Title>Points of interest</Title>
<Abstract>Manhattan points of interest</Abstract>
<FeatureTypeStyle>
<Rule>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>NAME</ogc:PropertyName>
<ogc:Literal>art</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name=“fill”>#FF0000</CssParameter>
<CssParameter name=“fill-opacity”>1.0</CssParameter>
</Fill>
</Mark>
<Size>11</Size>
</Graphic>
</PointSymbolizer>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name=“fill”>#EDE513</CssParameter>
<CssParameter name=“fill-opacity”>1.0</CssParameter>
</Fill>
</Mark>
<Size>7</Size>
</Graphic>
</PointSymbolizer>
</Rule>
<Rule>
<sld:ElseFilter/>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>square</WellKnownName>
<Fill>
<CssParameter name=“fill”>#FF0000</CssParameter>
<CssParameter name=“fill-opacity”>1.0</CssParameter>
</Fill>
</Mark>
<Size>11</Size>
</Graphic>
</PointSymbolizer>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>square</WellKnownName>
<Fill>
<CssParameter name=“fill”>#EDE513</CssParameter>
<CssParameter name=“fill-opacity”>1.0</CssParameter>
</Fill>
</Mark>
<Size>7</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Steps to reproduce:
- Using GeoServer 2.12-RC1 and the demo data
- Edit the poi style, replace with above style
- Open Manhattan (NY) points of interest as OpenLayers map in Layer preview
- Click on the circle (art), feature information is displayed
- Click on any square, no feature information is displayed
|