Open viper4gh opened 9 years ago
Maybe same problem if you zoom in and out the google map, then a transition is also not needed.
https://developers.google.com/maps/documentation/javascript/events API events for catching a zoom change for example.
If a session changes from quali to race for example, the cars are set to their new position in the start grid. This should happen without transition.
If you set DisplayDuration to 0 and you zoom the map all markers hold the correct coordinates on the map, only with transition with ease the markers hang on wrong positions, before they jump back to the correct coordinates. Check if transition.interrupt function can help.
If the time between to worker runs is extrem short it is not sufficient to set StopTransitionDelay to true for only one worker run. Zooming in Google maps needs some time. A solution could be using a timer where the StopTransitionDelay=true is for example 500 ms active.
Relevant SessionState changes where StopTransitionDelay should be set to true: Lobby ("NO_PARTICIPANT_TestData"/PosX=271 --> Loading (driverarray with names ""/PosX=0) Loading(driverarray with names ""/PosX=0) -> Race (Real PosX data)
https://www.youtube.com/watch?v=UEhY86IYT6M
Analyse_SessionState_Change.txt
The DS API provides driver data with default values on SessionState Loading. The PosX, PosY and PosZ values are 0. Further this data is available two worker runs before the the session switches from Lobby to Loading. See line 188 at Analyse_SessionState_Change.txt.
During the SessionState switch from Loading to Race the data is also not consistent. Some worker runs after the switch to Race, the PosX data is still 0, then Name switches from "" to the real name for first driver for example, PosX is still 0. Other drivers in the array have a real PosX value (see video at 0:29).
For CREST mode we need first of all the SessionStates. Update: SessionState available now. Check which State is when active.
If the map changes and the new positions are far away from the old ones, the markers sometimes moves with transition and sometimes with intermediate steps to the final position.
A solution could be to set the transtions time to 0ms at a map change and after it back to the value before. Second solution: use the function transform instead of transformWithEase.
You can se it here at 6:24: https://www.youtube.com/watch?v=mIhFekqmO30