I'm using QR-Codes generated dynamically inside an HTML element on the atlas-maps in QGIS. The map has the id:map2 and the QR-code gives the quickest route to this place using Google Maps. This works fine, but in an atlas sometimes the QR-code does not reflect the actual map center, it stays with the QR-code of the former map, so that users are dirrected to the wrong place.
Is there a way to force QGIS to do a refresh of the HTML-code after the map has changed? Here the code I use inside the HTML element (the project SRID is EPSG:3857 and it needs to be transformed to EPSG:4326 for Google Maps):
<img src = "[% 'http://api.qrserver.com/v1/create-qr-code/?size=350x350&margin=5&data=url_quote (''https%3A%2F%2Fwww.google.com%2Fmaps%2Fdir%2F%3Fapi%3D1%26basemap%3Dsatellite%26destination%3D' ||y(transform(map_get( item_variables( 'map2'), 'map_extent_center' ),'EPSG:3857', 'EPSG:4326')) ||'%2C' ||x(transform(map_get( item_variables( 'map2'), 'map_extent_center' ),'EPSG:3857', 'EPSG:4326'))%]" style="width: auto; height: 100%; display: block; margin: 0px 0px 0px auto;" />
Even with the 'QR Barcode Layout Item' from the QGIS Plugins Repository I had this issue.