2

I work with various WMS (hydrogeology) layers in QGIS. I have a layout with a map, and I added 8 polylines (arrows showing various groundwater flow directions), onto the map.

Later I found out there is a well (with a point symbol) I want to show in the map, outside, e.g. in a distance to the west of cca 20 % of the map width.

How can I pan my map content or change its scale to show the well, without the need to rearrange the poly- arrows, so they would be in their places in the map after the change of the extent?

Prior to this post, I made it the complicated way - I changed the aspect ratio of the map, panned it to the east, then placed the arrows correctly.

I´m curious if there is some way to synchronize the map panning with other layout items (polygons, pictures, text etc) in it, or to link the positions of the items, then move them all at once in the second step.

2 Answers 2

4

The core of the issue is that you are trying to represent data using layout items instead of data layers. If you want the arrows to remain in the correct position when you pan the map, then add a data layer with points and set their symbology to arrows with a rotation attribute and use this to set the symbol rotation. Then you can pan and scale the map to your heart's content.

4

I agree with @TeddyTedTed answer but if you dont feel that you need to create new data layer for this specific need there is another solution.

With a recent enough QGIS version (at last 3.22), you could draw your shape as annotation on an annotation layer. (or several different annotation layer if needed)

Annotation could be of any type (Polygon, line, point or text) and could be styled on a per object basis using all of QGIS’ symbology and labelling options (that mean that you could use a point annotation with a raster image marker to display picture for exemple).

As annotation are drawn on the main map canvas they are "location aware" meaning that they will move and scale with your map, both in the main map canvas and in the print layout.

The downside is that you can only show object inside the map element of the print composer (ie. it won't work for arrow pointing from an objet outside the map element) and you will need to go back to the the main map canvas to modify them. Also annotation are stored in the project file so you wont be able to reuse them in another project later, keep this in mind when choosing to use annotation rather than creating data.

1
  • 1
    I did not know this, thanks J.R! Commented Nov 3, 2022 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.