3

I am using Qgis 1.7 and I want to refresh the mapcanvas so I am using refresh() function of QgsMapcanvas class and Nothing is happening to the Map Canvas. I am using Python for customizing

5

I use

self.iface.mapCanvas().refresh()            

in Time Manager plugin and it works. You can check the source on Github.

| improve this answer | |
4

In QGis 2.16, with refresh() still nothing is happening. I use this command to refresh all layers:

self.iface.mapCanvas().refreshAllLayers() 
| improve this answer | |
  • 1
    To expand on this .refresh() "Repaints the canvas map" whereas .refreshAllLayers() will "Reload all layers, clear the cache and refresh the canvas" - from the docs – Jonny Mar 21 '19 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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