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

WV-2974 optimize map rendering #5261

Merged
merged 3 commits into from
Jun 5, 2024
Merged

Conversation

PatchesMaps
Copy link
Contributor

@PatchesMaps PatchesMaps commented Jun 3, 2024

Description

As it currently stands, when you toggle the visibility of a layer, the map re-requests / reloads all visible layers. This can slow down the app's interactivity, especially when dynamically generated layers are visible since they take longer to load.

On a related note, it appears that layers are loaded serially rather than in parallel. This is also particularly noticeable when dynamically generated layers are involved since they can block the loading of the much faster GIBS-based layers.

This PR prevents layer creation errors and tile load errors from blocking map updates.

How To Test

  1. git checkout WV-2974-optimize-map-rendering
  2. npm run watch
  3. Go to this link
  4. The Coastlines layer should be visible and the loading spinner should go away.
  5. Go to this link
  6. Toggle the layers visibility's on and off and observe that the layers do not reload when visibility is toggled.

PR Submission Checklist

This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have added necessary documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • Any dependent changes have been merged and published in downstream modules (if applicable)

Merging

Please use the squash and merge commit method unless each commit in your branch is vital to the commit history of main.

@nasa-gibs/worldview

@PatchesMaps PatchesMaps self-assigned this Jun 3, 2024
@PatchesMaps PatchesMaps marked this pull request as draft June 3, 2024 18:54
@minniewong minniewong added this to the v4.41.0 milestone Jun 3, 2024
@PatchesMaps PatchesMaps marked this pull request as ready for review June 3, 2024 20:36
@PatchesMaps PatchesMaps merged commit 9bc1f31 into develop Jun 5, 2024
4 checks passed
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.

None yet

4 participants