[Geoserver-devel] [jira] (GEOS-6374) GetMapXmlReader allways uses default style for layergroup layers

Olle Markljung created an issue

GeoServer / BugGEOS-6374

GetMapXmlReader allways uses default style for layergroup layers

Issue Type:

BugBug

Affects Versions:

2.5-RC1

Assignee:

Andrea Aime

Attachments:

layergroup-wrong-style.xml, tiger-giant_polygon_tiger-poly_landmarks_tiger-tiger_roads_tiger-poi.png, tiger-ny.png

Created:

27/Feb/14 4:11 PM

Labels:

WMS

Priority:

MinorMinor

Reporter:

Olle Markljung

When making a GetMap POST request with XML body and having a layergroup as a NamedLayer the GetMapXmlReader take the default style for the layers in the layer group and not the configured one.

I modified the example data for the layer group tiger-ny so that the poi-layer uses the default point style instead of the default poi style.
When using GET GeoServer renders correctly. But with POST the default style is used despite the change in configuration.

For POST the resolve of parameters gives me
Styles = [StyleImpl[ name=giant_polygon], StyleImpl[ name=poly_landmarks], StyleImpl[ name=tiger_roads], StyleImpl[ name=poi]]

For GET it resolves correctly to
Styles = [StyleImpl[ name=giant_polygon], StyleImpl[ name=poly_landmarks], StyleImpl[ name=tiger_roads], StyleImpl[ name=point]]

For GET I can see that the merge is done in GetMapKvpRequestReader:L337-245.

For POST the merge seems to be done (or should be done) in GetMapXmlRequestReader.addStyles.

URL for GET:
http://localhost:8080/geoserver/wms?LAYERS=tiger-ny&STYLES=&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A4326&BBOX=-74.08349171875,40.634971066406,-73.943530351562,40.837401066406&WIDTH=354&HEIGHT=512
results in attached tiger-ny.png.

XML for POST is attached as layergroup-wrong-style.xml.
Resulting image is tiger-giant_polygon_tiger-poly_landmarks_tiger-tiger_roads_tiger-poi.png

I’m new to the GeoServer code but with some pointers I might be able to produce a patch.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo