I have a world map polygons (vectors) on QGIS 3.28, and i want to add flag on each country. I have already a svg flag for each country on a field, but flags are represented like a mosaic: enter image description here

I try to use map units, pixels, points ... but flag are always misplaced and change when i zoom/unzoom. enter image description here How to simply stretch the svg on the polygon and fix it for all scales ?

1 Answer 1


I have found this formula for the width with map units: array_max (array (bounds_height( $geometry),bounds_width( $geometry))) Here: https://www.reddit.com/r/QGIS/comments/17ubbuv/what_is_the_best_way_to_design_flag_maps_in_qgis/

The result is not perfect, but flags don't move and fill roughly the dimensions of polygons: enter image description here

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.