0

I have a layer with two attribute columns: stop_name and schedule. I am animating this layer using Temporal Controller, so a dot displays on the map whenever the schedule time is active, as seen on this tutorial.

I would like to display the stop_name label whenever the relevant schedule attribute is active on Time Controller. I have tried, unsuccesfully, using CASE WHEN; however, I cannot figure out how to make this conditional dependant of what is displayed by the Temporal Controller.

1
  • 1
    Hello, sharing a code sample of what you have tried would be a good starting point for others to help you. Which mode of the Temporal Controller are you using ? Cases with tests on @map_start_time should to the job
    – Kasper
    Jan 2, 2023 at 19:14

1 Answer 1

1

Just create a lablel with the rule

@map_start_time <= "time" and "time" <= @map_end_time

enter image description here

and replace "time" with your datetime field.

Then set up the temporal settings of the layer to Redraw layer only.

enter image description here

Example result:

enter image description here

1
  • 1
    This solution works perfectly. In case it helps anyone else, using Separate Fields for Start and End Date/Time instead of Redraw layer only also works.
    – Trikelians
    Jan 2, 2023 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.