Hi, Could be wrong but you may need to "sync" canvas with your QgsTemporalController e.g below method
iface.mapCanvas().setTemporalController(yourTemporalControllerInstance) Regards Thomas Le jeu. 27 août 2020 à 13:48, Richard Duivenvoorde <rdmaili...@duif.net> a écrit : > On 8/27/20 12:45 PM, Richard Duivenvoorde wrote: > > Hi, > > > > I'm registring a Temporal Layer fine now, but want to start the > 'Temporal Controller' to start via PyQGIS (in a plugin). > > > > This class: QgsTemporalNavigationObject has the 'play()' methods etc. > > > > The QgsTemporalControllerWidget returns a temporalController.. > > > > So I was guessing I need to ask current Temporal Widget to hand me it's > controller or navigation object to be able to start to 'play'. > > Ok, just found out that I can get the temporalController of the MapCanvas, > and then at least play and stop the animations: > > c = iface.mapCanvas().temporalController() > c.setFrameDuration(2) > c.rewindToStart() > #c.skipToEnd() > #c.next() > #c.previous() > c.playForward() > > But on this instance of QgsTemporalController, I can NOT > see https://qgis.org/pyqgis/master/core/QgsTemporalNavigationObject.html > use > c.setTemporalExtents(range) > or ask for the extents > c.setTemporalExtents() > or set the framerate > c.setFramesPerSecond(2.0) > etc: > > anybody can enlighten me? > > Regards, > > Richard > _______________________________________________ > QGIS-Developer mailing list > QGIS-Developer@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer