Commit 3287eeae authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files
parent a92f72aa
...@@ -980,17 +980,18 @@ class EOTimeSeriesViewer(QgisInterface, QObject): ...@@ -980,17 +980,18 @@ class EOTimeSeriesViewer(QgisInterface, QObject):
def moveTo(self, date: QDateTime = None, def moveTo(self, date: QDateTime = None,
geometry: typing.Union[SpatialPoint, SpatialExtent] = None): geometry: typing.Union[SpatialPoint, SpatialExtent] = None):
# set temporal subset, i.e. current date # set geometry first, e.g. on zoom operations
if date:
self.setCurrentDate(date)
if isinstance(geometry, SpatialPoint): if isinstance(geometry, SpatialPoint):
self.setSpatialCenter(geometry) self.setSpatialCenter(geometry)
elif isinstance(geometry, SpatialExtent): elif isinstance(geometry, SpatialExtent):
self.setSpatialExtent(geometry) self.setSpatialExtent(geometry)
else: elif geometry is not None:
print('Unsupported moveTo action') print('Unsupported moveTo action')
# set temporal subset, i.e. current date
if date:
self.setCurrentDate(date)
def setCurrentDate(self, tsd: TimeSeriesDate, show_if_hidden: bool =True) : def setCurrentDate(self, tsd: TimeSeriesDate, show_if_hidden: bool =True) :
""" """
Moves the viewport of the scroll window to a specific TimeSeriesDate Moves the viewport of the scroll window to a specific TimeSeriesDate
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment