The Flight Animation example from Openlayers shows how to animate LineStrings and draw them subsequently on a map.
I am confused about the following line of code:
tileLayer.on('postrender', animateFlights);
Why does the animation rely on the postrender event of the TileLayer? Is there a way to uncouple that and make the animation work without the flightsLayer knowing about the tileLayer?
I tried to rely on the postrender event of flightsLayer, but it somehow never triggers, probably due to the styleFunction returning null, however I don't understand the inner workings of that.