Router: Query String Builder Service - Common State
The USGS Earthquakes app requires that users be able to bookmark the application in its given state. This requires tracking certain key pieces of state in the URL for later restoration when the url is changed, or when the site is loaded from a url. A service should be implemented that will observe the NgRx Store for changes in these key pieces of state, and issue updates to the query string of the url whenever these states change.
This story will address the common state, and will leave additional potential properties for future enhancements (i.e. when integration of existing search feature is implemented.)
Properties to track:
- Auto update
- Restrict list to map
- Current Feed
- Currently selected event
- List Format
- List Sort
- Map:
- Extent
- Base layer
- Selected overlays
- Timezone
- UI Panels Selected
This service should detect if there have actually been changes to the url. If there have not been changes, then the url should not be changed...only change the url if the new version is actually different from the current. This is to prevent redirection loops, as state will also be driven by the url!! Url should be entirely driven by changes in NgRx state.