-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QGIS Server GetPrint: HIGHLIGHT_GEOM is not printed if map layers are configured to follow a map theme #34178
Comments
please attach a project and data to reproduce. |
Test projectI've created a very simple project with two layers and two layouts. The project is inside the same geopackage. CapabilitiesThe geopackage should be stored some where on the server, where QGIS Server can have access. RequestsTo test QGIS Server, we issue two The difference between the two reuests are hthe layout configuration. One has the layers locaked to a spcific theme, while the other doesn't. Request (Layout 1 copy layout has "Follow theme" selected)This request fails to show the highlight on the output. curl 'http://qgis.demo/cgi-bin/qgis_mapserv.fcgi' -H 'Content-Type: image/png' --data-binary 'MAP=geopackage:/home/qgis/projects/severdovouga.gpkg%3FprojectName=highlight&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetPrint&FORMAT=png&TRANSPARENT=true&TEMPLATE=Layout 1 copy&DPI=400&SRS=EPSG:3763&map0:extent=-16229.391033824511,120835.22371531081,-15816.92146617551,121100.47745656419&LAYERS=severdovouga&map0:HIGHLIGHT_GEOM=POLYGON((-16193.624023437511 120987.775390625,-15914.676757812511 121116.1796875,-15852.688476562511 120930.21484375,-16113.924804687511 120819.521484375,-16193.624023437511 120987.775390625))&map0:HIGHLIGHT_SYMBOL=<StyledLayerDescriptor><UserStyle><Name>Highlight</Name> <FeatureTypeStyle> <Rule> <PointSymbolizer> <Graphic> <Mark> <WellKnownName>circle</WellKnownName> <Fill> <CssParameter name="fill">%236699FF</CssParameter> </Fill> <Stroke> <CssParameter name="stroke">%23ffffff</CssParameter> <CssParameter name="stroke-width">2</CssParameter> </Stroke> </Mark> <Size>8</Size> </Graphic> </PointSymbolizer> </Rule> </FeatureTypeStyle> <FeatureTypeStyle> <Rule> <LineSymbolizer> <Stroke> <SvgParameter name="stroke">%23ffffff</SvgParameter> <SvgParameter name="stroke-width">5</SvgParameter> <SvgParameter name="stroke-linecap">round</SvgParameter> </Stroke> </LineSymbolizer> </Rule> </FeatureTypeStyle> <FeatureTypeStyle> <Rule> <LineSymbolizer> <Stroke> <SvgParameter name="stroke">%236699FF</SvgParameter> <SvgParameter name="stroke-width">3</SvgParameter> <SvgParameter name="stroke-linecap">round</SvgParameter> </Stroke> </LineSymbolizer> </Rule> </FeatureTypeStyle> <FeatureTypeStyle> <Rule> <PolygonSymbolizer> <Fill> <CssParameter name="fill">%236699FF</CssParameter> </Fill> <Stroke> <CssParameter name="stroke">%23ffffff</CssParameter> <CssParameter name="stroke-width">2</CssParameter> </Stroke> </PolygonSymbolizer> </Rule> </FeatureTypeStyle></UserStyle></StyledLayerDescriptor>' --compressed --output notok.png OutputRequest (Layout 1 layout doesn't have "Follow theme" selected).The output is properly rendered, with the highlight geometry, as requested. curl 'http://qgis.demo/cgi-bin/qgis_mapserv.fcgi' -H 'Content-Type: image/png' --data-binary 'MAP=geopackage:/home/qgis/projects/severdovouga.gpkg%3FprojectName=highlight&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetPrint&FORMAT=png&TRANSPARENT=true&TEMPLATE=Layout 1&DPI=400&SRS=EPSG:3763&map0:extent=-16229.391033824511,120835.22371531081,-15816.92146617551,121100.47745656419&LAYERS=severdovouga&map0:HIGHLIGHT_GEOM=POLYGON((-16193.624023437511 120987.775390625,-15914.676757812511 121116.1796875,-15852.688476562511 120930.21484375,-16113.924804687511 120819.521484375,-16193.624023437511 120987.775390625))&map0:HIGHLIGHT_SYMBOL=<StyledLayerDescriptor><UserStyle><Name>Highlight</Name> <FeatureTypeStyle> <Rule> <PointSymbolizer> <Graphic> <Mark> <WellKnownName>circle</WellKnownName> <Fill> <CssParameter name="fill">%236699FF</CssParameter> </Fill> <Stroke> <CssParameter name="stroke">%23ffffff</CssParameter> <CssParameter name="stroke-width">2</CssParameter> </Stroke> </Mark> <Size>8</Size> </Graphic> </PointSymbolizer> </Rule> </FeatureTypeStyle> <FeatureTypeStyle> <Rule> <LineSymbolizer> <Stroke> <SvgParameter name="stroke">%23ffffff</SvgParameter> <SvgParameter name="stroke-width">5</SvgParameter> <SvgParameter name="stroke-linecap">round</SvgParameter> </Stroke> </LineSymbolizer> </Rule> </FeatureTypeStyle> <FeatureTypeStyle> <Rule> <LineSymbolizer> <Stroke> <SvgParameter name="stroke">%236699FF</SvgParameter> <SvgParameter name="stroke-width">3</SvgParameter> <SvgParameter name="stroke-linecap">round</SvgParameter> </Stroke> </LineSymbolizer> </Rule> </FeatureTypeStyle> <FeatureTypeStyle> <Rule> <PolygonSymbolizer> <Fill> <CssParameter name="fill">%236699FF</CssParameter> </Fill> <Stroke> <CssParameter name="stroke">%23ffffff</CssParameter> <CssParameter name="stroke-width">2</CssParameter> </Stroke> </PolygonSymbolizer> </Rule> </FeatureTypeStyle></UserStyle></StyledLayerDescriptor>' --compressed --output ok.png Output |
@jgrocha I can reproduce the issue but I'm not sure it's a bug: the theme 'One' does not contain the polygon layer so I guess it's expected to not see it in the output even if highlight is set. |
mmm rethinking this it might be a bug, let me check the code. |
Confirmed bug |
Is this bug affected 3.16 ? |
Describe the bug
The
HIGHLIGHT_GEOM
is handy to print some additional geometry on top of an existing layout.If the user chooses to "follow a map theme", in the map properties, the additional geometry is not printed. The layers printed are the ones on the theme, as expected, but not the
HIGHLIGHT_GEOM
.In my use case, I want to provide always the same layers to be printed (a set of official layers) plus the geometry (the parcel) edited by the user on the web.
This can be considered a feature request.
How to Reproduce
Using two almost identical layouts (one the "follow a map theme" set and the other not) and issue a GetPrint request with an additional geometry.
QGIS and OS versions
QGIS Master
The text was updated successfully, but these errors were encountered: