qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.65k stars 3.01k forks source link

QGIS problem when combining label background #59565

Open DariusTerrance opened 3 days ago

DariusTerrance commented 3 days ago

What is the bug or the crash?

I need to create a QGIS project where, along a “line” geometry, there are point elements representing road signs. Each point element should be styled with the sign image (in raster or SVG format), accompanied by a panel indicating a distance. I have attached an example of a road sign for reference.

Each point element has an attribute called “label_km” that contains the distance label to be displayed below the sign symbol.

To implement the project, I considered the following options:

Symbolization without labels: using symbology to combine the road sign symbol with a rectangular ellipse as a background. However, with this approach, the symbols remain bound to the geometry, and leader lines cannot be used. For this reason, this option was discarded.

Using labels with background enabled: activating labels to position the sign image and the ellipse, allowing both repositioning and leader lines. This solution was implemented.

Issues Encountered With option 2, the map view result is satisfactory. However, in the print layout, changing the layout zoom (not the map zoom) distorts the combined symbol, and the PDF export does not accurately reflect what is shown in the map view.

Project is attached. QGIS PRJ.zip

Steps to reproduce the issue

  1. Enable label background;
  2. Choose single symbol;
  3. Add 2 SVG symbol layered.
  4. Open layout viewport;
  5. Changing the layout zoom (not the map zoom) distorts the combined symbol

Versions

3.40

Supported QGIS version

New profile

Additional context

No response

DelazJ commented 3 days ago

Hi @DariusTerrance I didn't look at your project file yet but could this be a projection issue? Not related to your issue but to your need, would this feature be of help to you: https://qgis.org/project/visual-changelogs/visualchangelog340/#feature-add-linear-referencing-symbol-layer-type?