Skip to content

Layout map extents are incorrect when map is rotated  #60122

@dturner

Description

@dturner

What is the bug or the crash?

When rotating a map in print layout the map extents change even though they are constant values.

Steps to reproduce the issue

  • Create a new project

  • Add a Shapefile Layer, name it clipping_path

  • Set the Geometry type to Polygon and click OK

  • Edit the layer

  • Add a polygon feature

  • Draw a rectangle

  • Save the layer edits

  • Create a new Print Layout

  • Add a Map to the Print Layout

  • Scroll down to the Extents section and add the following expressions for X min and Y min:

x_min(layer_property('clipping_path', 'extent'))
y_min(layer_property('clipping_path', 'extent'))

This will obtain the extent values from the shape layer and use them to set the shape in the bottom left corner of the map.

image
  • Change the rotation to 90 degrees

Expected result

  • The rectangle shape remains perfectly aligned in corner of the map

Actual result

  • The rectangle shape is no longer aligned in the corner of the map
image

Versions

QGIS version3.40.1-Bratislava
QGIS code revision989853a7a31
 
Libraries
Qt version5.15.2
Python version3.9.5
GDAL/OGR version3.3.2
PROJ version8.1.1
EPSG Registry database versionv10.028 (2021-07-07)
GEOS version3.9.1-CAPI-1.14.2
SQLite version3.35.2
PDAL version2.3.0
PostgreSQL client versionunknown
SpatiaLite version5.0.1
QWT version6.1.6
QScintilla2 version2.11.5
OS versionmacOS 14.7
 
Active Python plugins
quick_map_services0.19.37
DEMto3D3.6
HCMGIS25.1.9
Qgis2threejs2.8
pointsamplingtool0.5.4
shapetools3.5.1
processing2.12.99
grassprovider2.12.99
db_manager0.1.20
MetaSearch0.3.6

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!Print LayoutsRelated to QGIS Print Layouts, Atlas or Reporting frameworks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions