<div dir="ltr"><div>Hi,</div><div><br></div><div>Could be wrong but you may need to "sync" canvas with your QgsTemporalController e.g below method<br></div><div><br></div><div>iface.mapCanvas().setTemporalController(yourTemporalControllerInstance)<br></div><div><br></div><div><br></div><div>Regards</div><div><br></div><div>Thomas<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 27 août 2020 à 13:48, Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net">rdmailings@duif.net</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 8/27/20 12:45 PM, Richard Duivenvoorde wrote:<br>
> Hi,<br>
> <br>
> I'm registring a Temporal Layer fine now, but want to start the 'Temporal Controller' to start via PyQGIS (in a plugin).<br>
> <br>
> This class: QgsTemporalNavigationObject has the 'play()' methods etc.<br>
> <br>
> The QgsTemporalControllerWidget returns a temporalController..<br>
> <br>
> 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'.<br>
<br>
Ok, just found out that I can get the temporalController of the MapCanvas, and then at least play and stop the animations:<br>
<br>
c = iface.mapCanvas().temporalController()<br>
c.setFrameDuration(2)<br>
c.rewindToStart()<br>
#c.skipToEnd()<br>
#c.next()<br>
#c.previous()<br>
c.playForward()<br>
<br>
But on this instance of QgsTemporalController, I can NOT <br>
see <a href="https://qgis.org/pyqgis/master/core/QgsTemporalNavigationObject.html" rel="noreferrer" target="_blank">https://qgis.org/pyqgis/master/core/QgsTemporalNavigationObject.html</a><br>
use <br>
c.setTemporalExtents(range)<br>
or ask for the extents<br>
c.setTemporalExtents()<br>
or set the framerate <br>
c.setFramesPerSecond(2.0)<br>
etc:<br>
<br>
anybody can enlighten me?<br>
<br>
Regards,<br>
<br>
Richard <br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>