Geographic Information Systems Asked by yky on December 19, 2020
In QGIS 3.14 project I have a polygon layer with fixed names (zones) and I generate png figures (with pyqgis script) with the name of the zone to show them while hovering with map tip (Display).
However, the popup figures are refreshed only in some polygons, when I replace these png plots and in some polygons, old plots are shown which were already replaced. Is there a way to force QGIS to show latest files?
Here’s HTML I use to show the figures:
<img src="[% 'file:///' || "path_field" || 'plots/' || "zone_nm" || '_plot.png'%]"/>
I tried to trigger repaint or refresh all layers with the following code with no result.
layer.triggerRepaint()
canvas.refreshAllLayers()
adding '_plot.png'%]?cache=none"/>
also didn’t help
Note: I currently found a workaround by adding new field where I add a random number and also add this number to figure name and use it to generate path, but it doesn’t look like the best solution…
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP