Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
QGIS - Refresco de capa cada 1 segundo
# QGIS >= 2.12
import time
def refrescar():
layer = iface.activeLayer() #estando la capa activa...
#layer = QgsMapLayerRegistry.instance().mapLayersByName("nombreDeCapa")[0] #por nombre
layer.dataProvider().forceReload()
layer.triggerRepaint()
#print("Refresco")
time.sleep(1)
while True:
refrescar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.