Leaflet.TimeDimension
Leaflet.TimeDimension copied to clipboard
Panning and zooming doesn't clear the cache of timesteps
When I pan or zoom while playing, the cached images are still used at the different zoom/location. Is there a way to clear the cache of images?
What version are you using ? This should have been fixed #10
I'm using the version 0.1 that Bower pulls down.
(By the way, I need to provide feedback or fixes for that, as by default, Bower doesn't include all the required files...)
bower install leaflet-timedimension
Installed version 1.0.1 for me, and it has everything needed.
Check your bower.json file or use bower install --save leaflet-timedimension#^1.0.1
Hey, I'm sure you're a busy guy. But I'm experiencing a few issues, and I wonder if you're interested in working with me to sort them out? I've pushed my project to a repo here: https://github.com/alexgleith/tidemap and it's accessible here: http://maps-client.tidetech.org/. If you were to email me at alexgleith at gmail that would be fantastic! I'm keen to contribute to this project here, but need a bit of help initially, I think...
I'm changing timedimension layers out, and it often ends up doing weird things, such as adding duplicate layers or two time-series running at once. Also, the panning and zooming cache issue is occurring. Have a play with the live map, and I think you'll see what I mean.
I only scanned your code. But trying using play/pause instead of pause/continue. These are internal only, even if their names do not start with a dash.
Then I see that you are adding/removing the control. I'm not sure it can handle it. I did not super test that, but it may not remove all listeners correctly.
What happens if you just add one timedimension layer. Start small, if you want to find the cause.
I'm not sure why you are manually pausing/releasing the animation on moves, because the animation will wait until the next step is loaded to continue.
Thanks for looking.
I know I got a bit hacky with the pause/continue... since the zoom stuff wasn't working I was trying to get it working somehow!
So, with the control, I'd like to hide it when there are non-time layers. Is there a way to show/hide without add/removing it? Or can I destroy it completely somehow? I think this is a reasonable use-case. Unless I leave the timecontrol showing 'no time available' or whatever when it's a non-time layer...
And regarding doing it simply, if you view this: http://maps-client.tidetech.org/?layer=air_temperature_degC and turn on transparency (go to tools -> settings) then you can see it gets tangled up at ~timestep 7. I wonder if this is the point it does the filling of the cache? (I have it set to cache 25 steps and start loading at 20).
About the player, I am aware of this limitation : opened #56 for that.
Your WMS is painfully slow, and I can't help you more your code. Maybe that's a cause, try to increase loadingTimeout on timeDimension options (3sec default).
But start with a simple map, 1 layer, default options, no tricky modifications.