Skip to content

WDFN-847 - Investifix the drawing of the NLDI layers on the map.

Bucknell, Mary S. requested to merge mbucknell/waterdataui:wdfn-847 into main

Before making a pull request

  • Put the appropriate EXEMPT flag if needed in the MR label (see https://practices.wma.chs.usgs.gov/practice/peer_code_review/)
  • Run all linters (make lint)
  • Run all tests (make test)
  • Update the changelog appropriately
  • If making a release, update code.json metadataLastUpdated and bump CHANGELOG.md to next version.

Description

Previous to this change we would add layers for the three NLDI layers in one procedure call each time one was fetched. This resulted in a different number of layers per feature being rendered, from one to three (if the layer was the first received). To help with this problem and to simplify the MapApp component, I moved the NLDI fetching code into the MonitoringLocationMap component which is the only place it is needed. This puts the code for fetching the geoJSON directly in the MonitoringLocationMap location which makes the code easier to understand and eliminates three properties from being used for the component.

I also eliminated some unneeded test set up in MapApp.test.js (where the tests changed since the NLDI fetching was no longer done here) and MonitorLocationMap.test.js.

After making a pull request

  • If appropriate, put the link to the PR in the JIRA ticket
  • Assign someone to review unless the change is trivial
  • Check the accessibility CI step and fix or explain any issues.

Merge request reports

Loading