Open xelaboy opened 6 years ago
Hi @xelaboy, Did you find any solution for this?
For now what I'm doing is listening for the event timeloading and update the velocity. Something like this:
map.timeDimension.on('timeloading', function (data) { if (data.time == map.timeDimension.getCurrentTime()) { axios.get('/wind', { params: { time: data.time}).then(function (result) { velocityLayer.setData(result.data) }); } });
For now what I'm doing is listening for the event timeloading and update the velocity. Something like this:
map.timeDimension.on('timeloading', function (data) { if (data.time == map.timeDimension.getCurrentTime()) { axios.get('/wind', { params: { time: data.time}).then(function (result) { velocityLayer.setData(result.data) }); } });
Thank a lot for your answer. I solved my issue.
For now what I'm doing is listening for the event timeloading and update the velocity. Something like this:
map.timeDimension.on('timeloading', function (data) { if (data.time == map.timeDimension.getCurrentTime()) { axios.get('/wind', { params: { time: data.time}).then(function (result) { velocityLayer.setData(result.data) }); } });
Could you pls explain in more detail? Do you have any demo to show? Currently I have a list of json files convert from grib files, and I want to put them into a Playback timeline.
Hi @lttrung24 ,
I'm sorry but I'm not using timeDimension anymore.
Even though the code that I posted here worked I ended up creating a simple time slider myself.
Best regards, Eduardo
Hi @k3bra, Great to hear from you. Would you mind sharing some document or suggestion about creating your time slider? Many thanks in advance!
Hello. I'm new around here and I'd like to know if it's possible to use TimeDimension with Velocity (https://github.com/danwild/leaflet-velocity). I mean, once I get the Velocity layer working, it would be possible to add this layer to the TimeDimension so that I get a time control to vizualize/animate the Velocity layer? I'm trying to use something like this, but without success:
Any help will be very apreciated. Thanks much.