Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other WMS requests being called #199

Open
bambryan opened this issue Sep 2, 2020 · 7 comments
Open

Other WMS requests being called #199

bambryan opened this issue Sep 2, 2020 · 7 comments

Comments

@bambryan
Copy link

bambryan commented Sep 2, 2020

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

@r1m
Copy link
Contributor

r1m commented Sep 4, 2020

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 ?

@bambryan
Copy link
Author

bambryan commented Sep 4, 2020

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.

Screen Shot 2020-09-04 at 11 00 20 AM

@r1m
Copy link
Contributor

r1m commented Sep 4, 2020

I'm sure not about your expectation. But you can try to hide the layer and show it only after changing the time.

@bambryan
Copy link
Author

bambryan commented Sep 16, 2020

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.

@r1m
Copy link
Contributor

r1m commented Sep 22, 2020

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 😄

@bambryan
Copy link
Author

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?

@r1m
Copy link
Contributor

r1m commented Sep 23, 2020

I guess. You can try to update the timedimension object before adding the layer. Be sure to wait for async call results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants