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

Feature/latest provider #3660

Merged
merged 5 commits into from
Nov 29, 2018
Merged

Feature/latest provider #3660

merged 5 commits into from
Nov 29, 2018

Conversation

edbrett
Copy link
Contributor

@edbrett edbrett commented Nov 26, 2018

Overview

When loading the map for the first time we are fetching all datasets and then manually deciding which latest endpoints to find. This is slow and tricky to maintain. In the API, on the params and decode params config we thave the URL for the endDate key which we can use to get the latest endpoint.

SO this PR adds a latest provider component which when the layers change on the map goes and gets any new latest endpoint needed (only the first time around) and then updates the params. Benefits:

  • map will load faster first time around
  • only fetching the latest endpoints we need
  • easier to maintain as it is universal for each layer

Testing

  • go to the map and add and remove forest change layers (glads, forma, terrai)
  • check loader show first time adding the layer
  • check timeline doesnt have current date

@dfrico
Copy link
Contributor

dfrico commented Nov 27, 2018

I've been reviewing this PR, although it does make the initial loading faster (from initial time being 3x next time to almost the same), I'm having doubts about this:

* check timeline doesnt have current date

I'm seeing the current date in the datepicker/timeline for GLAD and FORMA. Is this normal?

@edbrett
Copy link
Contributor Author

edbrett commented Nov 27, 2018

@blayhem so for example you should see 16th Nov as the last possible date for GLADs?
screen shot 2018-11-27 at 10 05 58

Maybe try clearing the url first?

@edbrett
Copy link
Contributor Author

edbrett commented Nov 27, 2018

@blayhem fixed!

@dfrico dfrico self-requested a review November 29, 2018 10:33
@edbrett edbrett merged commit 585d9cc into develop Nov 29, 2018
@edbrett edbrett deleted the feature/latest-provider branch November 29, 2018 10:35
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

Successfully merging this pull request may close these issues.

2 participants