Hi,
I'm trying to modify the values of the latitude, longitude and zoom signals in order to have a global view of France and then, after a certain time (5s), zoom on a city (Paris in the example below). And back to the original view, and zoom, ...
And I'm getting various results, but not the one I want.
Here's the code:
{
$schema:https://vega.github.io/schema/vega/v5.17.0.json
config:{
kibana:{
type:map
zoom:5.5
latitude:46.5
longitude:3.15
delayRepaint:true
}
}
signals:[
{name:"scheduler",init:'0',on:[{events:"timer{5000}",update:"if(scheduler==2,0,scheduler+1)"}]}
{name:"longitude",update:"if(scheduler=='0'||scheduler=='2',3.15,2.325)"}
{name:"latitude",update:"if(scheduler=='0'||scheduler=='2',46.5,45.61)"}
{name:"zoom",update:"if(scheduler=='0'||scheduler=='2',5.5,10)"}
]
}
When checking the signal values with VEGA_DEBUG.view.getState()
, they are coherent with the code but the visualisation doesn't follow.
Each signal change independently functions.
But if I try all of them at the same time, depending on their order in the signals block, I can see a mix of changes (ex.: only zoom, or zoom and latitude but not longitude...) but not all three.
Tried by using a different timer signal for each signal, but no change.
Also, when for example latitude and longitude changes are taken into account, I see the visualisation move first for latitude, then for longitude. The visualisation doesn't "jump" directly to the new (latitude, longitude).
Is there a way to make the move "smoothly"?
Regards.