Open bambryan opened 3 years ago
it calls for the layer with no time dimension in the web
Do you add both the seed layer and the timedimension one to the map ? You must not.
It also then requests the first and second time steps.
It prefetches next layers to reduce loading times when the playback starts. You can customize buffer
and minBufferReady
options on the player.
But Is it configure with loop:true
?
I am only adding the TD layer as shown in the screenshot attached. I am fine with the loading of other frames from the beginning of the timeline.
I'm sure not about your expectation. But you can try to hide the layer and show it only after changing the time.
The expectation is that there is extra calls happening when the layer is loaded initially. The layer is added to the map using the code above in the screenshot. The layer is an hour of time at 2 minute steps. The script pulls the available times from the Postgis DB and gives them to the plugin then tells the plugin to goto the last available time. This is fine but it's calling for the layer without a time dimension, oldest 2 steps and the most current. So I'm confused on why it is calling for the layer without a time dimension all together when it's being added to the map by the plugin.
Sample #2 also does it. If you inspect or watch the network request of images you will see multiple times being requested at the start and also tiles that have no time dimension specified.
Because it doesn't wait for the getCapabilities response. And default time value is empty. Maybe we can check availableTime in _update function and do not add/remove the layer when the array is empty.
This may be a breaking change so it might be better to add an option to change the behavior. Any PR is welcome 😄
I'm not using getCababilities to get my times. I"m using a function to ping the PostGIS database for available times. So if I set the default time value to current time then it shouldn't do what it's doing?
I guess. You can try to update the timedimension object before adding the layer. Be sure to wait for async call results.
I have been looking at my making my page more efficient and found that when my map loads at zoom level 9 with 1 layer with time dimension of 30 min period and 2 min time steps, it calls for the layer with no time dimension in the web request and then it calls for the last frame which is the time dimension that I am forcing the slider to move to at time of load. It also then requests the first and second time steps. Not sure if it's something I have done with my coding or if others are seeing this.
Thanks Bryan