I am currently trying to grab the map extent of each page in my QGIS atlas. My python function uses the line:
which prints the extent just fine. The only problem is the numbers don't match the extent shown in the item properties under 'Extents'. When I draw the polygon from these coordinates the area it covers is huge. The labelled extent does not even update when I switch pages. I have already tried several code snipppets among that the one from: Getting extent of composer map in PyQGIS? which does not work with my QGIS 2.99 nor does it actually solve my problem.
Do I need to specify in my function that it should only grab the extent of the @currentfeature or is there something else wrong ?