Using basemaps with QGIS temporal controller

QGIS 3.14

Old version:

for i, layer in enumerate(QgsProject.instance().mapLayers().values()):
    if isinstance(layer, QgsRasterLayer):
        mode = QgsRasterLayerTemporalProperties.ModeFixedTemporalRange
        tprops = layer.temporalProperties()
        tprops.setFixedTemporalRange(QgsDateTimeRange(QDateTime(QDate(2020, 1, 1), QTime(1, i, 0, 0), Qt.UTC),
                                                   QDateTime(QDate(2020, 1, 1), QTime(1, 1+i, 0, 0), Qt.UTC)))


One thought on “Using basemaps with QGIS temporal controller

  1. Hello, I want to know how to perform a time cut of a data set. I want these data that have different dates, stay for example, 14 days in a row, and then they stop showing up. In the attribute table, each point has a start date. As the data set is very extensive and is updated daily, I just want to tell the Temporal Controller how long the data will stay from the start date column. Do I do this in the “Expression” tool? How would it be?
    Thank you!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s